vLLM NCCL P2P Hang and Timeout in Tensor Parallelism
Fix vLLM NCCL timeouts and hangs during tensor-parallel startup or inference caused by PCIe ACS/IOMMU P2P blocking, small /dev/shm, or a crashed worker.
When vLLM hangs or times out in NCCL during tensor-parallel startup or decode, check container /dev/shm size, run NCCL_DEBUG=INFO, and inspect nvidia-smi topo -m. On PCIe servers without NVLink, test NCCL_P2P_DISABLE=1 to isolate ACS/IOMMU peer-to-peer DMA stalls.
- Symptom
NCCL INFO Channel 00 : 0[0] -> 1[1] via P2P/IPC- Root cause
- Blocked PCIe P2P DMA (ACS/IOMMU), insufficient /dev/shm, wrong NIC interface, or a silent earlier worker crash.
- Recommended fix
NCCL_DEBUG=INFO- How Denpex helps
- Denpex investigates vLLM NCCL P2P Hang and Timeout in Tensor Parallelism using the evidence you provide or your connected workload collects. Earlier rank, host or application evidence is needed to distinguish an initiating failure from a downstream report.
What this failure is
vLLM tensor-parallel workers failed to complete NCCL peer-to-peer or collective operations within the communication timeout window.
Is this what broke your run? Paste your log.
You're reading about vLLM NCCL P2P Hang and Timeout in Tensor Parallelism. Paste your own traceback and relevant evidence for an investigation of your workload, with a next action or a specific missing fact. A reference entry does not establish your cause. No account or card for the free diagnosis. Review data handling before submitting sensitive logs.
Before uploading, review cloud data handling and local options.
Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.
Why it happens (the mechanism)
On non-NVLink PCIe servers, enabled PCIe Access Control Services (ACS) or strict IOMMU translation blocks direct GPU-to-GPU P2P writes, causing NCCL P2P rings to hang. Small /dev/shm or a silent worker OOM kill produces the same outer timeout.
What you'll observe
- vllm serve hangs indefinitely after loading weights across --tensor-parallel-size > 1
- Workers throw NCCL timeout or EngineDeadError mid-serving
Common symptoms and what they mean
Check possible explanations against the incident evidence. A matching symptom alone does not establish its cause.
| Symptom | Possible explanation |
|---|---|
| Watchdog caught collective operation timeout in vLLM TP worker | Blocked PCIe P2P DMA (ACS/IOMMU), insufficient /dev/shm, wrong NIC interface, or a silent earlier worker crash. |
| NCCL WARN P2P / SHM failure followed by EngineDeadError | Blocked PCIe P2P DMA (ACS/IOMMU), insufficient /dev/shm, wrong NIC interface, or a silent earlier worker crash. |
Which systems are affected
- vLLM multi-GPU PCIe servers (RTX 4090/5090, L40S, PCIe A100/H100)
- Multi-node vLLM Ray deployments
How to confirm this is the problem
Use this checklist to test the hypothesis against a small reproduction. No single line proves the root cause, so preserve the preceding events and compare one variable at a time.
- ✓Confirm all TP workers complete model load, CUDA graph capture, and concurrent requests with zero collective timeouts.
Root cause
- Blocked PCIe P2P DMA (ACS/IOMMU), insufficient /dev/shm, wrong NIC interface, or a silent earlier worker crash.
The fix and how to prevent it
How to fix it
- Inspect nvidia-smi topo -m to see whether GPUs communicate over NVLink (NV#) or PCIe switches / host bridges (SYS/NODE/PHB).
- Verify container /dev/shm via df -h /dev/shm and mount at least 8 GiB to 16 GiB (--shm-size=16g).
- Run with NCCL_DEBUG=INFO VLLM_LOGGING_LEVEL=DEBUG and verify whether every worker PID stays alive.
- On PCIe hosts hanging on P2P, disable PCIe ACS in BIOS/OS where allowed or test NCCL_P2P_DISABLE=1 as a diagnostic control.
Step-by-step remediation
- 1Run nvidia-smi topo -m and df -h /dev/shm inside the container.
- 2Launch with NCCL_DEBUG=INFO to observe whether P2P/IPC or NET/IB stalls.
- 3Mount adequate /dev/shm or fix ACS/P2P settings and benchmark multi-request serving.
How to prevent it
- Run nccl-tests all_reduce_perf during host qualification before serving production vLLM traffic
- Keep tensor parallelism inside NVLink domains whenever possible
Save this diagnosis and catch the next crash automatically
All root cause, fix, and prevention steps above are free to read. Create a free account with any email or GitHub to keep your saved diagnosis history across the encyclopedia and run cloud checks, or use a work email below for the 30-day Team evaluation. No card required.
Or start a 30-day free Team trial (work email)
Verified work email unlocks all 14 fleet diagnostic tools, Slack alerts, and team history for 30 days. No card and no automatic charge.
Searchable error signature
NCCL INFO Channel 00 : 0[0] -> 1[1] via P2P/IPC
torch.distributed.DistBackendError: NCCL error in vLLM worker: unhandled system errorUse this text as a lookup key in logs and upstream issue trackers. It is not presented as a captured customer log. Confirm the cause from your own preceding events, versions, configuration and the cited references.
Diagnose your own log automatically
The root cause and fix steps above stay free. Create a free account to analyze full job logs, attribute the first failed rank, and keep saved incident history.
Sign up free. Analyze your cluster logsNo credit card. Daily allowance follows verified trust tier. Instant access.
Why the recommended fix works
Checking topology and testing NCCL_P2P_DISABLE=1 isolates whether broken PCIe P2P DMA or /dev/shm exhaustion caused the hang rather than blindly retrying.
Code examples
nvidia-smi topo -m
df -h /dev/shm
NCCL_DEBUG=INFO NCCL_P2P_DISABLE=1 vllm serve YOUR_MODEL --tensor-parallel-size 2This snippet illustrates the entry-specific check. Verify the installed versions, permissions, target and workload context before using it. A command or API example is not proof of recovery.
Best practices by model family
| Model / Stack | Recommendation | Notes |
|---|---|---|
| PCIe GPUs (no NVLink) | Disable PCIe ACS or validate NCCL_P2P_DISABLE=1 | Avoids root-complex P2P DMA deadlocks. |
| NVLink SXM GPUs | Check /dev/shm and NVLink error counters; do not disable P2P | Disabling P2P drops NVLink bandwidth drastically. |
With the fix vs without the fix
| Dimension | With the fix | Without the fix |
|---|---|---|
| P2P transport check | Verified nvidia-smi topo -m + NCCL_DEBUG=INFO | Indefinite hang at model startup |
| Container memory | 16 GiB /dev/shm mounted | 64 MB default crashes TP > 1 |
Diagnostic note
“Never ship NCCL_P2P_DISABLE=1 onto SXM NVLink H100/H200/B200 nodes. Use it strictly to diagnose PCIe-only boxes or as a temporary workaround when BIOS ACS cannot be disabled.”
Diagnose this failure in VS Code
Select the traceback or open the failed terminal, then run Denpex locally to inspect matched failure patterns, supporting evidence and next checks without uploading the log. Verify recommendations against your workload before changing production.
Install the free VS Code extensionvLLM errors in context
vLLM failures cross request, model, KV cache, worker, kernel and host boundaries. The hub compares common signatures and evidence checks that help distinguish possible causes.
Compare related vllm errorsFrequently asked questions
Questions engineers and on-call staff commonly ask about this failure.
When should I set NCCL_P2P_DISABLE=1 in vLLM?
Can a worker CUDA OOM look like a vLLM NCCL timeout?
Don't just read the fix, diagnose your run
The encyclopedia explains documented failure patterns. Denpex investigates your logs, configuration and stack, shows the supporting evidence, and asks for missing details when needed.
Related Inference errors
DeepGEMM rejects FP8 block-scaled weights with Unknown SF transformation on an unsupported architecture
Inference · high
SGLang NCCL Error and Multi-Node Timeout
Inference · high
SGLang torch.OutOfMemoryError: CUDA out of memory
Inference · high
vLLM CUDA Graph Capture OOM: Startup Fix & Tuning
Inference · high