vllm - 💡(How to fix) Fix [Bug]: qwen 3.5 crash under dp 8 [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#36776Fetched 2026-04-08 00:34:50
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
project_v2_item_status_changed ×2added_to_project_v2 ×1labeled ×1subscribed ×1

Error Message

error log

Code Example

Your output of `python collect_env.py` here

---

vllm serve Qwen/Qwen3.5-397B-A17B-FP8 --language-model-only -dp 8 --load-format fastsafetensors -ep
vllm bench serve --model Qwen/Qwen3.5-397B-A17B-FP8 --endpoint /v1/completions --dataset-name random --max-concurrency 32 --random-output-len 1024

---

[rank0]:[W311 18:21:36.049434121 CUDAGuardImpl.h:122] Warning: CUDA warning: an illegal memory access was encountered (function destroyEvent)
RAW_BUFFERClick to expand / collapse

Your current environment

<details> <summary>The output of <code>python collect_env.py</code></summary>
Your output of `python collect_env.py` here
</details>

🐛 Describe the bug

vllm will crash under dp 8. my commit is 66f927f20

vllm serve Qwen/Qwen3.5-397B-A17B-FP8 --language-model-only -dp 8 --load-format fastsafetensors -ep
vllm bench serve --model Qwen/Qwen3.5-397B-A17B-FP8 --endpoint /v1/completions --dataset-name random --max-concurrency 32 --random-output-len 1024

error log

[rank0]:[W311 18:21:36.049434121 CUDAGuardImpl.h:122] Warning: CUDA warning: an illegal memory access was encountered (function destroyEvent)

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.

extent analysis

Fix Plan

The fix involves updating the CUDA version and modifying the code to handle CUDA events properly.

  • Update CUDA to the latest version to ensure compatibility with the current environment.
  • Modify the code to check for CUDA events before destroying them to prevent illegal memory access.

Code Changes

import torch

# Check if CUDA is available
if torch.cuda.is_available():
    # Get the current CUDA device
    device = torch.cuda.current_device()
    # Check if the event is valid before destroying it
    if torch.cuda.event_query(device):
        torch.cuda.event_destroy(device)

Alternatively, you can use a try-except block to catch the CUDA warning and handle it accordingly:

try:
    torch.cuda.event_destroy(device)
except RuntimeError as e:
    print(f"CUDA warning: {e}")

Verification

To verify that the fix worked, run the vllm serve and vllm bench serve commands again with the updated code and CUDA version. Check the error log for any CUDA warnings or errors.

Extra Tips

  • Make sure to update the CUDA version to the latest one compatible with your environment.
  • Use the torch.cuda.event_query function to check if the event is valid before destroying it.
  • Consider using a try-except block to catch and handle CUDA warnings and errors.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING