mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3680] [Engine] gfx1200 (RX 9060 XT), 0.1.45: page fault ("prefill copy_i32: unspecified launch failure") and a batched-prefill hang, both on the first chunk after a reused 3,358-token prefix with a full conversation cache; MES then fails and… #1523
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1523
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 @codywb on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3680
Area
Engine
Desktop app, Terminal or source?
Source build (tag v0.1.45, commit
477ac13),serve/server.py, Linux.What happened
A client sends independent chat requests one at a time. Every request is a new conversation that starts with the same 3,358-token system prompt (thinking off,
max_tokens4096, prompts of about 4.6K-5K tokens, answers of 100-450 tokens). Strata reuses the shared prefix from the conversation cache on each request (prompt N tokens = 3358 reused + M read), and the cache is full (parked=4, one eviction per request).227 of these requests completed normally today. Two failures, both on the first prompt chunk after the reused 3,358 tokens, right after a park with the cache full:
strata serve: no progress for 60 s during a request (reading the prompt (batched): layer 43 of the prompt chunk from token 3358), exit -6.MES(0) failed to respond to msg=REMOVE_QUEUE, followed by a MODE1 reset (VRAM lost).prefill copy_i32: unspecified launch failure.The last engine lines before each failure:
This looks like the pattern described in #1569: stalled reads sat at exactly the length of a saved shared prefix, for new conversations sharing a system prompt. #579 (gfx1201, batched-prefill stall) may be related.
Smaller, separate bug: the crash message after the 11:46 fault quoted the wrong log line. The server reported "The engine stopped itself because it had stopped making progress ... no progress for 60 s ... layer 43 of the prompt chunk from token 3358", but that line was from the 06:59 crash (it appears once in the engine log). The 11:46 engine ended with
prefill copy_i32: unspecified launch failure, after 9 s, not 60.A third reset today (09:15, kernel 7.2.6) started with a desktop gfx job timing out while Strata was serving the same workload, followed by the same MES failure. I can't tell whether that one is connected.
Smallest steps or command that reproduce it
Not deterministic. Serve with
--conversation-cache-mib 8192 --conversation-cache-slots 4and send a stream of new conversations that share a ~3.4K-token system prompt plus 1-2K tokens of per-request text, one at a time. Here the failures came after 6 and roughly 220 requests of that stream.Reproduction status
Intermittent: 2 failures in about 229 requests of this shape today.
Strata version
0.1.45 (tag commit
477ac13), engine built from source for gfx1200 only. CMake options: Release, HIP,PREFILL_MMQ,Q6K_EXPERTS,MMQ_KQUANTS,CMAKE_HIP_ARCHITECTURES=gfx1200. ROCm from TheRock wheels 7.10.0a20251120.Graphics card, memory and system
ROCR_VISIBLE_DEVICES).Model, size and settings
--expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --max-context 524288 --kv int8 --mmap-experts --kv-resident 32768 --vision --vram-reserve-mib 4096 --rope-scaling yarn --rope-scale 2 --yarn-orig-ctx 262144 --conversation-cache-mib 8192 --conversation-cache-slots 4HSA_ENABLE_SDMA=0 HSA_USERPTR_FOR_PAGED_MEM=0 GPU_PINNED_MIN_XFER_SIZE=1048576 STRATA_HIP_WMMA=1 STRATA_TOPK_OLD=1 STRATA_SCORES_THREAD=0 STRATA_QUANT_GATHER=1 STRATA_ROUTE_TAIL_SKIP=0 STRATA_PCIE_FRAC_DEFAULT=old STRATA_PF_FUSED=0 STRATA_HC_Q8=0 STRATA_GFX12_CHUNK=0 STRATA_MTP_HIP_PRIO=0, plus the hipBLASLt gfx1200 tuning table.Logs
Kernel log at 11:46 (7.3.0):
Full engine, server and kernel logs, and the device coredump from the 09:15 reset, are available on request.
@codywb commented on GitHub (Oct 22, 2026):
Follow-up: checked against v0.2.2, a stopgap, and two related threads.
Still applies on v0.2.2. I compared v0.1.45 (
477ac13) with v0.2.2 (011c9e6, engine 0.1.47) along the failing path:copy_i32andcheck()insrc/prefill/kernels.cu, their single-GPU callers insrc/prefill/prefill.cpp, the mapped grouping tables set up there (grp_host/grp_dev), andsrc/core/conversation_*. None of it changed. I'm building v0.2.2 for gfx1200 now and will retest on it and post the result with the engine's version line.Stopgap since the report. At 04:01 UTC I added
--conversation-cache-min-tokens 16384, so short requests like the two that failed are no longer parked and no eviction runs before them. Long conversations are still parked. I'll report whether the failures stop.Two closed threads describe the same chain:
REMOVE_QUEUEfailure, MODE1 reset). You noted there that the stalled reads sat at the length of a saved shared prefix; both of mine were on the first chunk after a reused 3,358-token prefix.Diagnostics I can run, one at a time. Which would help you most?
"--prompt-cache", "0", as you asked for in #1569.STRATA_GROUP_COPY=1, which takes the grouping tables off mapped host memory (the fault was a read of a host address).AMD_SERIALIZE_KERNEL=3on a repro run, to name the kernel that faults rather than thecheck()that sees it.The wrong crash message noted at the end of the report is also unchanged in v0.2.2:
death_note()inserve/server.pysearches the last 256 KB of the log, across engine restarts, for the watchdog line.@codywb commented on GitHub (Oct 22, 2026):
Reproduced on v0.2.2, with the prompt cache off, so the conversation cache and prefix reuse are not required.
While qualifying v0.2.2 (
011c9e6, engine 0.1.47, same gfx1200 source build and model as above) I rantools/quant_quality.py prompt(20 prompts of up to 1,000 tokens, first-token logits). Its engine line includes--prompt-cache 0 --kv fp16 --max-context 1512 --expert-cache 1500 --pcie-frac 0. This arm had 0.2.2's defaults on: queue priming ("opened 2 GPU queues in a fixed order") and the Linux file-tier defaults. 16 prompts completed; the 17th hung:Then the same chain as before (times JST):
So this is the batched-prefill hang itself, on the first chunk of a fresh short prompt; the reused prefix in my earlier two cases was probably incidental. It also answers the
--prompt-cache 0question from #1569: the hang still happens with it. The host side was idle (pool parked, no I/O wait, no paging), so the GPU stopped making progress on its own.Context: it was 1 hang in roughly 60 to 70 minutes of mixed testing across 0.1.45 and 0.2.2, the only one in that session. All the other arms, including 0.2.2 with the new defaults pinned off, ran clean, but that is too little to blame queue priming or the file-tier defaults. Kernel 7.3.0 (mainline, with the MES12 fixes 288cc4a54a00 and 41eb81a30665); per-queue reset recovered the compute queues, but the desktop's gfx job on the same card then timed out and the card fell back to MODE1. I've switched production to 0.2.2 with the new defaults pinned off and will report how often this recurs. The full engine stderr and kernel log are available, and I can run a build or settings you want on this card.
@lbbit commented on GitHub (Oct 23, 2026):
Adding data from a second machine with the same symptom, in case it helps to narrow it down.
Setup: 2x AMD Radeon RX 7900 XTX 24 GB (gfx1100, Navi 31), ROCm 7.2.4, kernel 6.8.0, Strata 0.1.45 built from source for gfx1100, HIP backend. Model: Qwen3.8-Flash-Next-Uncensored UD-IQ4_XS,
--max-context 262144 --kv int8 --spec 4 --expert-cache auto --prefill auto --layer-split auto.What we see: the engine aborts in prefill and the kernel resets the card:
Things we ruled out (each with a controlled test):
--vram-reserve-later-mib974 / 2048 / 4096, plus--vram-reserve-mibon the first card) all crash the same way, and the crash happens at every prompt size that also worked before.doorbell=0x1202appeared on the other card.amdgpu.cwsr_enable=0. The advice in ROCm/TheRock#9217 made it worse on gfx1100: the crash moved to the second card with a different doorbell (0x1004), the error changed toverify: layer 35 never rang (unspecified launch failure), and it now triggers on a 162-token prompt instead of a 43K one. (That report was on gfx1103, so it may not carry over to Navi 31.)Machine checkevents are present in the kernel log (909 over several days) but they are not concurrent with the resets, and they do not correlate with the crashes.What does fix it for us (as a workaround, not a real fix):
With those three, a 132,285-token prefill passes 6/6 rounds with zero
GPU reset/MES failedin the kernel log. Removing onlyHSA_ENABLE_SDMA=0brings the crash back on the first round, so the SDMA queue appears to be the main trigger. The cost is roughly 20% slower prefill (SDMA off means the copies and the compute no longer overlap).One more data point that may be relevant: the kernel log shows this before the crashes, growing exponentially:
svm_range_restore_workrestores SVM page tables, andHSA_USERPTR_FOR_PAGED_MEM=0is exactly the path that goes through SVM. We are not sure whether that is a cause or a symptom.If it helps, we can also share the full kernel-log tail and the exact engine arguments.
@codywb commented on GitHub (Oct 23, 2026):
Thanks @lbbit, useful data. On my gfx1200 card those three settings don't prevent it:
HSA_USERPTR_FOR_PAGED_MEM=0,GPU_PINNED_MIN_XFER_SIZE=1048576,HSA_ENABLE_SDMA=0) have been in my engine's environment since 2026-10-19 (the last two since 2026-10-14). Since then the kernel has loggedMES(0) failed to respond to msg=REMOVE_QUEUEon the 9060 XT 17 times between 2026-10-20 and 2026-10-23 (some are the auto-restart failing again on a card that was still stuck), 4 of them ending in a MODE1 reset. That includes the--prompt-cache 0repro in my comment above.svm_range_restore_work ... hogged CPU(0 across 12 boots, 2026-10-18 to now).So the SDMA trigger you found looks like a separate path from this hang, at least on gfx12.
Two more things ruled out here since my last comment:
DevicePolicy=closed+DeviceAllow) stopped the second card from faulting during resets, but the hang itself came back 17 minutes in.Now testing the upstream GC 12.0.0 firmware from 2026-10-16 (MES 0x97, was 0x91) on kernel 7.3.0 mainline, with the device restriction kept. I'll report the result.
@codywb commented on GitHub (Oct 23, 2026):
Update (2026-10-23): a +150 MHz / -50 mV overclock-undervolt on my RX 9060 XT was aggravating this. At stock clocks the stall has not reproduced.
Since my last comment I ran a full root-cause pass instead of one fix at a time. The relevant finding for this issue:
OD_SCLK_OFFSET +150 MHz,OD_VDDGFX_OFFSET -50 mV, power cap raised 170 → 182 W. It had been validated only under llama.cpp on Vulkan (where the card peaked at ~124 W) and was not in my earlier reports. Under Strata's prefill the card draws only ~100–120 W, so the cap never engages and it sits pinned at the raised boost ceiling (3,46x–3,51x MHz at ~1.08–1.09 V) for the whole prefill.REMOVE_QUEUE/SUSPENDfailures → per-queue reset, plusillegal memory accessfaults), and it was flat across Strata 0.1.41/0.1.45/0.2.2, kernels 7.1.5/7.2.6/7.3.0, MES firmware 0x91/0x97, with and without the desktop on the card, with and without the conversation cache.Two caveats so nobody over-reads this:
gather_native_group/copy_i32names in the fault messages are just the first launch to see a sticky error; the faulting addresses were all different (one write, one aperture violation), consistent with a garbage GPU-computed address rather than a stale pointer.If you are hitting this:
cat /sys/class/drm/card*/device/pp_od_clk_voltageandcat .../hwmon/hwmon*/power1_capare worth a look before anything else, especially if the profile was tuned for games or Vulkan. Reset to stock isecho r > pp_od_clk_voltage; echo c > pp_od_clk_voltageas root (or remove the offsets in LACT and restartlactd; LACT re-applies its profile after every GPU reset, so clearing the sysfs values alone does not stick).Versions checked: 0.2.2 is still the latest release (engine 0.1.47); nothing newer touches this path. Kernel 7.3.0, GC 12.0.0 firmware from linux-firmware 2026-10-16 (MES 0x97), ROCm 7.10.0a20251120 as pinned by
setup.py.[GH-ISSUE #3680] [Engine] gfx1200 (RX 9060 XT), 0.1.45: page fault ("prefill copy_i32: unspecified launch failure") and a batched-prefill hang, both on the first chunk after a reused 3,358-token prefix with a full conversation cache; MES then fails and…to [GH-ISSUE #3680] [Engine] gfx1200 (RX 9060 XT), 0.1.45: page fault ("prefill copy_i32: unspecified launch failure") and a batched-prefill hang, both on the first chunk after a reused 3,358-token prefix with a full conversation cache; MES then fails and…@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.