Mixture-of-experts dispatch and combine collectives time out on large NVLink domains
Expert-parallel routing sends every token to the ranks holding its chosen experts and gathers the results back, an all-to-all exchange whose volume depends on what the router chose. On large NVLink domains this pair of collectives can stop completing, and the job stalls inside it with no rank reporting a fault.
Separate dispatch from combine first, then re-run at a smaller domain size. If it only stalls at full scale, the number of concurrent peer exchanges is the factor rather than the model or the routing.
- Symptom
File ".../bench/ep_harness.py", line 248, in sample- Root cause
- It frequently does not present as a timeout at all, and that is the hardest part of recognising it. When a collective is abandoned the communicator is torn down while its kernels are still resident on the device. The next call that inspects device state, commonly torch.
- Recommended fix
- Establish whether the stall is in dispatch or in combine, since they are separate exchanges with different volumes and narrowing to one halves the search.
- How Denpex helps
- Denpex investigates Mixture-of-experts dispatch and combine collectives time out on large NVLink domains 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
A stall in the all-to-all exchanges that implement mixture-of-experts routing, in which a dispatch or combine receive never completes on a large NVLink domain and the job halts inside the collective without any rank raising a fault.
Is this what broke your run? Paste your log.
You're reading about Mixture-of-experts dispatch and combine collectives time out on large NVLink domains. 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)
Expert parallelism turns communication into a function of the data. The router decides which ranks exchange how much, so no two steps look alike and the pattern is neither uniform nor symmetric. All-to-all already puts every rank in contact with every other, and a rack-scale domain multiplies those simultaneous contacts, so assumptions that were safe inside one node meet a regime they were never exercised in.
What you'll observe
- The stall is inside a collective, so no rank has an error of its own to report
- It depends on the data, because routing decides the exchange volume, and so it appears irregularly
- It emerges at large domain sizes and cannot be reproduced on a smaller topology
- Both the routing and the transport look correct in isolation
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 |
|---|---|
| torch.AcceleratorError: CUDA error: unspecified launch failure raised from torch.cuda.synchronize() | It frequently does not present as a timeout at all, and that is the hardest part of recognising it. When a collective is abandoned the communicator is torn down while its kernels are still resident on the device. The next call that inspects device state, commonly torch.cuda.synchronize at the end of a benchmark iteration, is the one that collects the wreckage, and it reports an unspecified launch failure. The frame in the traceback is therefore innocent, and the exchange that stalled has already been cleaned up by the time anything is printed. |
| The synchronize call being the frame that reports the fault, several operations after the exchange that actually stalled | Expert routing makes communication data-dependent. Which ranks exchange how much is decided per step by the router, so the traffic pattern changes from step to step and is not the uniform, symmetric shape that collective implementations are usually tuned and tested against. |
| No collective named anywhere in the traceback, because the failing call is an ordinary device synchronisation | All-to-all is the most demanding of those patterns because every rank talks to every other simultaneously. Scaling the domain multiplies the number of concurrent peer exchanges rather than adding to it, so resource limits and ordering assumptions that hold within a node can fail across a rack. |
| A receive operation timing out during the dispatch or combine phase of expert routing | The receive side is where it surfaces because that is the side that waits. A dispatch that was not sent, or was sent to a peer that had already moved on, leaves a receiver blocked with nothing to report except that its data did not arrive. |
| The stall occurring inside an all-to-all exchange rather than an all-reduce | It frequently does not present as a timeout at all, and that is the hardest part of recognising it. When a collective is abandoned the communicator is torn down while its kernels are still resident on the device. The next call that inspects device state, commonly torch.cuda.synchronize at the end of a benchmark iteration, is the one that collects the wreckage, and it reports an unspecified launch failure. The frame in the traceback is therefore innocent, and the exchange that stalled has already been cleaned up by the time anything is printed. |
| Onset only at large NVLink domain sizes such as a full rack-scale system | Expert routing makes communication data-dependent. Which ranks exchange how much is decided per step by the router, so the traffic pattern changes from step to step and is not the uniform, symmetric shape that collective implementations are usually tuned and tested against. |
Which systems are affected
- Mixture-of-experts models using expert parallelism, where routing drives an all-to-all
- Rack-scale NVLink domains, where the number of simultaneous peer exchanges is far larger than in a single node
- Low-latency dispatch and combine kernels tuned for such domains
- Any workload whose collective volume is decided by data rather than fixed by shape
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.
- ✓Treat an unspecified launch failure at a synchronisation point as a downstream report, not a cause. Check whether an expert-parallel exchange preceded it in the same iteration before investigating kernels.
- ✓Determine whether the timing-out operation is the dispatch or the combine exchange; they are separate collectives and only one of them will be at fault.
- ✓Run the same model and data at a smaller domain size. Completing there and stalling at full scale indicates the number of concurrent peer exchanges is the factor.
- ✓Substitute a general-purpose collective for the specialised low-latency path and re-run, which isolates the kernel from the routing.
Root cause
- It frequently does not present as a timeout at all, and that is the hardest part of recognising it. When a collective is abandoned the communicator is torn down while its kernels are still resident on the device. The next call that inspects device state, commonly torch.cuda.synchronize at the end of a benchmark iteration, is the one that collects the wreckage, and it reports an unspecified launch failure. The frame in the traceback is therefore innocent, and the exchange that stalled has already been cleaned up by the time anything is printed.
- Expert routing makes communication data-dependent. Which ranks exchange how much is decided per step by the router, so the traffic pattern changes from step to step and is not the uniform, symmetric shape that collective implementations are usually tuned and tested against.
- All-to-all is the most demanding of those patterns because every rank talks to every other simultaneously. Scaling the domain multiplies the number of concurrent peer exchanges rather than adding to it, so resource limits and ordering assumptions that hold within a node can fail across a rack.
- The receive side is where it surfaces because that is the side that waits. A dispatch that was not sent, or was sent to a peer that had already moved on, leaves a receiver blocked with nothing to report except that its data did not arrive.
The fix and how to prevent it
How to fix it
- Establish whether the stall is in dispatch or in combine, since they are separate exchanges with different volumes and narrowing to one halves the search.
- Reproduce at a smaller domain size to determine whether the fault scales with the number of peers, which distinguishes a topology-scale problem from a model or routing bug.
- Fall back to a general-purpose collective implementation rather than the low-latency dispatch and combine path, which establishes whether the specialised kernel is involved.
- Capture per-rank progress at the point of the stall so the exchange can be reconstructed; without it there is no record of which rank owed data to which.
- Constrain routing so the per-step exchange is more uniform, for example by capping how many tokens any one expert may receive, which removes the extreme imbalances that stress the exchange hardest.
Step-by-step remediation
- 1Determine whether the timing-out collective is the dispatch or the combine phase.
- 2Check host kernel logs at the stall for an accelerator fault, which produces the same symptom.
- 3Re-run the same model and data on a smaller domain to test whether peer count is the factor.
- 4Fall back to a general-purpose collective in place of the low-latency dispatch and combine path.
- 5Log the per-step expert distribution so an unusual step can be correlated with the stall.
How to prevent it
- Include the largest domain size in qualification, because this class of failure is created by scale and is absent from any smaller test.
- Record the routing distribution alongside training metrics, so an unusual step can be correlated with a stall after the fact.
- Set collective timeouts long enough to tolerate a legitimately large exchange but short enough that a stall is detected in minutes rather than hours.
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
File ".../bench/ep_harness.py", line 248, in sample
torch.cuda.synchronize()
torch.AcceleratorError: CUDA error: unspecified launch failure
dispatch/combine receives time out
[rank17] Watchdog caught collective operation timeout: WorkNCCL(OpType=ALLTOALL) ran for 1800000 milliseconds before timing outUse 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
Narrowing to dispatch or combine, and to a domain size, replaces a whole-system symptom with a specific exchange at a specific scale, the only form in which it can be investigated. Falling back to a general-purpose collective separates the specialised kernel from the routing, and capping expert load removes the extreme imbalances that make the exchange hardest.
Best practices by model family
| Model / Stack | Recommendation | Notes |
|---|---|---|
| Stall inside expert routing | Separate dispatch from combine first | They are distinct exchanges; only one will be at fault. |
| Suspected scale dependence | Re-run at a smaller domain size | Completing smaller and stalling larger implicates concurrent peer count. |
| Low-latency kernels in use | Fall back to a general-purpose collective | Isolates the specialised path from the routing logic. |
| Irregular, data-dependent onset | Log the routing distribution per step | Without it an unusual step cannot be correlated with the stall. |
With the fix vs without the fix
| Dimension | With the fix | Without the fix |
|---|---|---|
| What decides the traffic | The router, per step, from the data | Assumed fixed by the model shape |
| Effect of domain size | Multiplies simultaneous peer exchanges | Assumed to add capacity linearly |
| Which side reports | The receiver, which is waiting | Expected from whichever side failed |
Diagnostic note
“The data dependence is what makes this so hard to pin down, and it is worth saying plainly: the same model, the same code and the same hardware will complete thousands of steps and stall on one, because the router produced an unusual distribution on that step. Anyone treating it as a flaky interconnect will chase it indefinitely. Capture the routing distribution per step, or the stall stays unattributable.”
Visual fingerprint
step N router sends rank0 -> {2,5,9} rank1 -> {2} rank2 -> {0,1,...}
step N+1 router sends rank0 -> {3} rank1 -> {3,7,8} rank2 -> {5}
all-to-all: every rank in contact with every other, volumes set by routing
larger domain -> more simultaneous exchanges, not merely more capacityDiagnose 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 extensionRelated failures to investigate next
Frequently asked questions
Questions engineers and on-call staff commonly ask about this failure.
Why does it only happen at full scale?
The same job ran fine a thousand times.
No rank reported an error.
Could this be a hardware fault instead?
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.