Debugging only rank 0 logs
Rank 0 frequently survives to print the watchdog timeout while rank 7 or rank 19 died silently minutes earlier.
Operator task guide
Running with NCCL_DEBUG=INFO and TORCH_NCCL_TRACE_BUFFER_SIZE=2000 forces NCCL to print its selected network interface, IB/RoCE HCA, P2P paths, and in-flight collectives right before a watchdog timeout fires. Use NCCL_DEBUG=TRACE only for targeted reproductions because TRACE log volume is high.
Never raise NCCL timeout variables (such as TORCH_NCCL_ASYNC_ERROR_HANDLING or timeout minutes) as a fix without first checking whether a silent rank died from Python, host cgroup OOM, or an NVIDIA Xid. Longer timeouts only make dead clusters sit idle longer.
Reviewed . Reference guidance is not a diagnosis of your workload.
Export NCCL debug flags and Flight Recorder ring-buffer settings before launching torchrun or srun so the next hang writes collective history to durable storage.
export NCCL_DEBUG=INFO
export NCCL_DEBUG_SUBSYS=INIT,ENV,NET,COLL
export TORCH_NCCL_TRACE_BUFFER_SIZE=2000
export TORCH_NCCL_DUMP_ON_TIMEOUT=1
export TORCH_NCCL_DEBUG_INFO_TEMP_FILE=/shared/nccl_trace_rank_Search across rank logs for the selected transport (NET/IB, Socket, or P2P), then look immediately before the watchdog abort for any earlier Python traceback or errno.
rg -n 'NCCL INFO NET|NCCL WARN|NCCL ERROR|Watchdog caught|Traceback' rank-*.log | head -n 60If rank 0 printed Watchdog caught collective operation timeout but another rank left no timeout line, inspect host dmesg and Slurm sacct for the missing peer PID.
dmesg -T | grep -iE 'Out of memory|Killed process|NVRM: Xid'
sacct -j <jobid> --format=JobID,NodeList,State,ExitCode,MaxRSSLegitimate long checkpoint saves or first-step torch.compile runs can exceed the 10-minute PyTorch default. Increase init_process_group(timeout=...) or set TORCH_NCCL_HEARTBEAT_TIMEOUT_SEC only when every rank is measurably alive and making progress.
| Signal | What it means | Next action |
|---|---|---|
| NCCL INFO NET/Socket chosen instead of NET/IB | InfiniBand RDMA plugin missing or blocked. | Check ibstat, container RDMA mounts, and NCCL_IB_DISABLE. |
| Watchdog caught collective operation timeout on ranks 0..N-1 | At least one peer rank failed to enqueue or died. | Inspect the silent rank traceback, cgroup MaxRSS, and host Xids. |
| Flight recorder shows mismatched OpType or SeqNum | Conditional code branch diverged across ranks. | Fix divergent control flow or uneven batch steps across DDP/FSDP. |
| Timeout clears when checkpoint save or compile finishes earlier | Legitimate slow step exceeded default watchdog threshold. | Raise process group timeout and overlap or optimize checkpoint I/O. |
Rank 0 frequently survives to print the watchdog timeout while rank 7 or rank 19 died silently minutes earlier.
TRACE logs every collective call and can saturate shared filesystems or slow step time.
Deadlocks stay deadlocked; longer timeouts just burn 6x more idle GPU-hours before alerting.
Extract initiating errors from multi-rank NCCL watchdog dumps.
Inspect transport, timeout, and debug variables.
Reconstruct cross-rank timelines accurately.
Decode unhandled system, CUDA, and RDMA errors.
NCCL_DEBUG=INFO logs initialization, topology, selected network interfaces, and warnings/errors with minimal runtime overhead. NCCL_DEBUG=TRACE adds verbose per-collective trace lines and should be limited to short reproducer runs.
PyTorch torch.distributed defaults to 10 minutes (600 seconds) for NCCL collectives unless overridden via timeout=timedelta(...) in init_process_group.
Set NCCL_DEBUG_FILE=/path/to/logs/nccl_%h_%p.log so each host and PID writes its own clean log without interleaving stdout.
When TORCH_NCCL_DUMP_ON_TIMEOUT=1 is set alongside TORCH_NCCL_TRACE_BUFFER_SIZE=2000, PyTorch writes collective ring buffers to the file prefix configured by TORCH_NCCL_DEBUG_INFO_TEMP_FILE.
Get the likely cause, supporting evidence, and next safe steps with the same cloud reasoning used by paid plans. A crash the engine recognizes is answered in seconds, then checked by an independent AI review that updates this page when it finishes. A crash it does not recognize waits for the AI's own answer, which can take a few minutes. No account, card, or installation. Logs are masked at Denpex API ingress and are not saved to account history.
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.
No credit card. No automatic subscription. See whether Denpex helps with an incident you already understand.
Up to 50 diagnoses a day for 30 days. Verify your work email to activate an eligible company evaluation, then replay a resolved incident and compare the evidence and next steps with your team's confirmed cause.
Use the three free diagnoses to review your error and relevant evidence. Keep reference guidance separate from the cause and recovery status of your own workload.
Diagnose your incident