I lost three separate sessions debugging SGLang multi-node on 4× DGX Spark, each chasing a misleading signal. Posting the patterns + fixes so the next person doesn’t repeat my route.
Trap 1: TORCH_DISTRIBUTED_DEBUG=DETAIL produces FALSE-POSITIVE collective mismatch errors
Symptom:
RuntimeError: Detected mismatch between collectives on ranks.
Rank 0 is running collective: CollectiveFingerPrint(SequenceNumber=17, ...)
but Rank 1 is running collective: CollectiveFingerPrint(SequenceNumber=13, ...)
This looks like a serious bug. I bisected for hours — removed EAGLE, removed DP attention, switched to event_loop_normal, removed everything. Same mismatch every time. The “fix” was none of those.
Root cause: SGLang’s head process spawns sidecars (tokenizer subprocess, HTTP server bringup, ZMQ socket setup) that each do local broadcasts on single-rank or rank-0-only subgroups. PyTorch’s strict collective tracker counts these in the global SequenceNumber. When the actual cross-rank TP-group broadcast happens later, head’s counter is at N+k vs worker’s at N — flagged as “mismatch” even though the real NCCL ops are paired correctly.
Fix:
- DO NOT set
TORCH_DISTRIBUTED_DEBUG=DETAILorTORCH_NCCL_BLOCKING_WAIT=1in production multi-node SGLang launches. - These are useful for diagnosing real hangs but the strict tracker lies for SGLang specifically.
- Keep
NCCL_DEBUG=INFO(andNCCL_DEBUG_SUBSYS=INIT,NET) for actual transport visibility. Those don’t have the false positive.
If you DO need cross-rank collective tracing, use NCCL_DEBUG=TRACE instead — it shows real NCCL state without PyTorch’s process-wide counter overlay.
Trap 2: EAGLE speculative decoding flags must be on EVERY node, not just rank 0
Symptom: “Init torch distributed begin” on the head, then silence. Workers reach Dummy health check server started and go silent. No errors. Hangs forever (or until the wedge eventually OOMs).
The published GLM-4.7-FP8 recipe (thread 359256) only puts EAGLE flags (--speculative-algorithm EAGLE + the three speculative-num/topk params) on rank 0. That’s where I started, and it deadlocks immediately because rank 0 starts an EAGLE-related collective during scheduler init that ranks 1–3 never queue.
Fix: Pass EAGLE flags identically on every rank, not just the head. The published config works on InfiniBand setups likely because the rendezvous order is different — on RoCE through a switch, the asymmetric collective wedges.
Trap 3: Full CUDA graphs ON with FlashInfer is fine. Piecewise CUDA graphs are what crash.
Common belief in older threads: “FlashInfer + CUDA graphs is broken on sm_121, use Triton attention.”
Actually: I read sgl issue #19799 too quickly. Comments + vLLM #37754 are about piecewise CUDA graph mode failing with illegal memory access — full CUDA graph mode works fine on sm_121 with FlashInfer, and is what the Nemotron-3-Ultra working recipe (thread 372680) uses.
Fix:
- Drop
--disable-cuda-graph(let full CUDA graphs engage) - If your SGLang version exposes it: add
--disable-piecewise-cuda-graphdefensively - Newer SGLang versions default
enable_piecewise_cuda_graph=False, so piecewise is off by default — no action needed beyond removing the cuda-graph disable
For GLM-4.7-FP8 specifically, this got me from 8.2 → 9.8 tok/s. Not the headline gain (RDMA was the bigger lever — separate post) but it’s a free 20% by removing a flag that was always overcautious.
Hardware context
- 4× DGX Spark (GB10, sm_121a)
- SGLang built from BTankut source (similar to
lmsysorg/sglang:spark) - ConnectX-7 RoCE, MikroTik 200 GbE switch
Summary of what to do / not do
| Knob | Do |
|---|---|
TORCH_DISTRIBUTED_DEBUG=DETAIL |
Don’t set it. Use NCCL_DEBUG=INFO instead. |
TORCH_NCCL_BLOCKING_WAIT=1 |
Don’t set it. Same reason. |
| EAGLE / speculative-decoding flags | Same on every node. |
--disable-cuda-graph |
Drop it if you had it set defensively. |
--disable-piecewise-cuda-graph |
Defensive yes if your SGLang exposes it. Newer versions default-disable piecewise anyway. |
If you’re seeing collective mismatch errors that look real, EAGLE-induced hangs, or just slower-than-expected decode — try removing the strict-debug flags first, then make EAGLE symmetric, then re-enable full CUDA graphs. Those three together moved me from 0 tok/s (wedged) → 9.8 tok/s on GLM-4.7-FP8 before I found the bigger RDMA lever (separate post).