Skip to content

Commit 1319e7e

Browse files
committed
Allow for workers dying in the middle of cleanup
1 parent 1aed585 commit 1319e7e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/sch/Sch.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,15 @@ function cleanup_proc(state, p, log_sink)
408408

409409
# If the worker process is still alive, clean it up
410410
if wid in workers()
411-
remotecall_wait(_cleanup_proc, wid, state.uid, log_sink)
411+
try
412+
remotecall_wait(_cleanup_proc, wid, state.uid, log_sink)
413+
catch ex
414+
# We allow ProcessExitedException's, which means that the worker
415+
# shutdown halfway through cleanup.
416+
if !(ex isa ProcessExitedException)
417+
rethrow()
418+
end
419+
end
412420
end
413421

414422
timespan_finish(ctx, :cleanup_proc, (;worker=wid), nothing)

0 commit comments

Comments
 (0)