mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#2230
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 @tproos on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4862
Summary
Qwen3.8-Flash-Next UD-IQ4_XS serves fast (55–74 tok/s decode) but the engine repeatedly dies mid-request with the #267 verify timeout. It happens during longer, tool-heavy chat sessions (web-fetch MCP results, ~15k–40k context). It persists on engine 0.1.55, with
--pipeline-windows 0and with--spec 2. Just before each crash, decode slows down progressively (e.g. 53 → 28 tok/s over ~30 s), and dmesg showsamdgpu_amdkfd_restore_userptr_workerstorms at the same time.System
0.1.55-linux-x86_64-hip-rx9070; also reproduced on 0.1.54--visionstrata launch --model-path /home/thomas/models --context 64k(systemd service)Engine command line (last run):
What I tried (all still crash)
--pipeline-windows 0(+STRATA_PIPELINE_AUTO=0)--resident-budget-gib 34 → 30,--conversation-cache-mib 2048strata update)--spec 4 → 2--spec 0--spec T (T >= 2)One other failure seen once: a 63 s stall in
request: parking the previous conversation -1(RAM available ~16 GB, 57.9 GB resident) followed by an engine restart, before the conversation cache was capped.Logs
Server log:
Engine log (pipelined run):
Free VRAM at verify capture with 96k context was ~550 MiB; with 64k ~690 MiB.
dmesg at the crash times:
No OOM kills.
Notes / guess
The progressive slowdown before each timeout, together with the userptr restore storms, suggests the kernel invalidating and re-pinning the host-RAM expert arena (MMU notifier → KFD userptr restore) under memory or page-cache pressure, with the GPU stalling past the 5 s verify watchdog. Happy to run diagnostics (
STRATA_PARK_TRACE=1, a longer verify timeout, or a debug build) and attach full logs.Reproduce
Chat page, MCP tools on (web-fetch), prompt: "list the changes to llama.cpp this week". The model does 5–8 fetches of GitHub commit pages; the crash usually comes within one or two such sessions.
@github-actions[bot] commented on GitHub (Oct 31, 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:
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
@github-actions[bot] commented on GitHub (Oct 31, 2026):
Thanks, this follows the format now.
@dandandelion commented on GitHub (Nov 1, 2026):
To remove any third-party cause, do you have any overclock in place, especially memory OC?
@tproos commented on GitHub (Nov 1, 2026):
Update with more testing (same setup as the original report, Strata 0.2.9 / engine 0.1.55, HIP build linux-x86_64-hip-rx9070).
Hardware/BIOS verified stock
Crash signature
Not a real gradual slowdown: decode runs ~50–58 t/s, then the token counter freezes completely and the averaged tok/s decays until the watchdog fires. Seen as both -15 (verify timeout) and -6:
[strata] thinking: 993 of budget 31399 (max 41865) tokens, 46.1 tok/s, 29 s
[strata] thinking: 1036 of budget 31399 (max 41865) tokens, 32.0 tok/s, 40 s
[strata] thinking: 1036 of budget 31399 (max 41865) tokens, 24.5 tok/s, 50 s
...
[strata] thinking: 1036 of budget 31399 (max 41865) tokens, 12.6 tok/s, 90 s
strata serve: no progress for 60 s during a request (verify window: waiting for the GPU to finish the window (flags A/B/M raised) 3) - stopping the engine so the server starts it again
That one hung after only 6 tool calls, ~23.7k prompt tokens.
dmesg at the same time (counts are cumulative), escalating right up to the hang:
12:52:27 amdgpu_amdkfd_restore_userptr_worker [amdgpu] hogged CPU for >10000us 35 times
12:56:16 ... 67 times
12:57:00 ... 131 times
Observations
@tproos commented on GitHub (Nov 1, 2026):
Same question with the same model completes reliably under llama.cpp (Vulkan) on this machine, ~16 t/s, 19k tokens, no GPU errors.
@dandandelion commented on GitHub (Nov 1, 2026):
Will you be able to provide journal logs?
@dandandelion commented on GitHub (Nov 1, 2026):
I had the very same issue with my CUDA card and it was the VRAM when exercising certain CUDA paths.
Like yours, Vulkan was working for me too, it was stress tested with vulkan memtest at around 54TBs of VRAM read/write and no errors whatsoever.
Will you be able to test a homogeneous quantization of the model (non-IQ) like the Gyro-M? If Gyro-M works for you without any problem then we’re pretty much having the same card-level problems
@tproos commented on GitHub (Nov 1, 2026):
Tested Gyro-S (Qwen3.8-Flash-Next-Gyro-S-TQ1_0) as suggested, same machine, same Strata 0.2.9 / engine 0.1.55, 64k context, same MCP tools and the same long tool-heavy question.
With UD-IQ4_XS the same question hangs in the verify window after as few as 6 tool calls (~24k prompt tokens). So the hang seems specific to the IQ4_XS model path rather than VRAM or the host.
@tproos commented on GitHub (Nov 1, 2026):
Follow-up on the Gyro tests, @dandandelion:
Correction to my Gyro-S note: Strata's default put Gyro-S on one GPU only, while UD-IQ4_XS ran across both. So I tested further:
So Gyro-M works without problems, as you expected, while UD-IQ4_XS hangs on each card on its own as well as with both. Since the two cards are from different manufacturers, a shared VRAM fault seems less likely to me than something in the IQ4_XS path, but I'm happy to run a VRAM stress test on each card if you can point me to the one you used.
I've saved the journal logs from one of the single-GPU hangs; I can share relevant excerpts if there's something specific you'd like to look for.
@dandandelion commented on GitHub (Nov 2, 2026):
This is the one I used: https://github.com/GpuZelenograd/memtest_vulkan
But, you already have strong evidence that it isn’t the Vulkan that is the problem. So I’ll get straight to the point.
What fixed it for me was downclocking the memory clocks (
fixedis subjective since I cannot verify it outside my tests which is multiple days of inference). This is how it went:Full clock at GDDR6 8001mhz (16002 effective): Inevitable ‘verify hangs’ at random points of decode (sometimes millions of tokens, sometimes just thousands)
-100 offset roughly at 15802 effective: Immediate verify hangs at low context even
-200 offset @ 15602: got approximately ~1.63m tokens across runs
-300 offset @ 15402: This was the stable one for me, multiple days of inference without any error, sure I lost around 5-8% decode but it’s stable.
So if you noticed the pattern, sweeping down the memory clocks, it made the issue worse (-100 offset immediately throws) up to a certain point when it became stable so it depends, you might need to find your stable clock so mileage may vary.
Then again, this is based off of my Xid 13 errors specific to CUDA so this is just a report rather than a definitive fix. #4190 was the thread that pointed me the right way and it explains the problem better. (tho two cards having the same verify hangs are just unlucky if my guess is right that this is hardware-level).
Note that this diagnosis cannot differentiate a card that has a defect (silicon lottery) vs a card that is dying or degrading UNLESS you have some records that IQ4_XS was working perfectly recently then that strongly suggests a degraded/dying card. But we're still right in the ballpark that some heterogeneous models execises certain execution path that our card doesn't like.
@tproos commented on GitHub (Nov 2, 2026):
Follow-up on both suggestions:
STRATA_HC_SPLIT=1, the setting from PiccataPro's A/B test in #4190 (staged crashed, split was clean): my engine 0.1.55 HIP build defaults to "staged". With the setting, the engine log confirms "split" on both cards, but it still hangs. Two runs on --gpu 0,1 hit -15 after 8 and 12 tool calls. (The log calls the cards CUDA0/CUDA1 because the HIP build keeps the CUDA device names. They are the two RX 9070 XTs running through ROCm/HIP.)
Memory downclock (amdgpu.ppfeaturemask=0xffffffff, OD_MCLK on the ASRock Taichi alone, --gpu 0): stock is 1259 MHz. I set 1000, but amdgpu_pm_info shows the card won't go below 1150 MHz under load (about -9%). Two runs at a confirmed 1150 MHz still hit -15, after 6 and 5 tool calls.
Same prompt each time, a long tool-heavy session. Gyro-S and Gyro-M never hang on the same cards, and llama.cpp Vulkan completes the same sessions with the same UD-IQ4_XS model.
Only been using these for a few days, no records with IQ4_XS working perfectly in Strata. Thanks for the report and suggestions though.
@dandandelion commented on GitHub (Nov 2, 2026):
Anyways. If you think Vulkan would work much better for you and you REALLY need the IQ4_XS quant, then I suggest using an alternative. It has specific optimizations for QFN too. Hopefully Niko won’t mind if I share it here (not mine tho): https://github.com/vahpetr/llama.cpp-s1-fork
@alexanderi96 commented on GitHub (Nov 2, 2026):
The
amdgpu_amdkfd_restore_userptr_workerstorms right before each stop are the driver restoring host memory theGPU reads after the kernel invalidated it. On a GPU without XNACK all of the process's queues stay evicted until that
finishes, which looks exactly like a frozen token counter followed by the verify timeout. #4866 has the mechanism and
an ftrace of it. With ~58 GB resident on a 64 GB host, reclaim is the likely trigger.
To confirm, read this before and after a stop:
If it jumps, #3913 has two opt-in fixes. The first takes the GPU's host memory off userptr:
"HSA_USERPTR_FOR_PAGED_MEM": "0", "STRATA_HIP_ARENA_NONCOHERENT": "1", withttm.pages_limitraised so GTT holdsthe resident budget. The second, for when the kernel parameter is not an option, is
STRATA_HIP_MLOCK=1withLimitMEMLOCK=infinityandvm.compact_unevictable_allowed=0. Gyro-M not hanging fits too: at a 98.5% VRAM hitrate the GPU reads far less host memory than UD-IQ4_XS does.
@tproos commented on GitHub (Nov 3, 2026):
No problems since i applied https://github.com/Niko1221/Strata/pull/3913
@bratnieks commented on GitHub (Nov 4, 2026):
HIP 2× RX 9070 XT: pipelined decode verify timeouts after long conversations, engine 0.1.56
Summary
On Linux with two RX 9070 XT cards, a Qwen3.8-Flash-Next SC117 abliterated IQ3_S model served a long conversation (roughly 151k–185k prompt tokens) and then the engine stopped in pipelined decode with a verify timeout. Following an automatic restart, it timed out again. This is an intermittent observation from actual use; the exact input and idle duration have not been captured as a minimal reproduction.
Environment
0.1.56-linux-x86_64-hip-rx9070).--expert-cache auto --vram-reserve-mib 1024 --prefill auto --max-context 262144 --kv int8 --ple-io ram --spec 4 --pipeline-windows 2 --vision --layer-split auto.STRATA_VERIFY_COHERENT=1,STRATA_DOORBELL_STORE=1,STRATA_VERIFY_TRACE=1,GPU_MAX_HW_QUEUES=2;HSA_ENABLE_SDMAunset.Observed sequence (local time UTC−03)
pipelined decode: verify: timed out at layer 30; its GPU waits were released and the GPU finished (#267). The exact request position and time of the timeout are not recorded in the engine log excerpt.pipelined decode: verify: timed out at layer 47; its GPU waits were released but the GPU did not finish within 5 s (#267). Subsequent release log lines report GPU completion at 3234 ms for one window and 0 ms for others; their relation to the individual pipeline windows is not established.The model was configured for 262,144 tokens; the observed successful prompts did not fill the entire context. Before these failures, a different request with 184,668 prompt tokens completed; this is not proof of the position of the failing request.
Kernel / hardware context
A filtered kernel journal for 17:30–18:20 on Nov 4 showed no matching PCIe AER, BadTLP, Machine Check, GPU reset, device-lost or illegal-opcode lines. This is a negative filtered search, not proof of a healthy system. Previous boots had QPI CRC MCEs and PCIe BadTLP/fatal errors, including a GPU lost from PCIe at 01:21 on Nov 4; physical PCIe instability has not been ruled out for the platform. Do not conflate that earlier device-loss event with these later failures.
Prior tests and limitations
--pipeline-windows 0and MTP also timed out at layer 29, before the CPU replacements and QPI BIOS change; it is not a controlled A/B of the current system.--batch-mtp --batch-groups 1test failed in the first pair with SDMA default. WithHSA_ENABLE_SDMA=0, five pairs completed before the user cancelled. This different mode does not establish a fix for single-request pipeline.Sanitized engine excerpts