I've made some fairly innocent (in my view) changes on a branch in my work project, and now lein check stalls. It outputs all the same as before, but it hangs before returning the prompt in the terminal.
I can't share the code, but I was wondering if there are ways to diagnose lein check stalling?
btw control-\ sends a SIGQUIT (numeric value of 3 on *nix), this can be used with kill and the process PID in scripted situations
there's also jstack which is a CLI utility that comes with the vm
did you add a use of future?
if this is the case, waiting ~60 seconds should give sufficient time for the program to exit correct?
No futures added (explicitly, anyways)
you can thread dump the JVM to see what are the threads doing, with VisualVM or jstack (which comes with the JDK). Maybe it can throw some light. Run jps to determine the PID of the JVM running that lein check and then jstack PID
@jpmonettas I'll give it a go 🤓
did you give it a few minutes after it started stalling?
For narrowing down the problem, I'm doing the changes in the PR stepwise until it fails, but knowing how to diagnose it generally would be handy
> When a program like this finishes, there will be a 60 second pause before exit. To fix this problem, call https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/shutdown-agents as the program exits. That means we can exclude this issue then
I think so 🤓
I'll give an update when I've narrowed down the offending code. It's really not that much code, but the stepwise checks are taking quite some time.
if you hit control-\ you will get a stack dump and it will most likely point directly to whatever is holding up the exit
you might still end up looking through code but that would at the very least provide a map