[GH-ISSUE #5134] RDNA3 (gfx1100 / RX 7900 XTX): prefill aborts with 'the draft layer''s K/V: an illegal memory access was encountered' after very long-context requests (MTP on) #2401

Open
opened 2026-11-04 01:59:00 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @mcfooog on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5134

Note: this box runs the RDNA3 fork (nicejunjie/Strata-rdna3, gfx1100 HIP build) that tracks this project; the crash is in the shared draft-layer K/V prefill path, so I am reporting here in case it is a general engine issue. Happy to file against the fork instead if you prefer.

Summary

On an AMD Radeon RX 7900 XTX (gfx1100) running the RDNA3 fork, the engine crashes during a
prefill step with:

strata serve: prefill: the draft layer's K/V: an illegal memory access was encountered

It reproduces after serving very-long-context requests (~50k–72k prompt tokens) while MTP
speculative decoding is enabled. The wrapper detects the dead engine and restarts it, which
reloads ~46.8 GiB of weights (~4 min), during which /health reports loaded: false and the
service is unavailable. Observed 3 crashes in one day (~4 h and ~7.5 h apart).

Environment

item value
OS / kernel Ubuntu, Linux ai-server 6.8.0-147-generic #147-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 24 11:33:16 UTC 2026 x86_64
GPU AMD Radeon RX 7900 XTX (gfx1100), Card Model 0x744c, 24 GB VRAM
ROCm 6.4.4-129
Host RAM ~125 GB, no swap
Engine build /models/ai/Strata-rdna3/build-hip/strata (HIP/RDNA3 build)
Repo revision 309f0c8f8cef010f62746f80caf677c68e7141f9 (git describe → no tags; labeled "0.1.43 + RDNA3 kernels")
Model Qwen3.8-Flash-Next IQ3_S GSQ-RCO abliterated (pack iq3_s, 2 GGUF shards)
API port 8080, /health, /v1/chat/completions

Engine launch args (from the restart banner in the log)

--serve
--pack /models/Strata-data/packs/iq3_s
--native  /models/qwen-Flash-next-fei/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00001-of-00002.gguf
--ple-gguf /models/qwen-Flash-next-fei/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00002-of-00002.gguf
--expert-profile /models/ai/Strata/data/expert-profile.bin --expert-cache auto
--prefill auto --max-context 262144 --ple-io ram
--kv int8 --kv-resident 32768 --vram-reserve-mib 1792
--conversation-cache-mib 16384 --conversation-cache-slots 8
--mtp /models/Strata-data/mtp/rt --spec 4 --spec-min-p 0.5 --prompt-cache 16
--mtp-q4 all --mtp-window 4096 --pool-workers 18 --stats --vision

Relevant to the crash: MTP speculative decoding is ON (--mtp, --spec 4, --mtp-q4 all,
--mtp-window 4096), context is huge (--max-context 262144), VRAM is nearly full (see
~1.5–1.6 GiB free messages below).

Symptoms / reproduction

The failure is consistent: serve a request with a very large prompt (tens of thousands of
tokens), then the next prefill aborts. Three occurrences on 2026-11-03:

# time (UTC) prompt tokens of the request that preceded the crash engine restart (engine "started" banner)
1 04:10:43 50,277 2026-11-03 04:10:43
2 08:32:43 68,936 2026-11-03 08:32:43
3 16:07:52 71,961 2026-11-03 16:07:52

Approximate reproduction: process one very long-context completion (e.g. 50k–72k token prompt),
then issue another request whose prefill touches the MTP draft-layer K/V → illegal memory access.

Engine log evidence

24713: strata serve: prompt 50277 tokens = 50134 reused + 143 read in 781 ms (183.0 tok/s), 253 generated in 2371 ms (106.7 tok/s), drafts accepted 212 of 212, 16 checkpoints
24714: strata serve: decode expert cache hit rate: 89.9% (106940 hits / 118981 lookups); 4859 more read by the GPU over PCIe or from another GPU (3.9% of all 123840 routed)
24715: strata serve: KV streaming: 98.11% of 247355304 block reads hit VRAM, 18843.7 MiB read from RAM
24716: strata serve: suffix drafts: 40 windows, 200 of 200 drafts accepted
24717: strata serve: prefill: the draft layer's K/V: an illegal memory access was encountered
24718: [strata] 2026-11-03 04:10:43 engine started: ... (wrapper reload)
--- (same pattern at 27154, prompt 68936 tokens, restart 08:32:43) ---
--- (same pattern at 36839, prompt 71961 tokens, restart 16:07:52) ---

Note the fully-accepted speculative drafts (200 of 200, 212 of 212, 260 of 260) immediately
before the failing prefill, and that the fault is reported specifically for the draft layer's
K/V
.

Kernel / amdgpu log evidence (matching the crash)

Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu: [gfxhub] page fault
    (src_id:0 ring:24 vmid:8 pasid:32770, for process strata pid 2114479 thread strata pid 2114479)
Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu:   in page starting at address 0x00007de419efd000 from client 10
Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu: GCVM_L2_PROTECTION_FAULT_STATUS:0x00000000
Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu:          Faulty UTCL2 client ID: CB/DB (0x0)
Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu:          MORE_FAULTS: 0x0
Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu:          WALKER_ERROR: 0x0
Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu:          PERMISSION_FAULTS: 0x0
Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu:          MAPPING_ERROR: 0x0
Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu:          RW: 0x0
Nov 03 16:06:27 ai-server kernel: amdgpu: sq_intr: error, detail 0x00000000, type 2, sh 1, priv 1, wave_id 0, simd_id 0, wgp_id 0
   (many repeated sq_intr type 2, priv 1 lines)

Also during/after the reload, VRAM is extremely tight:

strata verify: capturing the 6-token window (1634 MiB of VRAM free)
strata verify: capturing the 3-token window (1554 MiB of VRAM free)
... (down to ~1502 MiB free)

Analysis / hypothesis

  • The fault is reported at prefill of the MTP draft layer's K/V, i.e. in the speculative
    (draft) path, not the main model prefill.
  • It only triggers after very large prompts; the immediately preceding request shows heavy
    KV-streaming (18–27 GiB read from RAM) and near-total VRAM occupancy (~1.5 GB free).
  • page fault ... GCVM_L2_PROTECTION_FAULT_STATUS + sq_intr type 2, priv 1 indicates the GPU
    executed an access outside the mapped VA range for the draft-layer K/V allocations — consistent
    with a draft-layer K/V buffer being under-sized / stale / freed-and-reused when context grows
    past a boundary, or with an insufficient --vram-reserve-mib at these sizes.
  • Working hypotheses worth a maintainer's check:
    1. Draft-layer K/V allocation is sized for a smaller context than --max-context, so a long
      prefill writes past it.
    2. Draft K/V pointer/offset isn't reset correctly across the "reused prompt" / suffix-draft path
      after an ultra-long request.
    3. VRAM reserve (--vram-reserve-mib 1792) is too small when the conversation cache is at
      --conversation-cache-mib 16384 with 8 slots and long KV residency.

Workarounds currently in place

  • Wrapper auto-restart (systemd Restart=on-failure + outer server.py relaunch) keeps the box
    self-healing, but each crash = ~4–5 min of loaded:false downtime.
  • Considering disabling MTP draft (--spec) and/or capping context as a stability workaround
    (loses speculative-decoding speed).
  • Would like to try the newer opt-in STRATA_MTP_HIP_PRIO / STRATA_MTP_STAGE0 paths if they
    address draft-layer K/V lifetime.

Request

  1. Is this a known issue for RDNA3/gfx1100 with MTP + long context?
  2. Any recommended settings to avoid it (draft K/V sizing, --vram-reserve-mib, --mtp-window,
    --spec, --conversation-cache-slots) without fully disabling MTP?
  3. If it's a genuine bug, can the draft-layer K/V allocation/offset be validated against
    --max-context (with an assertion instead of a GPU page fault)?

Happy to provide the full engine log and dmesg on request.

Originally created by @mcfooog on GitHub (Nov 3, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5134 _Note: this box runs the RDNA3 fork (nicejunjie/Strata-rdna3, gfx1100 HIP build) that tracks this project; the crash is in the shared draft-layer K/V prefill path, so I am reporting here in case it is a general engine issue. Happy to file against the fork instead if you prefer._ ## Summary On an AMD Radeon RX 7900 XTX (gfx1100) running the RDNA3 fork, the engine crashes during a **prefill** step with: ``` strata serve: prefill: the draft layer's K/V: an illegal memory access was encountered ``` It reproduces **after serving very-long-context requests (~50k–72k prompt tokens)** while MTP speculative decoding is enabled. The wrapper detects the dead engine and restarts it, which reloads ~46.8 GiB of weights (~4 min), during which `/health` reports `loaded: false` and the service is unavailable. Observed **3 crashes in one day** (~4 h and ~7.5 h apart). ## Environment | item | value | |---|---| | OS / kernel | Ubuntu, `Linux ai-server 6.8.0-147-generic #147-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 24 11:33:16 UTC 2026 x86_64` | | GPU | AMD Radeon RX 7900 XTX (gfx1100), Card Model `0x744c`, 24 GB VRAM | | ROCm | `6.4.4-129` | | Host RAM | ~125 GB, no swap | | Engine build | `/models/ai/Strata-rdna3/build-hip/strata` (HIP/RDNA3 build) | | Repo revision | `309f0c8f8cef010f62746f80caf677c68e7141f9` (`git describe` → no tags; labeled "0.1.43 + RDNA3 kernels") | | Model | Qwen3.8-Flash-Next IQ3_S GSQ-RCO abliterated (pack `iq3_s`, 2 GGUF shards) | | API | port 8080, `/health`, `/v1/chat/completions` | ### Engine launch args (from the restart banner in the log) ``` --serve --pack /models/Strata-data/packs/iq3_s --native /models/qwen-Flash-next-fei/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00001-of-00002.gguf --ple-gguf /models/qwen-Flash-next-fei/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00002-of-00002.gguf --expert-profile /models/ai/Strata/data/expert-profile.bin --expert-cache auto --prefill auto --max-context 262144 --ple-io ram --kv int8 --kv-resident 32768 --vram-reserve-mib 1792 --conversation-cache-mib 16384 --conversation-cache-slots 8 --mtp /models/Strata-data/mtp/rt --spec 4 --spec-min-p 0.5 --prompt-cache 16 --mtp-q4 all --mtp-window 4096 --pool-workers 18 --stats --vision ``` Relevant to the crash: **MTP speculative decoding is ON** (`--mtp`, `--spec 4`, `--mtp-q4 all`, `--mtp-window 4096`), context is huge (`--max-context 262144`), VRAM is nearly full (see `~1.5–1.6 GiB free` messages below). ## Symptoms / reproduction The failure is consistent: serve a request with a very large prompt (tens of thousands of tokens), then the **next** prefill aborts. Three occurrences on 2026-11-03: | # | time (UTC) | prompt tokens of the request that preceded the crash | engine restart (engine "started" banner) | |---|---|---|---| | 1 | 04:10:43 | 50,277 | 2026-11-03 04:10:43 | | 2 | 08:32:43 | 68,936 | 2026-11-03 08:32:43 | | 3 | 16:07:52 | 71,961 | 2026-11-03 16:07:52 | Approximate reproduction: process one very long-context completion (e.g. 50k–72k token prompt), then issue another request whose prefill touches the MTP draft-layer K/V → illegal memory access. ## Engine log evidence ``` 24713: strata serve: prompt 50277 tokens = 50134 reused + 143 read in 781 ms (183.0 tok/s), 253 generated in 2371 ms (106.7 tok/s), drafts accepted 212 of 212, 16 checkpoints 24714: strata serve: decode expert cache hit rate: 89.9% (106940 hits / 118981 lookups); 4859 more read by the GPU over PCIe or from another GPU (3.9% of all 123840 routed) 24715: strata serve: KV streaming: 98.11% of 247355304 block reads hit VRAM, 18843.7 MiB read from RAM 24716: strata serve: suffix drafts: 40 windows, 200 of 200 drafts accepted 24717: strata serve: prefill: the draft layer's K/V: an illegal memory access was encountered 24718: [strata] 2026-11-03 04:10:43 engine started: ... (wrapper reload) --- (same pattern at 27154, prompt 68936 tokens, restart 08:32:43) --- --- (same pattern at 36839, prompt 71961 tokens, restart 16:07:52) --- ``` Note the fully-accepted speculative drafts (`200 of 200`, `212 of 212`, `260 of 260`) immediately before the failing prefill, and that the fault is reported specifically for **the draft layer's K/V**. ## Kernel / amdgpu log evidence (matching the crash) ``` Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu: [gfxhub] page fault (src_id:0 ring:24 vmid:8 pasid:32770, for process strata pid 2114479 thread strata pid 2114479) Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu: in page starting at address 0x00007de419efd000 from client 10 Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu: GCVM_L2_PROTECTION_FAULT_STATUS:0x00000000 Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu: Faulty UTCL2 client ID: CB/DB (0x0) Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu: MORE_FAULTS: 0x0 Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu: WALKER_ERROR: 0x0 Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu: PERMISSION_FAULTS: 0x0 Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu: MAPPING_ERROR: 0x0 Nov 03 16:06:27 ai-server kernel: amdgpu 0000:05:00.0: amdgpu: RW: 0x0 Nov 03 16:06:27 ai-server kernel: amdgpu: sq_intr: error, detail 0x00000000, type 2, sh 1, priv 1, wave_id 0, simd_id 0, wgp_id 0 (many repeated sq_intr type 2, priv 1 lines) ``` Also during/after the reload, VRAM is extremely tight: ``` strata verify: capturing the 6-token window (1634 MiB of VRAM free) strata verify: capturing the 3-token window (1554 MiB of VRAM free) ... (down to ~1502 MiB free) ``` ## Analysis / hypothesis - The fault is reported at **prefill of the MTP draft layer's K/V**, i.e. in the speculative (draft) path, not the main model prefill. - It only triggers after very large prompts; the immediately preceding request shows heavy KV-streaming (`18–27 GiB read from RAM`) and near-total VRAM occupancy (`~1.5 GB free`). - `page fault ... GCVM_L2_PROTECTION_FAULT_STATUS` + `sq_intr type 2, priv 1` indicates the GPU executed an access outside the mapped VA range for the draft-layer K/V allocations — consistent with a draft-layer K/V buffer being under-sized / stale / freed-and-reused when context grows past a boundary, or with an insufficient `--vram-reserve-mib` at these sizes. - Working hypotheses worth a maintainer's check: 1. Draft-layer K/V allocation is sized for a smaller context than `--max-context`, so a long prefill writes past it. 2. Draft K/V pointer/offset isn't reset correctly across the "reused prompt" / suffix-draft path after an ultra-long request. 3. VRAM reserve (`--vram-reserve-mib 1792`) is too small when the conversation cache is at `--conversation-cache-mib 16384` with 8 slots and long KV residency. ## Workarounds currently in place - Wrapper auto-restart (systemd `Restart=on-failure` + outer `server.py` relaunch) keeps the box self-healing, but each crash = ~4–5 min of `loaded:false` downtime. - Considering disabling MTP draft (`--spec`) and/or capping context as a stability workaround (loses speculative-decoding speed). - Would like to try the newer opt-in `STRATA_MTP_HIP_PRIO` / `STRATA_MTP_STAGE0` paths if they address draft-layer K/V lifetime. ## Request 1. Is this a known issue for RDNA3/gfx1100 with MTP + long context? 2. Any recommended settings to avoid it (draft K/V sizing, `--vram-reserve-mib`, `--mtp-window`, `--spec`, `--conversation-cache-slots`) without fully disabling MTP? 3. If it's a genuine bug, can the draft-layer K/V allocation/offset be validated against `--max-context` (with an assertion instead of a GPU page fault)? Happy to provide the full engine log and `dmesg` on request.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 3, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6609365140 --> @github-actions[bot] commented on GitHub (Nov 3, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
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#2401
No description provided.