Fork me on GitHub
#kaocha
<
2022-06-21
>
Alys Brooks00:06:43

New Kaocha release! This fixes a bug added to gc-profiling in the previous version: https://github.com/lambdaisland/kaocha/releases/tag/v1.68.1059

馃憤 2
馃帀 1
dharrigan05:06:35

Perhaps a post in #announcements and/or #releases may be useful to raise awareness too?

Alys Brooks17:06:49

Not a bad idea. We try to release frequently, which is beneficial for existing users, but makes it less obvious when to promote a release. Maybe I'll sum up the last couple of releases.

dharrigan19:06:30

I believe #releases are for small incremental changes, and #announcements for the bigger ones.

dharrigan19:06:55

i.e., in #releases A place to post minor releases of libraries and projects that you would not otherwise post in #announcements

馃憤 1
ABeltramo11:06:48

Thanks for taking care and fixing both issues in such a short time!

ABeltramo11:06:33

I'm sorry to bother you guys but I keep getting errors, this one is a bit tricky to reproduce so I'm not opening an issue on Github until I figure out what's causing it

ABeltramo11:06:41

The issue is that "sometimes" (non deterministic so it's probably tied to my particular test cases) kaocha just exit mid way returning exit code 1. The problem is that nothing is printed in the console and I don't know how to get to the underlying cause or exception.

ABeltramo11:06:05

I quickly skimmed thru Kaocha code base and it looks like it's all running in a giant try+ catch and I'm afraid that is blocking the actual exception to bubble up. Is there any way to avoid that?

plexus12:06:55

We only catch our own own early-exit exception in there, any "normal" exceptions will bubble, or be reported as errors depending on which stage they happen in.

plexus12:06:28

Is it possible you're hitting some of your own code that does a System/exit?

plexus12:06:31

If the exit code is 1 then the only way that is coming from kaocha is if there's a single failing test.

plexus12:06:46

Have you tried reusing the random seed to reproduce the issue?

plexus12:06:12

What does "exit mid way" mean exactly?

ABeltramo13:06:26

> Is it possible you're hitting some of your own code that does a System/exit? It's extremely unlikely, we don't call System/exit directly anywhere and it's happening randomly at different points. > What does "exit mid way" mean exactly? I'm using the kaocha.report/documentation and I can see that (when it's stopping early) it's in a different spot everytime. > Have you tried reusing the random seed to reproduce the issue? First thing I tried, I'm always running with a set seed but the exit is not tied to any particular test case My first guess was a memory issue (and that's why I tried the gc-reporter btw) but it's happening even after increasing the heap space (via Xmx). Measuring system memory indicates that we are nowhere near the end of addressable memory.

plexus13:06:17

It does sound a lot like something is killing your JVM...

ABeltramo13:06:59

I know, right? I can't figure out what though and I've got no output message to work with 馃槗

ABeltramo13:06:02

Maybe I should try running the tests from the REPL. Can I access the results/outputs when running it this way?

ABeltramo13:06:23

It's happening also on the REPL when running (k/run-all) it starts running, it prints a bunch of unit tests and then it just stops running without returning the map with the results. The REPL is still running and everything is still up.

plexus14:06:01

hmmm ok that's fascinating

plexus14:06:55

what's the return value of run-all?

plexus14:06:48

Can you try (kaocha.api/run (kaocha.repl/config))?

ABeltramo14:06:12

> what's the return value of run-all? There's no return value as far as I can see, I'm back to the REPL ns waiting for an input. No message, no anything..

ABeltramo14:06:30

Let me try: (kaocha.api/run (kaocha.repl/config))

ABeltramo14:06:18

btw re-running run-all in the same REPL didn't triggered any error and completed fine returning the map with #:kaocha.result . This at least looks consistent with what I was seeing in the CLI.

ABeltramo14:06:26

Same issue using api/run the output looks something like:

user=> (kaocha.api/run (kaocha.repl/config))
--- unit (clojure.test) ---------------------------
a.test
 testing something
 testing something

[.... other tests .....]

z.test
 testing something
user=>

plexus14:06:04

a function has to either return or error... you can't not have a return value

plexus14:06:22

how about (pr-str (kaocha.api/run (kaocha.repl/config)))?

plexus14:06:00

are you using parallelization?

ABeltramo14:06:21

I see what you mean, I'll try to debug it and see if I can find anything useful..

plexus14:06:45

it's very fascinating, I must admit 馃槃 trying to come up with a hypothesis and failing...

馃槄 1
ABeltramo14:06:54

> are you using parallelization? The tested code is highly parallel but I'm not using the parallelization from Kaocha, I'm running on the latest release..

plexus14:06:45

you could try examing the process with jcmd/`jstack`, but without a hypothesis I'm not sure what that would yield

plexus14:06:54

maybe also use the debug reporter

ABeltramo14:06:43

I'll try to dig deeper into the rabbit hole as soon as I have a little bit of time. In the mean time, thank you for your help!!!

plexus15:06:25

something else, make sure to disable output capturing. That's general advice when debugging issues, you don't want some relevant warnings or other output to get swallowed

imre15:06:44

could also turn on kaocha debug mode

plexus15:06:34

what's that?

imre16:06:39

oh, that question came from an unexpected source

imre16:06:27

And I just see you suggested that like 3 lines above

imre16:06:37

Apologies for the noise.

plexus20:06:40

No worries :) I was being a little facetious. I was wondering if maybe you were thinking of the debug thing we have in kaocha-cljs2.