From 14fa32c3795389884a7dbc04580c446776c61b74 Mon Sep 17 00:00:00 2001 From: JamesWrigley Date: Tue, 14 Apr 2026 00:39:34 +0200 Subject: [PATCH] Display backtrace from unexpected errors in terminate_all_workers() --- src/cluster.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cluster.jl b/src/cluster.jl index 848b908..f65da5e 100644 --- a/src/cluster.jl +++ b/src/cluster.jl @@ -1275,7 +1275,12 @@ function terminate_all_workers() try rmprocs(workers(); waitfor=5.0) catch _ex - @warn "Forcibly interrupting busy workers" exception=_ex + if _ex isa ErrorException + @warn "Forcibly interrupting busy workers" exception=_ex + else + @error "Unexpected error when interrupting busy workers" exception=(_ex, catch_backtrace()) + end + # Might be computation bound, interrupt them and try again interrupt(workers()) try