mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5358] [Engine] gfx1030: fatal GPU fault in native_mmvq_multi_kernel on a host address, with the MMQ/adaptive-swap workaround active #3194
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#3194
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 @MikiDevLog on GitHub (Nov 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5358
Some of the data collection process (mainly the pinpoint of address where fail occurs and what part of the kernel) and related text was formatted and general A/B testing was assisted by LLM(Q3.8FN) for faster log sweep and basic analysis of where to look at and what to test.
TL:DR
Model is Swift IQ3_S.
One RX 6800 XT (gfx1030, RDNA2) the engine dies with a fatal GPU fault 32 times over 174.2 hours of live
serving (0.18/h) - 16 384-token chunks, real agent traffic - and every single fault is the same:
native_mmvq_multi_kernel(the MMQ prompt kernel).mitigation arms) all 35 addresses are distinct - no page repeats, so this is not one fixed page. There is
a strong skew, though: 23 of 35 (66 %) share the residue
0x7000at 64 KiB granularity (19 end…b7000,4 end
…37000; by chance a 1-in-16 residue would appear ~6 % of the time). Examples:0x7ff440cb7000,0x7fdd17cb7000,0x7fbf47eb7000,0x7fdc84c37000,0x7fc1ae837000.Interpretation, not measurement: a 64 KiB-granular structure with a consistent intra-block offset, not random
eviction. (Address census:
grep -hoE "on address 0x[0-9a-f]+" *.log.)server.pyrestarts the engine, back up in ~40 s,FAULT n→START n+7in the log.The engine on this box already runs the documented gfx1030 workaround from
docs/AMD_HIP.md(
STRATA_HIP_ADAPT_KERNEL_COPY=1; "adaptive-tier swaps copied by a kernel instead of the SDMA engine;a workaround for a gfx1030 hang with MMQ prompts and adaptive swaps (untested curently), and every
start prints it:
STRATA_HIP_ADAPT_KERNEL_COPY=1: adaptive swaps copy with a kernel, not SDMA (#884).The faults keep happening with the workaround active, in the MMQ kernel, on host pages. That is the report:
the existing gfx1030 workaround does not cover this case.
Reproduced on
engine/BUILD.json: local-hip, gfx1030, sourcee1289b3dcbe7ad2b), repo release 0.2.10.rocBLAS 5.6.0.8d1ae90e (startup:
prefill gemm: rocBLAS tuning enabled (112 rows, 76 with a solution, gfx1030)).--kv k8v4(earlierint8),--max-context 262144,--spec 4,--mtpdrafthead,
--pcie-frac 0.35,--pool-workers 4, 4665 expert slots,--conversation-cache-mib 2048,--ple-io direct, adaptive overlap on (STRATA_ADAPT_OVERLAP),STRATA_ADAPT_SIGNAL=host,STRATA_HIP_ADAPT_KERNEL_COPY=1,STRATA_HIP_PROMPT_F16=1,STRATA_SELECT_SIMT=1,STRATA_HC_PERSIST=1,STRATA_IO_THREADS=32.cudaHostRegister PORTABLE ok,MAP_HUGETLB unavailable (needed 23983 2 MiB pages)), pinned KV 2.39 GiB (3.09 GiB on int8), mapped 44.9 GiB gguf, ~1.5 GiB pack weights,~2 GiB projections → engine RSS 51-54.6 GiB of 62 GiB.
MemAvailable4.6-8.7 GiB. PLE/n-gram table26.8-28.8 GiB, read unbuffered under
--ple-io direct(87 GB ofread_bytes). Swap use stayed under320 MiB (no thrash).
ulimit -l"Max locked memory" reports 8 MiB.Tested, did not help
vm.min_free_kbytes66 MiB -> 256 MiB (sysctl -w, live, no reboot; per-zone watermarks grow, free593 → 908 MiB,
MemAvailable−0.4 GiB). A fault occurred ~3 h later (n=1, stated as such). Globalreclaim headroom does not address a repeating offset in one mapping.
HSA_ENABLE_SDMA=0, live serving for 65 min: 2 fatal faults in 0.7 h = 3.04/h against the same-daybaseline of 0.18/h (n=2 weak statistics), and mechanistically it should not help: the swap copies are
already kernel copies (
#884), so SDMA is not on the faulting side.--ple-io mmap(the 26.8-28.8 GiB PLE/n-gram table read through the page cache instead of unbuffereddirect): 1 fatal fault 8 minutes in (23:10:24 start, 23:18:21 fault, same signature,0x7fc1ae837000).Rate ~4/h against 0.18/h. Direction of the signal: mapping more host memory makes it worse, which fits
the address evidence (host pages, MMQ kernel, 64 KiB residue skew) and argues for keeping
--ple-io direct.What i'm trying now.
STRATA_ADAPT_OVERLAP=0- the sullution the docs' own wording points at, since the documented gfx1030 hang is"MMQ prompts and adaptive swaps" and the fault kernel is the MMQ kernel while overlap is on.
Its cost (decode tok/s) is measured the same day and didnt hit as much.
Not tested
--ple-io ram: arithmetically impossible here (46.8 pinned arena + 2.39 pinned KV + 26.8 GiB table =76 GiB on 62 GiB of RAM).
mmapvariant, noiommu=ptkernel-arg run, no raisedmemlock, noSTRATA_SELECT_SIMT=0, no ROCm other than 10.0.0, no engine newer than 0.1.56 (repo 0.2.10 binaries notrebuilt for this box).
STRATA_DENSE_MMQ=1measured +0.7-1.1 % decode, +0.7 % prompt (20/23 prompt turns up) on this pc and not adopted: with the docs' gfx1030 MMQ workaround note, more MMQ exposure looks like more fault exposure. Not measured.STRATA_HIP_ADAPT_KERNEL_COPY=0).Questions
native_mmvq_multi_kernelwith adaptive swaps, beyond the#884kernel-copy workaround? What is the recommended knob on RDNA2 —STRATA_ADAPT_OVERLAP=0,STRATA_ADAPT_SIGNAL,--pcie-frac, or something else?…cb7000page offset, host mapping, MMQ kernel) bereproduced with a specific flag set, so i can produce a deterministic case?
kernel never reads an evicted host page?