mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4378] [Engine] dsv41 on HIP gfx1030 (2x RX 6900 XT, Linux): 20-300 s stalls (engine_silence, then 503) are SDMA copies that do not complete after GFXOFF; HSA_ENABLE_SDMA=0 gives 28/28 clean sessions #1939
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#1939
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 @Vop3p on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4378
Area
[Engine]
Desktop app, Terminal or source?
Source (a build)
What happened
On a two-card gfx1030 box the dsv41 engine stalls every few conversations: one window (a decode window, or a chunk of a prompt read) stops for 20-300 s, then continues as if nothing happened; when the stall passes 300 s the server's engine_silence watchdog ends the engine and the next request gets a 503. Over 168 sessions of a fixed 14-prompt loop (GFXOFF at its default) 9 hit the 300 s limit; with a 5 s watchdog in the engine, the 14-session arms showed 0-3 stalls of 20 s or more each (most arms 1-3). Speed between stalls is normal (decode 13-17 tok/s, 3.4K / 4.3K prompts 124 / 167 tok/s).
What the stalls are, from a watchdog I added to the engine (env-gated, off by default; it prints each device thread's layer and stage every 5 s a window stays open, the host-visible values of the hand-off flags and of the CPU lane's answer ring, a VRAM heartbeat that the spin kernels write, and the cards' sysfs busy / power):
layer()/layer_chunk()behind a stream wait.The copies in those places (expert DMA into the ring, the routing's D2H, the two-card bounce hand-off, the source-row replicate) all go through SDMA. With
HSA_ENABLE_SDMA=0(ROCr does every copy with a blit kernel) the same loop ran 28 of 28 sessions with no window over 15.4 s (that one is the cold read of a 3.4K prompt), at the same speed. Disabling GFXOFF on both cards (debugfsamdgpu_gfxoffwritten 0) also gives 0 of 28, which is why I first thought GFXOFF itself was the cause; it is the trigger.HSA_ENABLE_SDMA=0Ruled out on the way (arms of 14-28 sessions each, GFXOFF on): the ds4 conversation slots (
STRATA_DS4_SLOT_KEEP=0),HIP_HOST_COHERENT=1, the host polling a hand-off flag before the device-side wait is queued, doing the cross-card event waits on the host instead of as CP barriers, the hand-off flags and the lane's rings in fine-grained host memory. The kernel log has no amdgpu message during the stalls; the PCIe AER counters are zero and ASPM is off on both cards. Two standalone programs (a kernel polling a host word after the device idled; a 64-byte SDMA copy after 0.5-3 s of idle) do not reproduce it, so it needs the engine's load pattern (the other card busy, several queues, MB-sized copies).This looks like the same root as #884 on the Qwen engine on this machine (SDMA was one of its three necessary conditions, and
STRATA_HIP_ADAPT_KERNEL_COPY=1avoids it), and as #3680's finding on gfx1200 thatHSA_ENABLE_SDMA=0stops the resets. #4090 has the same symptom on CUDA / WSL2, probably a different cause. Two things the engine could do: on HIP, make dsv41's copies kernel copies (as the Qwen engine does for its adaptive swaps), or have setup putHSA_ENABLE_SDMA=0into the environment for gfx103x. The watchdog patch (DS4_STALL_WATCH=1) is in my tree if it is of use.Smallest steps or command that reproduce it
--experts 5 --max-context 32768 --prefill-chunk 4096 --mmap-experts off --dspark auto, GFXOFF at its default (on).HSA_ENABLE_SDMA=0in the engine's environment: no stall in 28 sessions.Reproduction status
Reproduced locally
Strata version
Strata 0.2.7 · engine dsv41 built from v0.2.7 for gfx1030 (plus local opt-in patches: the watchdog above and a few env-gated prompt-path switches, all off in the arms unless named)
Graphics card, memory and system
2x RX 6900 XT 16 GB (gfx1030, PCIe 4.0 x8 each) · Ryzen 5 5600X · 128 GB DDR4 · Ubuntu 26.04, kernel 7.0.0-38, ROCm 10.0 (HIP 7.15), amdgpu.gttsize=98304 amdgpu.runpm=0
Developed with an AI coding assistant; every number above was measured on the machine described.
@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.