Skip to content

Commit

Permalink
try showing a stacktrace when a worker is still alive
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Jan 25, 2025
1 parent ca5b312 commit dcd89eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/managers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand Down

0 comments on commit dcd89eb

Please sign in to comment.