From dcd89eb6314530154530e670242920a2fa69c1fe Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Fri, 24 Jan 2025 23:06:01 -0500 Subject: [PATCH] try showing a stacktrace when a worker is still alive --- src/managers.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/managers.jl b/src/managers.jl index eebd007..308db6b 100644 --- a/src/managers.jl +++ b/src/managers.jl @@ -745,13 +745,15 @@ function kill(manager::LocalManager, pid::Int, config::WorkerConfig; profile_wai # First, try sending `exit()` to the remote over the usual control channels remote_do(exit, pid) + # If the worker is still alive later, give a useful stacktrace + _stacktrace = stacktrace() timer_task = @async begin sleep(exit_timeout) # Check to see if our child exited, and if not, send an actual kill signal if !process_exited(config.process) - @warn "Failed to gracefully kill worker $(pid)" + @warn "Failed to gracefully kill worker $(pid)" exception=(ErrorException("Failed to gracefully kill worker $(pid)"), _stacktrace) profile_sig = Sys.iswindows() ? nothing : Sys.isbsd() ? ("SIGINFO", 29) : ("SIGUSR1" , 10) if profile_sig !== nothing @info("Sending profile $(profile_sig[1]) to worker $(pid)")