#40948·sglang

[Bug] Triton kernel load_binary fails with "operation not permitted" during decode CUDA graph replay (QSA graph_metadata) on GB10/SM121, cascades into GPU-memory exhaustion and a full driver lockup requiring hard reboot

Author: jried31Created Sep 23, 2026Updated Sep 30, 2026

Checklist

  • I searched related issues but found no solution.
  • The bug persists in the latest version.
  • Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.
  • If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.
  • Please use English. Otherwise, it will be closed.

Describe the bug

Summary

On a single DGX Spark (GB10, SM121), running Qwen3.8-Flash-Next-NVFP4 under sglang serve, the scheduler crashed with RuntimeError: Triton Error [CUDA]: operation not permitted inside _qsa_graph_layout_kernel during decode CUDA-graph replay, after roughly 24 hours of stable serving. The crash itself was handled (SIGQUIT, attempted clean shutdown), but the GPU memory from the dead process was not released. Docker's --restart unless-stopped policy relaunched the container within about a minute, before the driver had recovered, and the new process's allocation attempts failed repeatedly with NV_ERR_NO_MEMORY. Shortly after, the NVIDIA driver's internal RM API lock became stuck, held by an sglang::schedul thread, which blocked every other process sharing the GPU — including the desktop's own nvidia-modeset driver. The entire machine (not just the container) became unresponsive and required a hard power-cycle to recover; it was frozen for approximately 9.5 hours before being manually reset.

Hardware / Environment

  • Hardware: DGX Spark (GB10, SM121, unified memory)
  • Driver: NVIDIA 580.159.03, CUDA 13.0
  • Kernel: Ubuntu 22.04.5 LTS, 6.17.0-1021-nvidia
  • Docker image: lmsysorg/sglang:dev-cu13-qwen38flashnext
  • Build commit: 593134d17a6eb0d0fc5f71a970cd2e9dc8e26e8b
  • Model: nvidia/Qwen3.8-Flash-Next-NVFP4, --quantization modelopt_fp4
  • Launch config (relevant excerpt): tp_size=2, attention_backend=flashinfer, linear_attn_backend=triton, mamba_backend=triton, decode CUDA graph enabled (cuda_graph_config.decode.backend=full), prefill CUDA graph auto-disabled (multimodal incompatibility)
  • No Xid driver fault codes were logged around the incident — this does not appear to be an ECC/hardware fault.

Steps to Reproduce

Not reliably reproducible on demand; occurred once after ~24 hours of otherwise-normal serving (periodic health checks + light request traffic). Suspect it is related to sustained CUDA-graph replay of the QSA (Qwen Sparse Attention) decode path on SM121 — see related issues below, which document other GB10/SM121-specific instability in the same subsystem.

Actual Behavior — Full Timeline (times below are UTC as logged by the container; local timezone PDT = UTC-7)

1. Initial fault — 2026-09-23 06:32:47 TP0:

[TP0] Scheduler hit an exception: Traceback (most recent call last):
  File ".../sglang/srt/managers/scheduler.py", line 5610, in run_scheduler_process
    scheduler.run_event_loop()
  ...
  File ".../sglang/srt/model_executor/runner/decode_cuda_graph_runner.py", line 1430, in load_batch
    attn_backend.init_forward_metadata_out_graph(fb_view)
  File ".../sglang/srt/layers/attention/hybrid_linear_attn_backend.py", line 1047, in init_forward_metadata_out_graph
    attn_backend.init_forward_metadata_out_graph(
  File ".../sglang/srt/layers/attention/qwen_sparse_attn_backend.py", line 751, in init_forward_metadata_out_graph
    self._replay_cuda_graph_metadata(
  File ".../sglang/srt/layers/attention/qwen_sparse_attn_backend.py", line 941, in _replay_cuda_graph_metadata
    self._replay_cuda_graph_metadata_gpu(
  File ".../sglang/srt/layers/attention/qwen_sparse_attn_backend.py", line 1056, in _replay_cuda_graph_metadata_gpu
    launch_graph_metadata(
  File ".../sglang/srt/layers/attention/qsa/graph_metadata.py", line 185, in launch_graph_metadata
    _qsa_graph_layout_kernel[(bs + 1,)](
  File ".../triton/runtime/jit.py", line 370, in <lambda>
    return lambda *args, **kwargs: self.run(grid=grid, warmup=False, *args, **kwargs)
  File ".../triton/runtime/jit.py", line 760, in run
    launch_metadata = kernel.launch_metadata(grid, stream, *bound_args.values())
  File ".../triton/compiler/compiler.py", line 485, in launch_metadata
    self._init_handles()
  File ".../triton/compiler/compiler.py", line 468, in _init_handles
    self.module, self.function, self.n_regs, self.n_spills, self.n_max_threads = driver.active.utils.load_binary(
RuntimeError: Triton Error [CUDA]: operation not permitted

[06:32:47] SIGQUIT received. signum=None, frame=None. It usually means one child failed.
[06:32:47] Sleeping 5 seconds before crash diagnostics to let GPU activity settle.
[06:32:52] No live scheduler processes found; skipping py-spy and CUDA coredump.
[06:32:52] kill_process_tree called: parent_pid=1, include_parent=True, pid=1

2. Automatic restart into a still-broken GPU state — 2026-09-23 06:38:06 to 06:39:07 (~5 minutes later, after Docker's unless-stopped policy relaunched the container):

NVRM: nvCheckOkFailedNoLog: Check failed: Out of memory [NV_ERR_NO_MEMORY] (0x00000051)
  returned from _memdescAllocInternal(pMemDesc) @ mem_desc.c:1359

(repeated dozens of times over ~1 minute, plus one instance from rmStatus @ system_mem.c:356)

3. Driver-level deadlock — 2026-09-23 06:43:38:

INFO: task nvidia-modeset/:2496 blocked for more than 122 seconds.
      Tainted: G           O        6.17.0-1021-nvidia #21-Ubuntu
task:nvidia-modeset/ state:D stack:0 pid:2496 tgid:2496 ppid:2
 os_acquire_rwlock_read+0x50/0xe8 [nvidia]
 portSyncRwLockAcquireRead+0x10/0x30 [nvidia]
 rmapiLockAcquire+0x26c/0x2f0 [nvidia]
 ...
INFO: task nvidia-modeset/:2496 <reader> blocked on an rw-semaphore likely owned by task sglang::schedul:546372 <writer>
      os_acquire_rwlock_write+0x50/0xe8 [nvidia]
      portSyncRwLockAcquireWrite+0x10/0x30 [nvidia]
      rmapiLockAcquire+0x1f8/0x2f0 [nvidia]
      ...

4. Full freeze. Kernel log goes essentially silent immediately after step 3. The machine did not recover on its own; the next boot record is ~9.5 hours later, consistent with a required hard power-cycle. No Xid codes were logged at any point.

Expected Behavior

At minimum, a fatal error in one inference request should not be able to deadlock the NVIDIA driver for the entire machine (including unrelated processes like the desktop compositor). Additionally, the automatic container restart should not begin reallocating GPU memory before confirming the driver has actually released the prior process's allocations, since that retry-into-a-bad-state appears to be what triggered the subsequent lock contention.

Possibly Related Issues

  • #36558 — QSA decode has no working kernel path on SM121 (GB10 / DGX Spark); different failure mode (resolver gate rejects SM121 entirely) but same subsystem (QSA) and same hardware.
  • #37633 — CUDA illegal memory access in QSA extend forward at high concurrency, suppressed by CUDA_LAUNCH_BLOCKING=1 / --disable-overlap-schedule.
  • #19799 — Triton attention + CUDA graphs crash on GB10/sm_121a with illegal memory access on warmup; closed with --disable-cuda-graph as the confirmed workaround. Same hardware and failure category (Triton kernel + CUDA graph replay crash on SM121), though a different specific error and crash point than this report.
  • PR #38851 — Fixes memory-safety bugs (uninitialized scratch buffer, int32 offset overflow) in the QSA paged sparse-decode gather kernel (sparse_attn.py, qwen_sparse_attn_backend.py). Does not appear to touch graph_metadata.py/_qsa_graph_layout_kernel, so likely does not cover this specific crash site, but establishes that this subsystem has known, actively-being-fixed memory-safety issues on this hardware.
  • #11658 — DGX Spark (GB10, sm_121a) support tracking issue; confirms GB10 support is still incomplete/in development as of this report.

Workaround Applied

  • Disabled decode CUDA graph capture (--disable-decode-cuda-graph) as a stability mitigation, based on the precedent in #19799, trading some decode throughput for avoiding this crash class.
  • Configured kernel.hung_task_panic=1 / kernel.panic=10 at the OS level so that if the driver deadlocks again, the machine auto-reboots within roughly two minutes instead of hanging indefinitely until a manual power-cycle.

Neither of these addresses the root cause in Triton/sglang; they only bound the blast radius. Filing this primarily so the load_binary/operation not permitted failure mode in graph_metadata.py is tracked, and so the driver-lockup-on-OOM-retry pattern (step 2→3 above) is visible to maintainers who may want to gate the container restart on confirmed GPU recovery, independent of the original Triton fault.

Reproduction

Steps to Reproduce

Not reliably reproducible on demand; occurred once after ~24 hours of otherwise-normal serving (periodic health checks + light request traffic). Suspect it is related to sustained CUDA-graph replay of the QSA (Qwen Sparse Attention) decode path on SM121 — see related issues below, which document other GB10/SM121-specific instability in the same subsystem.

Environment

Python: 3.12.3 (main, Jul 15 2026, 23:46:41) [GCC 13.3.0] CUDA available: True GPU 0: NVIDIA GB10 GPU 0 Compute Capability: 12.1 CUDA_HOME: /usr/local/cuda NVCC: Cuda compilation tools, release 13.0, V13.0.88 CUDA Driver Version: 580.159.03 PyTorch: 2.13.0+cu130 sglang: 0.0.0.dev1+g593134d17 sglang-kernel: 0.4.6.post1 flashinfer_python: 0.6.18 flashinfer_cubin: 0.6.18 flashinfer_jit_cache: 0.6.18+cu130 triton: 3.7.1 transformers: 5.12.1 torchao: Module Not Found numpy: 2.3.5 aiohttp: 3.14.3 fastapi: 0.141.1 huggingface_hub: 1.30.0 interegular: 0.3.3 modelscope: 1.39.1 orjson: 3.12.0 outlines: 0.1.11 packaging: 26.3 psutil: 7.2.2 pydantic: 2.13.5 python-multipart: 0.0.32 pyzmq: 27.2.0 uvicorn: 0.52.4 uvloop: 0.22.1 vllm: Module Not Found xgrammar: 0.2.1 openai: 2.6.1 tiktoken: 0.14.0 anthropic: 1.3.0 litellm: Module Not Found torchcodec: Module Not Found NVIDIA Topology: GPU0 NIC0 NIC1 NIC2 NIC3 CPU Affinity NUMA Affinity GPU NUMA ID GPU0 X NODE NODE NODE NODE 0-19 0 N/A NIC0 NODE X PIX NODE NODE NIC1 NODE PIX X NODE NODE NIC2 NODE NODE NODE X PIX NIC3 NODE NODE NODE PIX X

Legend: X = Self SYS = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI) NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node PHB = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU) PXB = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge) PIX = Connection traversing at most a single PCIe bridge NV# = Connection traversing a bonded set of # NVLinks

NIC Legend: NIC0: rocep1s0f0 NIC1: rocep1s0f1 NIC2: roceP2p1s0f0 NIC3: roceP2p1s0f1

ulimit soft: 1024