Skip to content

Finding the Culprit Rank in an NCCL Hang

When one rank stalls, NCCL's synchronous collectives freeze every rank, masking which GPU actually failed. Localizing the culprit needs divergence signals, not the NCCL stack trace.

Quick answer

When one rank stalls, NCCL's synchronous collectives freeze every rank, masking which GPU actually failed. Localizing the culprit needs divergence signals, not the NCCL stack trace.

Symptom
No NCCL error emitted, watchdog eventually times out
Root cause
One rank stopped progressing (data stall, slow I/O, faulted GPU). Synchronous collective semantics block all peers waiting on it. The faulted rank is in a different state than the rest.
Recommended fix
NCCL_DEBUG=INFO
How Denpex helps
Denpex investigates Finding the Culprit Rank in an NCCL Hang 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.
Distributed Training#nccl#hang#straggler#flight-recorder#debugging#distributed

What this failure is

Finding the Culprit Rank in an NCCL Hang is a Distributed Training failure seen during ML training runs. When one rank stalls, NCCL's synchronous collectives freeze every rank, masking which GPU actually failed. Localizing the culprit needs divergence signals, not the NCCL stack trace. Common tags: Nccl, Hang, Straggler, Flight Recorder.

Live diagnosis, no signup

Is this what broke your run? Paste your log.

You're reading about Finding the Culprit Rank in an NCCL Hang. 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)

One rank stopped progressing (data stall, slow I/O, faulted GPU). Synchronous collective semantics block all peers waiting on it. The faulted rank is in a different state than the rest. Taken together, these mechanisms explain why the failure is reproducible, why it tends to surface on specific workloads or scales, and why generic mitigation attempts often fall short without addressing the underlying cause.

What you'll observe

  • The whole job hangs with no error
  • Every rank shows the same NCCL wait, so the stack is unhelpful
  • Need to find which specific GPU/rank diverged

Common symptoms and what they mean

Check possible explanations against the incident evidence. A matching symptom alone does not establish its cause.

SymptomPossible explanation
GPU utilization 100% but power draw low (~70W) on the stuck rankOne rank stopped progressing (data stall, slow I/O, faulted GPU)
All ranks blocked in the same collective (AllReduce/ReduceScatter)Synchronous collective semantics block all peers waiting on it
No NCCL error emitted, watchdog eventually times outThe faulted rank is in a different state than the rest

Which systems are affected

  • Large model+data parallel jobs with many comm groups
  • Long multi-node runs
  • Mixed-speed or partially faulted hardware

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.

  • ✓Reproduce the failure from a clean checkpoint/seed: the symptom must appear without warm-up state from a previous run.
  • ✓Verified signal present: GPU utilization 100% but power draw low (~70W) on the stuck rank
  • ✓Verified signal present: All ranks blocked in the same collective (AllReduce/ReduceScatter)
  • ✓Verified signal present: No NCCL error emitted, watchdog eventually times out
  • ✓A targeted fix from the "How to fix it" section eliminates or substantially reduces the symptom within one validation pass.

Root cause

  • One rank stopped progressing (data stall, slow I/O, faulted GPU)
  • Synchronous collective semantics block all peers waiting on it
  • The faulted rank is in a different state than the rest

The fix and how to prevent it

How to fix it

  • Look for the rank with high SM utilization but anomalously low power. That is the spinning/stuck one
  • Export per-rank heartbeat / NCCL opCount and find the rank that stopped advancing
  • Use NCCL_DEBUG=INFO + flight recorder (TORCH_NCCL_TRACE_BUFFER_SIZE) to find the last completed op per rank
  • Isolate which communicator/group is deadlocked, then inspect that rank's host (dmesg, iostat)

Step-by-step remediation

  1. 1Look for the rank with high SM utilization but anomalously low power. That is the spinning/stuck one
  2. 2Export per-rank heartbeat / NCCL opCount and find the rank that stopped advancing
  3. 3Use NCCL_DEBUG=INFO + flight recorder (TORCH_NCCL_TRACE_BUFFER_SIZE) to find the last completed op per rank
  4. 4Isolate which communicator/group is deadlocked, then inspect that rank's host (dmesg, iostat)

How to prevent it

  • Emit a per-rank step heartbeat to a side channel
  • Enable the PyTorch NCCL flight recorder in long runs
  • Alert on the high-util/low-power hang fingerprint

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
No NCCL error emitted, watchdog eventually times out

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.

Code examples

snippet
# Capture per-rank flight-recorder traces to find the last op each rank ran
export TORCH_NCCL_TRACE_BUFFER_SIZE=2000
export NCCL_DEBUG=INFO
# On a hang, compare opCounts across ranks; the lagging rank is the culprit.

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.

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

NCCL errors in context

An NCCL error can follow an earlier worker failure. The hub connects documented collective errors with their interpretation limits, worker evidence and configuration checks.

Compare related nccl errors

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.