Skip to content

Commit a865bc1

Browse files
authored
[core] do not send error across process (#16174)
Signed-off-by: youkaichao <[email protected]>
1 parent 21802c4 commit a865bc1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

vllm/v1/executor/multiproc_executor.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,9 @@ def collective_rpc(self,
119119
timeout=dequeue_timeout)
120120

121121
if status != WorkerProc.ResponseStatus.SUCCESS:
122-
if isinstance(result, Exception):
123-
raise result
124-
else:
125-
raise RuntimeError("Worker failed")
122+
raise RuntimeError(
123+
"Worker failed with error %s, please check the"
124+
" stack trace above for the root cause", result)
126125

127126
responses[w.rank] = result
128127

@@ -378,9 +377,11 @@ def worker_busy_loop(self):
378377
# Notes have been introduced in python 3.11
379378
if hasattr(e, "add_note"):
380379
e.add_note(traceback.format_exc())
381-
self.worker_response_mq.enqueue(
382-
(WorkerProc.ResponseStatus.FAILURE, e))
383380
logger.exception("WorkerProc hit an exception: %s", exc_info=e)
381+
# exception might not be serializable, so we convert it to
382+
# string, only for logging purpose.
383+
self.worker_response_mq.enqueue(
384+
(WorkerProc.ResponseStatus.FAILURE, str(e)))
384385
continue
385386

386387
self.worker_response_mq.enqueue(

0 commit comments

Comments
 (0)