mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1569] Strata v0.1.41 - AMD/HIP RX 9070 XT (gfx1201), Ubuntu 26.04.1 - the engine stopped unexpectedly (exit code -6) #627
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#627
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 @CAarset on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1569
Similar to https://github.com/Niko1221/Strata/issues/579 - short prompt works correctly, long prompt errors out after some thinking:
Fresh Strata install
v0.1.41, running./setup.shchoosing all defaults. Ran via DeepSeek Harness (manually setting context size same as Strata served context size).sudo dmesg | grep -i -E 'killed process|out of memory'prints empty;sudo dmesg -T | grep -iE "amdgpu|timeout|MES|reset|fault"printsMy Strata log: strata-q2_0.log
amd-smiafter Strata errored:amd-smiafter restarting Strata (./setup.sh):As per my understanding of https://github.com/Niko1221/Strata/issues/579, I should need no specific environment variables to make this work, but I'm willing to test whatever configuration.
@Vop3p commented on GitHub (Oct 9, 2026):
Two things that removed a similar long-prompt stall on 2x RX 6900 XT (gfx1030, Linux; the chain is in #884), in case they carry to gfx1201. Both are cheap to try:
STRATA_HIP_ADAPT_KERNEL_COPY=1(in 0.1.41: the adaptive expert swaps copy with a kernel instead of SDMA). On this box the stock 0.1.41 layer split read 128K prompts with it at 0 stalls where it stalled without, at no measurable speed cost (#1657,split-stockagainstsplit-stock-kc)./sys/kernel/debug/dri/N/amdgpu_gfxoff; it is a reference count, so read it back - 0 means off) the stall went from 10/10 to 0/10. #579's finding that a desktop rendering on the same card is the trigger fits that picture: a display changes when the card power-gates. Running the compute card without a display attached is the cheapest version of the test.None of this is gfx1201-tested; it is what the stall looked like on gfx1030 and what made it go away.
Developed with an AI coding assistant; every number above was measured on 2x RX 6900 XT (gfx1030, PCIe 4.0 x8 each) / Ryzen 5 5600X, ROCm 10.0.
@CAarset commented on GitHub (Oct 9, 2026):
Thank you for the suggestions. I put
"STRATA_HIP_ADAPT_KERNEL_COPY": "1"in the env section of server-config.json and restarted, then used a Python script to set gpxoff to 0, confirming with(Note: It was 1 prior to my script. Unsure if this requires a deeper-level fix to make a permanent change to the filesystem. Did not restart the system.)
After this, I was surprised by an exit code -15 (also "the engine stopped unexpectedly"); however, the next long prompt gave -6 again. Thus, the issue is not resolved. I've attached my log.
strata-q2_0.log
@Vop3p commented on GitHub (Oct 9, 2026):
Reading the second log, this is not the gfx1030 GPU stall I pointed at - sorry for the detour. Both aborts are the serve watchdog ending the engine after a prompt chunk made no progress for 60 s (exit -15 is the server's SIGTERM, -6 the abort when that is ignored), and the stall reports say where the time went:
The engine runs with
--mmap-expertsand without--ple-io ram, so every expert the cache does not hold is a page fault on the drive: the first 25K-token prompt read 63.8 GB from storage (389K major faults), and the four requests before the abort read 100-180 GB each. The GPU side is idle in both reports (all pool workers sleeping, host idle for 115-146 s). Two things to try, in this order:--mmap-expertsso the experts live in a pinned RAM arena (the Q2_0 set is about 31 GiB: 7156 slots = 9.21 GiB, 24576 pairs in all), and add--ple-io ram. With 27 GiB available while 28 GiB is resident this should fit; ifsetup.shchose mmap because of a RAM check,free -gduring a long prompt will show whether there is room.STRATA_WATCHDOG_IO_S=600(the #1407 path) stops the watchdog from killing a slow-but-progressing read, and a 16-32K--max-contextkeeps the per-request file reads smaller.STRATA_HIP_ADAPT_KERNEL_COPYand GFXOFF can go back to their defaults; they address a different stall (GPU stuck with the host waiting on it), which is not what these reports show.Developed with an AI coding assistant; every number above comes from the attached log, read on a 2x RX 6900 XT box.
@CAarset commented on GitHub (Oct 9, 2026):
Thank you again for the input! Unfortunately,
--ple-io raminstead of--mmap-expertsdoes not seem viable on my system; even with the smallest q2_0 model,--max-context 4096 --kv q4_0,STRATA_WATCHDOG_IO_S=600and no mtp, I am not able to load with my 32GB RAM + the 16GB of the 9070 XT, printingWith various other configuration setups I tried from other threads,
./setup.shinstead either stalls forever, blacks out my computer or is killed by the system.I was also able to confirm that plugging out the DPort cable before prompting did not prevent the -15 exit error.
@CAarset commented on GitHub (Oct 9, 2026):
So I made some partial progress, and produced some interesting logs:
With
--mmap-experts(seemingly similar for--resident-experts) as well asI almost totally prevented errors (though a -15 caught me eventually), but instead got to enjoy five-minute-long no-progress reads that do eventually, suddenly resolve; Strata then continues (and writes are quite fast). Not sure how to interpret that - log attached, as well as the raw copy-pasted output of the ./setup.sh terminal (the latter showcases something interesting - the long, no-progress reads sometimes progressed backwards).
strata-q2_0.log
setup_terminal_printout.txt
So in conclusion, it seems like all the kills so far are indeed watchdog kills from Strata itself worrying that it hasn't made progress - even though it will eventually "suddenly make progress" after sitting still for ~5m on each read. While this is frustratingly slow, it's at least enough that I can begin to get some outputs in finite time - improvement!
As for more RAM, there's obvious budget issues, what with current prices; it's a consideration, but no clean solution.
@Niko1221 commented on GitHub (Oct 10, 2026):
Thank you for the careful report. Exit code -6 is an abort inside the engine, and the kernel log you pasted shows nothing from amdgpu at that time. To see which it is, please send the engine's own output from the start through the abort (the console or the log file setup prints), the prompt length that fails and your context size, and whether it also happens with --kv int8 and a context of 32768.
@CAarset commented on GitHub (Oct 11, 2026):
Thank you for your response. If I understand it correctly, your response is to my original post? Since then, @Vop3p has helped me understand the -6 exit better, and I've worked around it with the watchdog settings mentioned in my last message before yours. The console log is also there (setup_terminal_printout.txt). To clarify, this now leads to a consistent -15 error:
The issue does not seem sensitive to the length of my original prompt, but naturally occurs after ~5-10 minutes working on any longer task (with plenty of functioning intermediate reasoning and tool calls first). It has happened on both --kv q4_0 and on --kv int8, with every context size I've tried, as well as the Coder model - I spotted nothing substantially different in the logs for any of those, but I'm willing to send you anything you think is valuable tomorrow.
@rebuilt commented on GitHub (Oct 11, 2026):
This looks like the same failure we see on
gfx1201(Radeon AI PRO R9700) with long prompts, so here is our data in case it helps correlate the exit code -6.Rig: AMD Radeon AI PRO R9700 (
gfx1201), Ubuntu, backendhip, 62 GiB RAM / 2.0 GiB swap (full), ~2.1 GiB VRAM free under load. Model Qwen3.8-Flash-Next IQ3_S (GSQ-RCO, 2 shards), engine 0.1.39,--max-context 131072 --kv int8 --kv-resident 32768 --prefill 4096 --spec 4 --mmap-experts.Before tuning, one session hit a crash/restart loop: the engine log shows 47 boots, 14
no progress/stall reports, and one hard fault:The stalls were all the long-prompt prefill path — never the same layer:
reading the prompt (batched): layer N of the prompt chunk from token 0,waiting for the GPU (attention, router) at layer L ... from token X,done up to token 43034. The stall report shows the host parked on a GPU wait (expert pool 0/0 jobs, 11/11 workers parked and sleeping, 0 threads in D-state, verify window "GPU rang 0"):What stabilised it on this machine (removed the restart noise; did not fix the underlying GPU-wait stall):
--vram-reserve-mib 3072— at 700 MiB the driver started paging and prefills slowed ~7x; a higher reserve removed that.STRATA_WATCHDOG_S=300— 60 s and 180 s fired on prefills that were merely slow, causing restarts that weren't real hangs.engine_silence_s: 600instrata-<model>.jsonso the server outwaits the engine watchdog.STRATA_PF_FUSED;STRATA_PREFILL_GROUP_GATHER=0,STRATA_RING_BYTES=0.After that: 301 requests, 0 stalls, 0 faults over ~5.5 h. The residual GPU-wait stall still exists (seen once at 3072 MiB reserve) — I have the full engine logs (
bench-iq3_s-128k.log.before-trace-*, 47 boots + 14 stall reports) if you want them here or on #481.@CAarset commented on GitHub (Oct 12, 2026):
Updated error report for 0.14.3:
System specifications
Run 1
Clean install of Strata and q2_0; benchmarked upon install but no calibration or optimisation, default config; 256k context size. Short prompt triggering a lot of actions:
Result
Over ~2h, after multiple steps of reading, thinking and tool calling - normal behaviour, if rather slow progress - the model times out long enough that DSH hits
and ends the turn; interestingly, Strata is still working (everything after the last "starting the engine" is Strata running while DSH thinks that the turn is dead). DSH reports Tokens/s as 43.
Several exit codes -6 happened along the way, but did not lead to unrecoverable errors, as Strata graciously restarted:
However, the last restart was too long and killed DSH's turn. I then manually ended Strata.
Old result
In 0.14.1, this would have behaved similarly up to the ~5-7 minute mark, then consistently hit unrecoverable errors (-6 or -15, depending on which watchdog timeout options were enabled).
Files
Notes
Run 2
Identical to the previous run, except 32K context size. "fit_max_tokens": true was also set to avoid max tokens issues in DSH (otherwise leads to max tokens error; tested but without its own report since it's not really a Strata issue).
Result
After about ~10 minutes of thinking, the model hits -6 and does not survive; old 0.14.1-style error.
All minor observations are identical (in particular, GPU usage would again plummet during read after a brief period of high usage).
Files
Please note that by my own error, this log contains runs 1 and 2, as well as a brief failed (max-tokens-related) run in-between. From here on, I am deleting and regenerating the log per run.
Run 3
Identical to run 2, except tried
suggested elsewhere. Result identical to Run 2.
Files
STRATA_RESIDENT_PIN = 0: strata-q2_0.jsonRun 4
Identical to run 3, except replaced the
STRATA_RESIDENT_PIN=0with--vram-reserve-mib 3072as proposed by @rebuilt . Other watchdog settings not used. -6 exit engine restarts still present, but not enough error to knock out the agent. Eventually, DSH stopped withwhich feels like an unrelated error.
Files
--vram-reserve-mib 3072: strata-q2_0.jsonRun 5
Identical to run 4, except added
to the config. Very similar to run 1 - a fair bit of normal-looking thinking, reading and tool calling over a very long period of time (it is currently at 2h - I do not have the opportunity to keep monitoring it tonight). The usual extreme stalling in reads seems to be the main reason it hasn't finished yet, as speed is nominally fine (reported by DSH as 44 tok/s).
Files
--vram-reserve-mib 3072and watchdog settings: strata-q2_0.jsonConclusion
Just as @rebuilt has concluded, the issue seems to be a GPU stall on reads, as repeatedly evidenced in my logs. Most (possibly all?) of my intermediate error reports come from either Strata's watchdogs or the harness timing out in response to the stall. Disabling watchdogs and timeouts in principle allows Strata to ""function"", but the extreme stall on reads means results are impractically slow even when the system delivers passable tokens/s.
I only now saw that the
STRATA_TRACE = 1env variable exists; if helpful, I am willing to run with that (and any other combination of configs) tomorrow.@eclgo commented on GitHub (Oct 13, 2026):
I used swift-iq3_xxs with 220K context in win11 24H2 via
Strata v0.1.43 + DSH 0.2.0-rc.2 in the official standard mode, and also encountered below issue in a long agentic task. I found two subagents were called, it may be the root cause to cause time out issue. So I asked the local model to create a custom standard mode without any subagent, so far below error gone.
"This turn failed pi-ai stream idle timeout after 300000ms"
key H/W:RTX 3080 Ti Laptop GPU 16G + 64G RAM
@cjdell commented on GitHub (Oct 13, 2026):
Sorry for the LLM generated response but it's better at reporting this stuff than me. I figured the more detail the better as agents are probably going to be ones reading it anyway:
Same
exit code -6on R9700gfx1201(Linux, ROCm 7.2.3): 7 hangsin 5 days, and
HSA_USERPTR_FOR_PAGED_MEM=0does not stop themSame GPU family and exit code as the OP here, on Linux. Reporting because #1705
(gfx1100) reports
HSA_USERPTR_FOR_PAGED_MEM=0ended its hangs, and on this boxit does not.
Setup
AMD Radeon AI PRO R9700 32 GB (
gfx1201), single card; NixOS, kernel 7.2.9;ROCm
clr/hipblaslt/rocm-runtime7.2.3; Strata 0.1.41 → 0.1.42 → 0.1.43;Qwen3.8-Flash-Next UD-IQ4_XS native pack,
--max-context 262144 --kv int8 --kv-resident 32768 --spec 4 --resident-budget-gib 55; env includesHSA_USERPTR_FOR_PAGED_MEM=0andLimitCORE=0(dumps were 32 GB each).The hangs
Every one is identical: engine watchdog (#29)
SIGABRTs afterno progress for 60 s during a request (reading the prompt (batched): waiting for the GPU (attention, router) at layer N of the prompt chunk from token T), then within seconds amdgpu's MES failsREMOVE_QUEUE/SUSPENDandthe kernel does a MODE1 reset (
VRAM is lost due to GPU reset!). Alwaysprompt prefill, never decode.
coredumpctlconfirms aSIGABRTat each timestamp (so the exit is the watchdog,not a fault). All seven are with
HSA_USERPTR_FOR_PAGED_MEM=0set (applied2026-10-08) — i.e. the #750/#1705 workaround does not fix this instance.
Note
NRestarts=0is misleading:bin/strata-serverrestarts the engine childin-process, so systemd never sees the failure (worth not trusting when triaging).
Question
Is this the same class as #1569 / #1705 / #1691, or a distinct one? And given
MKheru's ROCm-10 result on #879, has anyone tried running the hang reproducer on
ROCm 10.0.0 libraries? If both the NaN poison and these prefill stalls are 7.2.x
runtime behaviour, that would explain why
HSA_USERPTR_FOR_PAGED_MEM=0moved thegfx1100 case but not this one.
@CAarset commented on GitHub (Oct 13, 2026):
I'm currently in a rush, so I don't have the time for a full report, but I may have found a solution: Compiling different advice from different sources, I attempted
along with the previous changes, and have now had IQ3_S with 256K context size running stall-free for almost an hour. Since @cjdell claims
HSA_USERPTR_FOR_PAGED_MEM=0doesn't help, it is possible thatGPU_PINNED_MIN_XFER_SIZE=1048576did. See attached config file for full details. I also ran --calibrate and built the gfx1201 hipBLASLt tables from tools/hip.I will run a full diff-by-diff test later, but figured I'd post this here so others can see if it helps them in the short run.
Files
Minor, probably unrelated bug: Copying terminal output with Ctrl+Shift+A Ctrl+Shift+C seems to have frozen Strata (not a Ctrl-C exit, just silently frozen).
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks @CAarset for the full terminal print. One thing stands out in it: every stalled read sits at exactly 6,954 tokens, whatever the prompt length (7,886, 9,357, 10,239, 18,346). Each of those requests is a new conversation (the harness's subagent) that shares its system prompt and tools with the main one. So the engine continues from a saved 6,954-token start, and the read of the rest never moves. The exit code -6 is the engine's own watchdog ending a read that made no progress.
We tried to reproduce it on an R9700 (gfx1201, the same chip family as your 9070 XT) with your config: Q2_0,
--mmap-experts, 256K context,--kv int8, the card cut to ~16 GB with--vram-reserve-mib, and the server and engine limited to 30 GB of RAM. The session was a main conversation growing to 74K tokens, a subagent with the same system prompt every third turn, and a client that dropped a request mid-read every fourth turn. That was 21 requests and 3 drops with no stall, so we cannot reproduce it yet.Two things would help:
strata-q2_0.log) of one stalled request: the lines from the request's start to the stall report."--prompt-cache", "0"added to the args instrata-q2_0.json. That turns off the conversation checkpoints the engine continues from; if the stall goes away, we know where to look.@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.