mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[GH-ISSUE #622] CUDA illegal memory access in internode_ll::dispatch+0x1050 on B300/RoCE (Blackwell SM100, 16 ranks, hidden=7168) #375
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepEP#375
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @0xjwiley on GitHub (May 6, 2026).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/622
Summary
Running DeepEP V1 on B300/RoCE produces a
CUDA error: an illegal memory access was encounteredinside thedeep_ep::internode_ll::dispatchkernel. compute-sanitizer pinpoints the failing instruction at offset+0x1050of the dispatch kernel — the access is 47 GB out of bounds from a small 8-byte allocation, consistent with a pointer-arithmetic miscomputation. NVSHMEM IBGDA's data plane is functional on the same cluster (verified independently via NVSHMEM'sreduction_on_streamperftest — full latency table below).Environment
Item | Value -- | -- Hardware | NVIDIA B300 SXM6, 8× GPUs/node, x86_64 GPU arch | SM 10.0 (Blackwell B300) Network | RoCE (Ethernet link layer) on Mellanox ConnectX-7 mlx5_0, RoCEv2 with PFC priority 3 / DSCP 24 OS / Container | Ubuntu 24.04, CUDA 13.0.88, PyTorch 2.9.1+cu130, gcc 13.3.0 (SGLang deepseek-v4-b300 family container) DeepEP | 1.2.1 NVSHMEM | recent NVSHMEM build (host + IBGDA transport) — both NVSHMEM init and IBGDA transport selection succeed; the data plane is verified independently below Test | tests/test_low_latency.py --num-processes 8 (2 nodes × 8 GPUs = 16 ranks total) Hidden size | 7168 (default per tests/utils.py)Symptom
NVSHMEM IBGDA transport initializes successfully on all 16 ranks (
Successfully initialized: IBGDA× 16), buffer construction succeeds, andtest_mainenters the dispatch call. The test then crashes at ~47 sec wall time — NCCL ProcessGroupNCCL watchdog catches the IMA on multiple ranks:10 of 16 ranks reported the error directly; the rest were SIGTERM'd by
torch.multiprocessingbefore logging their own. No bandwidth measurement is reached —EOFError: Ran out of inputfromtorch/multiprocessing/spawn.py:217is the parent observing children that died before serializing tracebacks.compute-sanitizer trace pinpoints the failing instruction
The "47 GB out of bounds from a small 8-byte allocation" pattern strongly suggests pointer-arithmetic gone wrong. The kernel's offset computation — per
csrc/kernels/internode_ll.cusource around the dispatch kernel:appears to be computing into unmapped memory on B300 (SM100 / 16 ranks / hidden=7168). Likely candidates:
dst_expert_local_idx,num_max_dispatch_tokens_per_rank, ornum_bytes_per_msghaving a value that produces an out-of-stride offsetDereferencing a small per-PE counter pointer (the 8-byte allocation) as a buffer base
Symmetric heap base pointer being computed from a stale or wrongly-typed source
Independent NVSHMEM IBGDA validation on the same cluster
To rule out NVSHMEM as the source, I ran NVSHMEM's own
reduction_on_streamperftest from the NVSHMEM tree (perftest/host/coll/reduction_on_stream.cpp) on the same B300/RoCE cluster (16 PEs, 2 nodes, same RoCE env). Full latency table printed end-to-end:Cross-node int-sum reduction works for all sizes 128 B → 1 MB. Peak 14 GB/s. Wall time 43 sec. Exit 0 on all 16 ranks. NVSHMEM IBGDA's symmetric heap allocation, on-stream collective, and IBGDA-RDMA writes are functional on this cluster — the bug is therefore inside DeepEP's
internode_ll::dispatchkernel, not in NVSHMEM.Asks for the DeepEP team
I am not asking the team to reproduce the issue from scratch (the B300/RoCE software stack and getting NVSHMEM IBGDA up cleanly on Blackwell B300 has its own moving pieces — happy to coordinate on that separately if useful). What would help most:
A look at
internode_ll::dispatchfor any 16-rank / hidden=7168 /num_max_dispatch_tokens_per_rankassumption that could miscompute on B300 / SM100Whether the kernel was tested on B300/RoCE specifically (not B300/IB)
If V1 isn't going to support B300, an explicit mention in
docs/legacy.mdwould help future users avoid this pitfallIf the fix is non-trivial, V2 (NCCL Gin backend, no NVSHMEM) is the migration path — but most current SGLang inference deployments are still on V1, so a V1 fix or workaround would have immediate impact
Related upstream issues
#550 (Blackwell SM100 support tracker)
#608, #590 (HybridEP on B300 — different code path; their bugs not directly related to ours but useful context for B300 support state)
DeepEP V1 is officially Hopper-only per
docs/legacy.md. We acknowledge B300 / SM100 is unofficial in V1; this report aims to flag a specific kernel-level issue that's reachable for users who pin V1 against a Blackwell cluster.Bundle / evidence
I can share full compute-sanitizer logs (
csan-rank0.txt, ~291 KB), Slurm run logs, and the NVSHMEM-side validation evidence (reduction_on_streamPASSED on the same cluster) on request.Thanks for DeepEP — would love to see this resolved so V1 + Blackwell B300 + RoCE works end-to-end while the V2 migration is in progress.
@0xjwiley commented on GitHub (Jun 9, 2026):
Update: still reproduces on the latest SGLang/DeepEP container build (2026-06-09).
Re-confirming this on a refreshed software stack to keep the report current — the
internode_ll::dispatchillegal memory access persists.Environment (changed vs. original report):
Item | Original report (2026-05-06) | This run (2026-06-09) -- | -- | -- Container | SGLang deepseek-v4-b300 family | sglang-dev-cu13 (current) PyTorch | 2.9.1+cu130 | 2.11.0+cu130 DeepEP | 1.2.1 | 1.2.1 (unchanged) NVSHMEM | recent build | nvidia-nvshmem-cu13 3.6.5 + locally-patched IBGDA plugin GPU | B300 SXM6, "SM 10.0" | B300 SXM6, compute_cap 10.3 (sm_103) Network | RoCE v2, ConnectX-7, PFC prio 3 / DSCP 24 | same (GID idx 3, AF_INET, TC 96, SL 3, mlx5_0) Test | tests/test_low_latency.py --num-processes 8, 2×8 = 16 ranks | sameResult: NVSHMEM IBGDA initializes on all 16 ranks, the test enters dispatch, then crashes ~40–50 s in — the NCCL watchdog catches the CUDA illegal memory access and the parent observes
EOFError: Ran out of input(children died before serializing tracebacks), identical to the original report.Fresh compute-sanitizer trace (memcheck, current build):
Same kernel, same
+0x1050offset, same "8-byte nearest allocation, multi-GB out-of-bounds" pattern as the original report (original ≈46.7 GB OOB; this run 23–49 GB OOB across ranks). Full per-rank log:csan-18890-node0.*.txt(~572 KB), available on request.Notes that may help triage:
The 8-byte nearest-allocation + multi-GB out-of-bounds offset is the same pattern as the original, so the miscomputation is stable across the PyTorch 2.9→2.11 bump (DeepEP unchanged).
Minor correction to the original report: this hardware reports compute_cap 10.3 (sm_103), not SM 10.0. If the
internode_ll::dispatchpointer-arithmetic assumption is tied to an arch/launch-bound that differs on sm_103, that may be relevant (cf. #550, where SM100 support is still landing).Independent NVSHMEM data-plane validation still holds on this cluster (reduction_on_stream), so this remains a DeepEP-kernel issue, not NVSHMEM.
(Happy to share full per-rank compute-sanitizer logs + Slurm logs on request.)