@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / fa0d353acf
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 6, 23:00 UTC

[Bugfix] Surface exceptions from non-blocking execute_model in UniProcExecutor to avoid DP deadlocks (#35194)

Signed-off-by: fangyuchu <fangyuchu@qq.com>

fangyuchu committed Mar 11, 2026 at 11:22 UTC fa0d353acfa3de7610fdcdb6d23b3b34109c5749
2 files changed +10 -4
vllm/v1/engine/core.py
+4 -3
@@ -443,9 +443,10 @@ class EngineCore:
443 deferred_scheduler_output = None
444 if self.scheduler.has_requests():
445 scheduler_output = self.scheduler.schedule()
446 - exec_future = self.model_executor.execute_model(
447 - scheduler_output, non_block=True
448 - )
446 + with self.log_error_detail(scheduler_output):
447 + exec_future = self.model_executor.execute_model(
448 + scheduler_output, non_block=True
449 + )
450 if self.is_ec_consumer:
451 model_executed = scheduler_output.total_num_scheduled_tokens > 0
452
vllm/v1/executor/uniproc_executor.py
+6 -1
@@ -100,12 +100,17 @@ class UniProcExecutor(Executor):
100 def execute_model( # type: ignore[override]
101 self, scheduler_output: SchedulerOutput, non_block: bool = False
102 ) -> ModelRunnerOutput | None | Future[ModelRunnerOutput | None]:
103 - return self.collective_rpc(
103 + output = self.collective_rpc(
104 "execute_model",
105 args=(scheduler_output,),
106 non_block=non_block,
107 single_value=True,
108 )
109 + # In non-blocking mode, surface any exception as early as possible.
110 + if non_block and output.done():
111 + # Raise the exception in-line if the task failed.
112 + output.result()
113 + return output
114
115 def sample_tokens( # type: ignore[override]
116 self, grammar_output: GrammarOutput | None, non_block: bool = False