Skip to content

Commit dcd89eb

Browse files
try showing a stacktrace when a worker is still alive
1 parent ca5b312 commit dcd89eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/managers.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,13 +745,15 @@ function kill(manager::LocalManager, pid::Int, config::WorkerConfig; profile_wai
745745
# First, try sending `exit()` to the remote over the usual control channels
746746
remote_do(exit, pid)
747747

748+
# If the worker is still alive later, give a useful stacktrace
749+
_stacktrace = stacktrace()
748750

749751
timer_task = @async begin
750752
sleep(exit_timeout)
751753

752754
# Check to see if our child exited, and if not, send an actual kill signal
753755
if !process_exited(config.process)
754-
@warn "Failed to gracefully kill worker $(pid)"
756+
@warn "Failed to gracefully kill worker $(pid)" exception=(ErrorException("Failed to gracefully kill worker $(pid)"), _stacktrace)
755757
profile_sig = Sys.iswindows() ? nothing : Sys.isbsd() ? ("SIGINFO", 29) : ("SIGUSR1" , 10)
756758
if profile_sig !== nothing
757759
@info("Sending profile $(profile_sig[1]) to worker $(pid)")

0 commit comments

Comments
 (0)