@@ -113,7 +113,7 @@ addprocs([
113
113
114
114
* `exeflags`: additional flags passed to the worker processes. It can either be a `Cmd`, a `String`
115
115
holding one flag, or a collection of strings, with one element per flag.
116
- E.g. `\` --threads=auto project=.\` `, `"--compile-trace=stderr"` or `["--threads=auto", "--compile=all"]`.
116
+ E.g. `\` --threads=auto project=.\` `, `"--compile-trace=stderr"` or `["--threads=auto", "--compile=all"]`.
117
117
118
118
* `topology`: Specifies how the workers connect to each other. Sending a message between
119
119
unconnected workers results in an error.
@@ -740,16 +740,25 @@ function kill(manager::SSHManager, pid::Int, config::WorkerConfig)
740
740
nothing
741
741
end
742
742
743
- function kill (manager:: LocalManager , pid:: Int , config:: WorkerConfig ; exit_timeout = 15 , term_timeout = 15 )
743
+ function kill (manager:: LocalManager , pid:: Int , config:: WorkerConfig ; profile_wait = 6 , exit_timeout = 15 , term_timeout = 15 )
744
+ # profile_wait = 6 is 1s for profile, 5s for the report to show
744
745
# First, try sending `exit()` to the remote over the usual control channels
745
746
remote_do (exit, pid)
746
747
748
+
747
749
timer_task = @async begin
748
750
sleep (exit_timeout)
749
751
750
752
# Check to see if our child exited, and if not, send an actual kill signal
751
753
if ! process_exited (config. process)
752
- @warn (" Failed to gracefully kill worker $(pid) , sending SIGQUIT" )
754
+ @warn " Failed to gracefully kill worker $(pid) "
755
+ profile_sig = Sys. iswindows () ? nothing : Sys. isbsd () ? (" SIGINFO" , 29 ) : (" SIGUSR1" , 10 )
756
+ if profile_sig != = nothing
757
+ @info (" Sending profile $(profile_sig[1 ]) to worker $(pid) " )
758
+ kill (config. process, profile_sig[2 ])
759
+ sleep (profile_wait)
760
+ end
761
+ @warn (" Sending SIGQUIT to worker $(pid) " )
753
762
kill (config. process, Base. SIGQUIT)
754
763
755
764
sleep (term_timeout)
0 commit comments