mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #937] [gfx1030] HSA_STATUS_ERROR_MEMORY_APERTURE_VIOLATION in gdn_step_commit_kernel after a few long fresh prefills #408
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#408
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 @lucaravera-glitch on GitHub (Oct 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/937
Summary
On an RX 6800 (gfx1030, Navi 21) the engine reliably dies after a small number of
long, fresh (non-KV-cached) prefills, with:
The faulting kernel is always
strata::kernels::gdn_step_commit_kernel, and the serversurfaces it as
the engine stopped unexpectedly (exit code -13)followed by an automaticengine restart.
Short/cached sessions are stable — a full 5/5 agent benchmark (~20 requests) runs clean.
The failure scales with fresh prefill volume per engine lifetime, not with
--max-context: prompts of 10k tokens fault just as readily as 34.5k, after 2-7 freshprefills.
Environment
v0.1.39, commit6f32ec0, engine built from source1002:73BF, gfx1030 (Navi 21)Region 0 ... [size=16G]) — 256 MiB before enabling Above 4G Decodingamdgpufrom kernel7.2.5-3-omarchy(Omarchy/Arch)7.14.0a20260612(community gfx103X wheel), matching the kernel vintageLaunch args:
Reproduction
prompt guarantees no KV reuse).
Expect a fault within 2-7 completed prefills. Prefill throughput before the fault is
normal (~330 tok/s); nothing degrades, it simply dies between requests.
Representative run (34,507-token fresh prefills, faulting lifetime marked):
Aggregate: 16 clean / 3 faults across 4 engine lifetimes.
Ruled out
--vram-reserve-mib 3072(2990 MiB free at load)--prefill 2048Region 0 = 256M)vm.nr_hugepages=24000, arena switches tohugetlb 2 MB pages--kv-resident 65536, no streaming at startupfreenever near OOMContrast case
With prompts that ride the KV cache (only the first turn prefills ~8k, later turns reuse),
a full agent benchmark ran 5/5 tasks, ~20 requests, 0 faults:
So the practical risk scales with how often fresh long contexts are started, not with
session length or
--max-context.Related: confirms #884
On this same setup, before settling on
--pcie-frac 0 --adapt-every 0, prefill stalledindefinitely (
said nothing for 600 s) in roughly 1 in 3 long requests — the"verify hangs after a long prompt" signature in #884. Two of the three knobs named there
(adaptive expert swaps, PCIe sharing) being off does remove that hang, which is offered as
confirmation data for #884. The aperture fault reported here survives both flags, so it
looks like a separate defect.
Workarounds so far
reload is disruptive mid-session.
--max-context, BAR size, or hugepages removes the fault.Happy to provide full logs (
strata-iq3_s.log,strata-server.out) and a standalonerepro script if useful.
@Niko1221 commented on GitHub (Oct 7, 2026):
0.1.40.2 adds STRATA_DBG_GDN=1: gdn_step_commit_kernel then checks the window count it reads from device memory and prints a line instead of faulting if it is out of range. Could you run your loop of long fresh prefills once with STRATA_DBG_GDN=1 and post what the log says?
@lucaravera-glitch commented on GitHub (Oct 7, 2026):
Ran it, plus two controls that turned out to matter more than the main test.
0.1.40.2 +
STRATA_DBG_GDN=1: 30 fresh 34,507-token prefills clean, one enginelifetime, no restart. Same again with the expert arena on
hugetlb 2 MB pages— another30 clean. No
strata DBG:line, noHSA_STATUS_ERROR_MEMORY_APERTURE_VIOLATION, noMemory access fault. Version confirmed from the engine's own banner (session is up (engine 0.1.40.2)), the env var verified in the engine's/proc/environ, and the memorypath confirmed from the startup line (
MAP_HUGETLB unavailable ... vm.nr_hugepages=0forthe THP run,
hugetlb 2 MB pagesfor the other), so both branches were exerciseddeliberately.
mul_mat_q<(ggml_type)20, 64, false>,Page not present, mid-prefill at 4,096 tokWhat I can and can't say:
fresh prefills total (C+D). So this neither confirms nor refutes the window-count
hypothesis — it only shows 0.1.40.2 survived 60 where 0.1.39 died at 18-19 in both
memory configurations.
difference on either version. I had 24,000 × 2 MiB reserved for the earlier runs and
have since turned that off again — worth knowing since it costs 48 GiB and, here, ~6%
of prefill throughput (355-358 tok/s with hugetlb vs ~379 on THP).
is from the code where you originally saw the fault.
Still happy to do the A/B I offered: 0.1.39 with only
dfc8f74cherry-picked, same loop.That is the only way to test the window-count hypothesis on the code where the fault
actually appeared — C and D can't distinguish "0.1.40.2 fixed it" from "it didn't
reproduce", with
0c86bbe fix(gdn)and352cad8 F7: a one-token window commits itselfin between. Alternatively I can keep pushing past 30 on 0.1.40.2 until it either faults
under DBG or you'd call it fixed.
One unrelated observation while I was there: 0.1.39 returned exactly 2 generated tokens
on all 37 requests of the control runs, while 0.1.40.2 often generates all 32 the probe
asks for (24/30 in run D). Same prompt,
temperature: 0,reasoning_effort: none. Maybe expected; mentioning it in case it isn't.
Logs available on my side:
strata-iq3_s.log(D),.hugetlb01402(C),.hugetlb0139(B),.thp0139(A).@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.