[UX] Log worker exit code when process dies unexpectedly (#38641)

Signed-off-by: Nick Cao <ncao@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Nick Cao
2026-07-07 12:36:29 +00:00
committed by GitHub
co-authored by Claude
parent 8b91cd5b20
commit 920469974a
+5 -2
View File
@@ -280,9 +280,12 @@ class MultiprocExecutor(Executor):
logger.debug("MultiprocWorkerMonitor: shutdown already initiated")
return
_self.is_failed = True
proc_name = next(h.proc.name for h in workers if h.proc.sentinel == died[0])
proc = next(h.proc for h in workers if h.proc.sentinel == died[0])
logger.error(
"Worker proc %s died unexpectedly, shutting down executor.", proc_name
"Worker proc %s died unexpectedly (exit code: %s), "
"shutting down executor.",
proc.name,
proc.exitcode,
)
_self.shutdown()
callback = _self.failure_callback