Skip to content

[Bug]: assert request.num_output_placeholders >= 0 can fail in async scheduling #30142

@remusao

Description

@remusao

Your current environment

Currently using vLLM v0.12.0 (issue also seen on v0.11.2; not sure about older versions) with the official Docker image, on 8xH200 nodes.

🐛 Describe the bug

Using the following command to launch vLLM:

sudo docker run --gpus all --detach \
    -e "VLLM_USE_DEEP_GEMM=1" \
    -e "VLLM_MOE_USE_DEEP_GEMM=0" \
    -e "CUDA_VISIBLE_DEVICES=4,5,6,7" \
    -p 8235:8080 \
    --ipc=host \
    vllm/vllm-openai:v0.12.0 \
    --host=0.0.0.0 \
    --port=8080 \
    --model=Qwen/Qwen3-235B-A22B-Instruct-2507-FP8 \
    --gpu-memory-utilization=0.95 \
    --load-format=safetensors \
    --max-num-seqs=64 \
    --tensor-parallel-size 4 \
    --seed=0 \
    --served-model-name qwen3 \
    --enable-auto-tool-choice \
    --tool-call-parser hermes \
    --async_scheduling

It happens that the following assertion fails (I assume only when async scheduling is enabled but I didn't try without; as the assertion can take a long time to fail).

(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845] EngineCore encountered a fatal error.
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845] Traceback (most recent call last):
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 836, in run_engine_core
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]     engine_core.run_busy_loop()
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 863, in run_busy_loop
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]     self._process_engine_step()
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 892, in _process_engine_step
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]     outputs, model_executed = self.step_fn()
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]                               ^^^^^^^^^^^^^^
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 443, in step_with_batch_queue
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]     engine_core_outputs = self.scheduler.update_from_output(
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/core/sched/scheduler.py", line 1114, in update_from_output
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]     new_token_ids, stopped = self._update_request_with_output(
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/core/sched/async_scheduler.py", line 61, in _update_request_with_output
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]     assert request.num_output_placeholders >= 0
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=396) ERROR 12-05 07:26:46 [core.py:845] AssertionError

Unfortunately I do not have a repro for this as the assertion can fail after hours of serving traffic normally so it's pretty uncommon, but from our experience, it will eventually happen (I could see these traces on most nodes). Luckily the node restarts but I thought I'd share since it looks like a potential bug.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions