[GH-ISSUE #954] [BUG] 0.1.39: fused int8 prompt experts (STRATA_PF_FUSED=1) + #583 byte-budget ring → kernel hang, prefill mmq: iota: unknown error on sm_120 (RTX 5090, WSL2) #417

Closed
opened 2026-11-04 01:42:51 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @Krypto-Whitehat on GitHub (Oct 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/954

Summary

On engine 0.1.39, STRATA_PF_FUSED=1 on a native IQ3_XXS pack hangs a CUDA kernel (GPU pegged at 100%, host blocked) during the first prompt, then the engine dies with prefill mmq: iota: unknown error (exit code 1). The same configuration ran ~4,700 successful requests on 0.1.37. Disabling the #583 byte-budget ring (STRATA_RING_BYTES=0) while keeping STRATA_PF_FUSED=1 makes 0.1.39 work again, so the regression is in the ring's interaction with the fused prompt path, not the fused kernels themselves.

Environment

  • Engine: 0.1.39 (6f32ec0, built 2026-10-04, CUDA 13.0 build)
  • GPU: NVIDIA GeForce RTX 5090 Laptop, compute capability 12.0 (Blackwell), 24 GiB VRAM
  • Driver: KMD 617.14 / CUDA UMD 13.4, WSL2 (Ubuntu 24.04, kernel 6.18.33.2-microsoft-standard-WSL2), WSL 2.7.11.0
  • Model: Qwen3.8-Flash-Next IQ3_XXS native pack (125B MoE), expert arena 39.97 GiB resident in hugetlb RAM, expert cache auto → 6116 slots (13.27 GiB VRAM), --prefill auto:16384 → prompt chunk auto: 16384 tokens, a 512-slot ring, --kv int8, --mtp spec 4
  • 277 MiB VRAM free after full load

Reproduction

Config env STRATA_PF_FUSED=1 (default ring), serve or generate mode, any prompt:

strata generate: prompt chunk auto: 16384 tokens, a 512-slot ring
strata serve: the prompt path borrows 2980 CUDA0 cache slots (6.47 GiB)
... engine dies: "prefill mmq: iota: unknown error" (exit code 1)

Observed as a hang first: with CUDA_LAUNCH_BLOCKING=1 the host blocks inside a CUDA call while the GPU sits at 100% utilization indefinitely (14+ min) — consistent with a stuck kernel rather than a clean fault; iota is just the first ck(cudaGetLastError()) checkpoint that surfaces the sticky error.

Control runs on the same machine/binary:

env result
STRATA_PF_FUSED=1 (ring default on) hang / prefill mmq: iota: unknown error
STRATA_PF_FUSED=0 (ring on) works — 7260-token prompt at ~1397 tok/s prefill
STRATA_PF_FUSED=1 + STRATA_RING_BYTES=0 works — fused marker logs, prompt + decode complete

0.1.37 history (same log file): session is up (engine 0.1.37) + prompt experts on the fused int8 kernels markers followed by thousands of completed requests — fused worked fine before the f-139b merge set.

Suspected area

#583 commits between the builds: 895a77b (streamed ring is a byte budget), a93c2ac (chunk and ring share one budget), 8c968a5/5423a69/5f19911 (ring on by default). Possibly also 220e0e8 (fused layout buffer sizing gating on fused_ring()). Whatever changed the ring's sizing/lifetime now gives the fused kernels a bad buffer — worth checking ring slot ownership when fused_layout() shrinks GU/H/Xq while the byte-budget ring still assumes full-size rows.

Workaround

"env": {"STRATA_PF_FUSED": "1", "STRATA_RING_BYTES": "0"} in strata-*.json — fused prompt experts stay on and work, the byte-budget ring is off.

Impact

High for fused-path users on Blackwell: deterministic engine death on first prompt (and the WDDM driver then reports GPU access blocked by the operating system to nvidia-smi until the WSL VM is restarted, masking the failure as a GPU-detection problem).

Originally created by @Krypto-Whitehat on GitHub (Oct 5, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/954 ## Summary On engine 0.1.39, `STRATA_PF_FUSED=1` on a native IQ3_XXS pack hangs a CUDA kernel (GPU pegged at 100%, host blocked) during the first prompt, then the engine dies with `prefill mmq: iota: unknown error` (exit code 1). The same configuration ran ~4,700 successful requests on 0.1.37. Disabling the #583 byte-budget ring (`STRATA_RING_BYTES=0`) while keeping `STRATA_PF_FUSED=1` makes 0.1.39 work again, so the regression is in the ring's interaction with the fused prompt path, not the fused kernels themselves. ## Environment - Engine: 0.1.39 (`6f32ec0`, built 2026-10-04, CUDA 13.0 build) - GPU: NVIDIA GeForce RTX 5090 Laptop, compute capability 12.0 (Blackwell), 24 GiB VRAM - Driver: KMD 617.14 / CUDA UMD 13.4, WSL2 (Ubuntu 24.04, kernel 6.18.33.2-microsoft-standard-WSL2), WSL 2.7.11.0 - Model: Qwen3.8-Flash-Next IQ3_XXS native pack (125B MoE), expert arena 39.97 GiB resident in hugetlb RAM, expert cache auto → 6116 slots (13.27 GiB VRAM), `--prefill auto:16384` → `prompt chunk auto: 16384 tokens, a 512-slot ring`, `--kv int8`, `--mtp` spec 4 - 277 MiB VRAM free after full load ## Reproduction Config env `STRATA_PF_FUSED=1` (default ring), serve or generate mode, any prompt: ``` strata generate: prompt chunk auto: 16384 tokens, a 512-slot ring strata serve: the prompt path borrows 2980 CUDA0 cache slots (6.47 GiB) ... engine dies: "prefill mmq: iota: unknown error" (exit code 1) ``` Observed as a hang first: with `CUDA_LAUNCH_BLOCKING=1` the host blocks inside a CUDA call while the GPU sits at 100% utilization indefinitely (14+ min) — consistent with a stuck kernel rather than a clean fault; `iota` is just the first `ck(cudaGetLastError())` checkpoint that surfaces the sticky error. Control runs on the same machine/binary: | env | result | |---|---| | `STRATA_PF_FUSED=1` (ring default on) | hang / `prefill mmq: iota: unknown error` | | `STRATA_PF_FUSED=0` (ring on) | works — 7260-token prompt at ~1397 tok/s prefill | | `STRATA_PF_FUSED=1` + `STRATA_RING_BYTES=0` | works — fused marker logs, prompt + decode complete | 0.1.37 history (same log file): `session is up (engine 0.1.37)` + `prompt experts on the fused int8 kernels` markers followed by thousands of completed requests — fused worked fine before the f-139b merge set. ## Suspected area #583 commits between the builds: `895a77b` (streamed ring is a byte budget), `a93c2ac` (chunk and ring share one budget), `8c968a5`/`5423a69`/`5f19911` (ring on by default). Possibly also `220e0e8` (fused layout buffer sizing gating on `fused_ring()`). Whatever changed the ring's sizing/lifetime now gives the fused kernels a bad buffer — worth checking ring slot ownership when `fused_layout()` shrinks GU/H/Xq while the byte-budget ring still assumes full-size rows. ## Workaround `"env": {"STRATA_PF_FUSED": "1", "STRATA_RING_BYTES": "0"}` in `strata-*.json` — fused prompt experts stay on and work, the byte-budget ring is off. ## Impact High for fused-path users on Blackwell: deterministic engine death on first prompt (and the WDDM driver then reports `GPU access blocked by the operating system` to nvidia-smi until the WSL VM is restarted, masking the failure as a GPU-detection problem).
Author
Owner

@Krypto-Whitehat commented on GitHub (Oct 5, 2026):

PR #958 proposes a fix: fused_layout() gated the buffer shrink on mmq_plan().any (one layer) while the run loop picks the expert path per layer on mmq_plan().layer[l]. A layer MMQ does not cover keeps the FP16 path and writes the full chunk's routed rows into the fused-size GU/H/Xq — at a 16384-token chunk about 16x past the end of a buffer sized for stream_all_min() - 1 = 1023 tokens, which is what a hung kernel followed by prefill mmq: iota one prompt later is made of.

Not runtime-verified on my side (no CUDA toolchain or Blackwell card here), and the reporter's rig is what should confirm it. If a 0.1.39 build with only that patch still hangs on the reported config, the new guard names the layer and the chunk instead of hanging, which would be the next thing to look at.

<!-- gh-comment-id:5998234915 --> @Krypto-Whitehat commented on GitHub (Oct 5, 2026): PR #958 proposes a fix: `fused_layout()` gated the buffer shrink on `mmq_plan().any` (one layer) while the run loop picks the expert path per layer on `mmq_plan().layer[l]`. A layer MMQ does not cover keeps the FP16 path and writes the full chunk's routed rows into the fused-size `GU`/`H`/`Xq` — at a 16384-token chunk about 16x past the end of a buffer sized for `stream_all_min() - 1` = 1023 tokens, which is what a hung kernel followed by `prefill mmq: iota` one prompt later is made of. Not runtime-verified on my side (no CUDA toolchain or Blackwell card here), and the reporter's rig is what should confirm it. If a 0.1.39 build with only that patch still hangs on the reported config, the new guard names the layer and the chunk instead of hanging, which would be the next thing to look at.
Author
Owner

@Niko1221 commented on GitHub (Oct 6, 2026):

Thanks for the detailed report and the three control runs. Cause: on 0.1.39 the fused layout shrinks the MoE buffers when any layer takes MMQ, but a layer MMQ has no tile for (it keeps the FP16 path) writes the whole chunk into them. The byte-budget ring raised the chunk to 16384, which is why STRATA_RING_BYTES=0 hid it. Fixed in 0.1.40: such a layer now runs on the fused kernels, so no layer touches the shrunk buffers at full chunk size. Please retest 0.1.40 with STRATA_PF_FUSED=1 and the default ring; if it still hangs, send the first 40 lines of the log (it prints which MMQ tiles are missing) and we will look again.

<!-- gh-comment-id:6010954712 --> @Niko1221 commented on GitHub (Oct 6, 2026): Thanks for the detailed report and the three control runs. Cause: on 0.1.39 the fused layout shrinks the MoE buffers when any layer takes MMQ, but a layer MMQ has no tile for (it keeps the FP16 path) writes the whole chunk into them. The byte-budget ring raised the chunk to 16384, which is why STRATA_RING_BYTES=0 hid it. Fixed in 0.1.40: such a layer now runs on the fused kernels, so no layer touches the shrunk buffers at full chunk size. Please retest 0.1.40 with STRATA_PF_FUSED=1 and the default ring; if it still hangs, send the first 40 lines of the log (it prints which MMQ tiles are missing) and we will look again.
Author
Owner

@Niko1221 commented on GitHub (Oct 7, 2026):

The overflow behind this was fixed in 0.1.40 (the fused layout is only used when every layer takes it). 0.1.40.2 adds the backstop that was left from #958: if the buffers and a layer's expert path ever disagree, the prompt stops with 'the fused layout's MoE buffers are too small for layer N' instead of hanging. Thanks to Krypto-Whitehat for the analysis. Could you retest on 0.1.40.2 with STRATA_PF_FUSED=1 and the default ring?

<!-- gh-comment-id:6037905251 --> @Niko1221 commented on GitHub (Oct 7, 2026): The overflow behind this was fixed in 0.1.40 (the fused layout is only used when every layer takes it). 0.1.40.2 adds the backstop that was left from #958: if the buffers and a layer's expert path ever disagree, the prompt stops with 'the fused layout's MoE buffers are too small for layer N' instead of hanging. Thanks to Krypto-Whitehat for the analysis. Could you retest on 0.1.40.2 with STRATA_PF_FUSED=1 and the default ring?
Author
Owner

@Krypto-Whitehat commented on GitHub (Oct 8, 2026):

@Niko1221 Brate ovo je Fixed, hvala ti.

<!-- gh-comment-id:6059216286 --> @Krypto-Whitehat commented on GitHub (Oct 8, 2026): @Niko1221 Brate ovo je Fixed, hvala ti.
Author
Owner

@Niko1221 commented on GitHub (Oct 13, 2026):

Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.

If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.

<!-- gh-comment-id:6155996764 --> @Niko1221 commented on GitHub (Oct 13, 2026): Thanks for the report. To keep the tracker current we are closing issues older than three days: [0.1.44](https://github.com/Niko1221/Strata/releases/tag/v0.1.44) is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1. If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#417
No description provided.