Skip to content

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.

Quick answer

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.
Inference#vllm#nccl#p2p#tensor-parallel#timeout

What this failure is

vLLM tensor-parallel workers failed to complete NCCL peer-to-peer or collective operations within the communication timeout window.

Live diagnosis, no signup

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.

training_logs.txt
No log to hand? Try one:

Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.

3 free cloud diagnoses per day

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.

SymptomPossible explanation
Watchdog caught collective operation timeout in vLLM TP workerBlocked PCIe P2P DMA (ACS/IOMMU), insufficient /dev/shm, wrong NIC interface, or a silent earlier worker crash.
NCCL WARN P2P / SHM failure followed by EngineDeadErrorBlocked 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

  1. 1Run nvidia-smi topo -m and df -h /dev/shm inside the container.
  2. 2Launch with NCCL_DEBUG=INFO to observe whether P2P/IPC or NET/IB stalls.
  3. 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.

Use your company email, for example alex@yourcompany.com.

Who qualifies?

Company email domains activate the free 30-day Team evaluation (up to 50 diagnoses a day) after an email and domain check, whatever mail provider you use. If we cannot verify your domain automatically, support reviews it: write to support@denpex.com. Free local diagnosis in the editor extension needs no account.

Using a personal email (Gmail, Outlook, Naver, QQ) or solo cluster? Create a free $0 account (no work email required) to save 7-day history and unlock AI fallback, or send a cluster crash log for a live walkthrough.
Already have an account? Sign in

Searchable error signature

search key
NCCL INFO Channel 00 : 0[0] -> 1[1] via P2P/IPC
torch.distributed.DistBackendError: NCCL error in vLLM worker: unhandled system error

Use 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 logs

No 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

snippet
nvidia-smi topo -m
df -h /dev/shm
NCCL_DEBUG=INFO NCCL_P2P_DISABLE=1 vllm serve YOUR_MODEL --tensor-parallel-size 2

This 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 / StackRecommendationNotes
PCIe GPUs (no NVLink)Disable PCIe ACS or validate NCCL_P2P_DISABLE=1Avoids root-complex P2P DMA deadlocks.
NVLink SXM GPUsCheck /dev/shm and NVLink error counters; do not disable P2PDisabling P2P drops NVLink bandwidth drastically.

With the fix vs without the fix

DimensionWith the fixWithout the fix
P2P transport checkVerified nvidia-smi topo -m + NCCL_DEBUG=INFOIndefinite hang at model startup
Container memory16 GiB /dev/shm mounted64 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 extension

vLLM 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 errors

Frequently asked questions

Questions engineers and on-call staff commonly ask about this failure.

When should I set NCCL_P2P_DISABLE=1 in vLLM?
Only on PCIe-only GPUs (such as dual RTX 4090/5090 or PCIe L40S) where BIOS PCIe ACS or IOMMU blocks peer-to-peer DMA. Never keep it on NVLink nodes.
Can a worker CUDA OOM look like a vLLM NCCL timeout?
Yes. If one TP worker dies from OOM or host SIGKILL mid-step, surviving workers time out waiting at the next collective.

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.