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#1338
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 @JustPowell on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3297
Follow-up to #579 (closed in the stale sweep; it asked for a new issue if it still happens on 0.1.44 or later). The same stall still happens here on 0.1.45 and on 0.1.45.3, and there's a very regular trigger: every hang happens when the prompt's last batched step has 7 tokens left.
Pattern
The client is an automated loop. It sends short OpenAI-API requests: about 3-4K-token prompts,
max_tokens1500,reasoning_effort: "none", no conversation reuse. Each request either finishes or hangs on the last step of the batched prompt read:reading the prompt: 3,891 of 3,8984,005 of 4,0123,072 of 3,0793,126 of 3,1273,908 of 3,909Every hang where I could see the prompt length had 7 tokens left, and every request I saw finish had 1 left. Two more hangs stopped at token 4142 and token 2948, but I don't have their prompt lengths. After roughly 280 s the watchdog ends the engine (exit -6,
no progress for 60 s ... reading the prompt (batched), done up to token N; once also -9 viaengine_silence_s). The restarted engine then reads the same prompt fine.What I ruled out
Each change below gave the same hang at a 7-token tail:
Strata v0.2.0-beta (engine 0.1.45.3) and v0.1.45 (engine 0.1.45), both built locally with setup
--spec 4 --spec-min-p 0.5 --mtp ...(the default) and--spec 2 --spec-min-p 0.5without--mtp--max-context 65536(about 500-600 MiB VRAM free, LOW warning) and--max-context 16384 --vram-reserve-mib 3072(about 2.9-3.0 GiB free when the request began)STRATA_RESIDENT_HEADROOM_GIB=10; the PLE direct probe was fine (39-55K rows/s)STRATA_PLE_BATCH=0(the workaround from #541), set in the config'senv: still hangs, at token 4393 of the batched prompt read on 0.1.45Not tried yet: THP off and
STRATA_ARENA_PIN_GIB=0(the other asks from #579). As in #579, the GPU also drives the desktop (KDE Plasma, Wayland).Environment
alwayscoder-iq1_m, native pack),--expert-cache auto --prefill auto --kv int8 --resident-expertsStall report (0.1.45)
Engine command line:
The 0.1.45.3 stall reports look the same, with
VRAM free when this request began: 2944 MiB. Happy to run THP off,STRATA_ARENA_PIN_GIB=0or other diagnostics, and to attach the full engine log.@github-actions[bot] commented on GitHub (Oct 20, 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 20, 2026):
Thanks, this follows the format now.
@JustPowell commented on GitHub (Oct 20, 2026):
Tried the two remaining asks from #579 on 0.2.0-beta (engine 0.1.45.3): THP off (
/sys/kernel/mm/transparent_hugepage/enabled=never) together withSTRATA_ARENA_PIN_GIB=0in the config'senv(confirmed in the engine's environment). The same settings as above otherwise:--spec 2 --spec-min-p 0.5, no--mtp,--max-context 16384,--vram-reserve-mib 3072.It still stalls in the same place, within about 10 requests:
A correction to the list above: the
STRATA_PLE_BATCH=0run was on 0.1.45 (engine 0.1.45), not on 0.1.45.3. The final config (--spec 2, no--mtp, 16K context, 3 GB VRAM reserve) hung on both versions. The earlier variations (default--spec 4 --mtp, the 65536 context) were only run on 0.1.45.3.@JustPowell commented on GitHub (Oct 20, 2026):
Good news: on 0.2.1.1 (engine 0.1.46.1) the stall is gone here. I updated the source install with
./update.shand kept the same run config as in the last comment (--spec 2 --spec-min-p 0.5, no--mtp,--max-context 16384,--vram-reserve-mib 3072; THP back on,always).The same automated client ran 184 requests in a row (3-4K-token prompts,
max_tokens1500,reasoning_effort: "none") with nono progressstall and no engine restart, against a stall within about 10 requests on 0.1.45 and 0.1.45.3. Decode averaged about 67 tok/s.One change differs from the earlier runs: the monitor now runs on the integrated GPU, so the RX 9070 no longer drives the desktop. Probably not the cause (the 3 GB reserve already left plenty of VRAM free), but I mention it in case it matters. Feel free to close this; I'll reopen if it comes back.
@JustPowell commented on GitHub (Oct 20, 2026):
Correction to my last comment: the stall is not gone on 0.2.1.1 (engine 0.1.46.1). It only stayed away while the prompts were short. The 184 clean requests all had 3-4K-token prompts. With longer prompts it is back, at the same 7-token tail:
The same 8,111-token prompt, re-sent after the engine restart, failed differently:
The engine also dumped core twice while starting again after these. Same config as before (
--spec 2 --spec-min-p 0.5, no--mtp,--max-context 16384,--kv int8,--vram-reserve-mib 3072,STRATA_RESIDENT_HEADROOM_GIB=10,STRATA_ARENA_PIN_GIB=0), THPalways, the monitor on the iGPU. So short prompts are fine on 0.1.46.1, and prompts of about 8K tokens and up hit the 7-token tail. Leaving this open; happy to send the full engine log or test a build.@JustPowell commented on GitHub (Oct 20, 2026):
More data from today on 0.2.1.1 (engine 0.1.46.1), same config as above. Prompts of about 5.8K tokens hang too, so it isn't only the 8K+ ones.
Over about 33 minutes of the same automated client: 13 requests finished, 5 failed, 4 engine kills for silence (
engine_silence_s120), and the engine restarted 6 times. These are the stall reports in the engine log since the update:reading the prompt (batched), done up to token 5771reading the prompt (batched), done up to token 8104(twice)reading the prompt (batched), done up to token 7296/8007/9651reading the prompt (batched): layer 28 of the prompt chunk from token 0reading the prompt (verify windows), from token 8177decode -1Each one looks like the earlier reports:
0 layers served since the last finished step,expert pool: ... 24 of 24 jobs claimed, 24 done; 7 of 7 workers parked, 7 sleeping,threads waiting on the disk (state D): 0, about 2.9 GB VRAM free when the request began and about 9.6 GB RAM available. One retry of the 8,111-token prompt ended instead withverify: timed out at layer 21; its GPU waits were released but the GPU did not finish within 5 s (#267).The engine also left 8 core dumps today (SIGABRT). They line up with the engine being stopped after these stalls, so they are probably the watchdog's stop rather than separate crashes. The binary is a local build without symbols, so the backtraces are empty.
For now I've moved this workload back to llama.cpp. I can still run a test build or a diagnostic run on request.
@Niko1221 commented on GitHub (Oct 21, 2026):
Not reproduced here. This looks like the same class as #1705, #2049, #750 and #920: gfx1201 under host memory pressure (32 GB RAM, 8 GB already in swap, 3.3 million major page faults, THP always). In your stall report the engine is idle just after the batched part of the prompt, where the checkpoint is saved and the lent expert slots are refilled with async copies from host memory. Please send:
free -mandvmstat 1during a stalldmesg | grep -iE "kfd|amdgpu|oom|evict"STRATA_REFILL_BLOCKING=1(each refill copy waits; if the stall goes, it is the queued refill copies)--short-read 0(tail batched, no refill before the windows)HSA_USERPTR_FOR_PAGED_MEM=0, as in #1705ulimit -l, and a run with--resident-expertsagainst--mmap-experts@JustPowell commented on GitHub (Oct 23, 2026):
Update on 0.2.2 (engine 0.1.47, local HIP build for gfx1201), with a second card. Your memory-pressure reading fits what I see: the stall is still there on 0.2.2 when the experts don't fit in VRAM, and gone when they do.
The machine now has a Radeon AI PRO R9700 (32 GB, also gfx1201) beside the RX 9070 XT (16 GB), still 32 GB of RAM, zram swap, THP
always. Same model and settings as before (--spec 2 --spec-min-p 0.5,--resident-experts,--kv int8,--max-context 16384,--vram-reserve-mib 3072,STRATA_RESIDENT_HEADROOM_GIB=10,STRATA_ARENA_PIN_GIB=0,STRATA_RESIDENT_PIN=0,engine_silence_s120). The test client sends one request at a time: prompts of 4.9K to 15.1K tokens, 200-token replies. I switched cards withgpu_roles.The Main/Helper roles worked as described:
card roles: Main GPU 1, Helper GPU 0, layer split across [0, 1].On the 9070 XT alone, the first failure came back as a 503 after 301 s. The second ended after 176 s, when the server stopped the engine (exit code -9) after 120 s without output and started it again. The engine log has the same stall as before, now 5 tokens from the end of the prompt:
(prompt of 10,460 tokens).
strata-hostalso dumped core once, when it was restarted.The diagnostics you asked for, from that run:
free -mduring the stall: 31,190 total, 21,809 used, 447 free, 9,381 available; swap 17,833 of 31,189 used.vmstat 1was running throughout (I have the full log if you want it).kfdoramdgpulines in the kernel log. There werepage allocation failure: order:0warnings (warn_alloc, from kswapd0 and from other processes) but no OOM kill.ulimit -l: 8192.I stopped that run early because the desktop was close to running out of memory. I haven't done the flag runs yet (
STRATA_REFILL_BLOCKING=1,--short-read 0,HSA_USERPTR_FOR_PAGED_MEM=0,--mmap-expertsagainst--resident-experts). I can do them on the 9070 XT alone if they would still help, but I'd want to cap the engine's memory for those first. For my own use I'll keep the R9700 as Main, where this doesn't happen.@manakjiri commented on GitHub (Oct 23, 2026):
Another data point on gfx1100, with a clean A/B: on our setup the stall only happens while the adaptive tier swaps experts, and
--adapt-every 100000(swaps effectively off) makes it go away.Setup: Strata 0.1.44.1, local HIP build for gfx1100 (engine
src7dfd34378bd2d32a). Single RX 7900 XT (20 GB) passed through to a Proxmox VM, no display attached. ROCm 7.2.4, kernel 7.2.9-arch1-1, 48 GiB RAM, no swap, THPalways,ulimit -l8192. Qwen3.8-Flash-Next IQ3_S native pack,--expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp ... --max-context 131072 --kv int8 --resident-experts --kv-resident 32768 --vision --vram-reserve-mib 700, envSTRATA_RESIDENT_PIN=0 STRATA_RESIDENT_HEADROOM_GIB=6 HSA_USERPTR_FOR_PAGED_MEM=0. The client is a pi harness, one request at a time, prompts mostly 15K-105K tokens with conversation reuse.A/B, same config and traffic, only
--adapt-everychanged:--adapt-everyThe ten stalls, from the engine's stall reports, all with "0 layers served since the last finished step":
reading the prompt (batched), done up to token Nfor N = 15588, 20441, 25527 (prompt of 25,534: 7 left), 30417, 31978, 35925, 104677reading the prompt (batched): layer 26 of the prompt chunk from token 25020andlayer 15 ... from token 21604verify window: waiting for the GPU to finish the window (flags A/B/M raised) 6The server ended them as
no progress for 60 s(exit -6),engine said nothing for 300 s, or "frozen" (no CPU or disk for 180 s). VRAM free when each stalled request began was 485 MiB. The kernel log has no kfd/amdgpu/OOM/evict lines in that window, and the VM had about 5.5 GiB of RAM available with no swap, so this is not host swapping.We saw the same split earlier on 0.1.40.1 with kernel 6.19.8 and ROCm 7.2.0: 17 stalls in 1,900 requests with the adaptive tier at its defaults, 0 in 2,845 with
--adapt-every 100000. Both arms there also hadHSA_ENABLE_SDMA=0andHSA_USERPTR_FOR_PAGED_MEM=0(#1705), so neither prevents it on its own.We are behind the current release. If it helps, I can update to 0.2.3 and run the adaptive tier at its defaults with
STRATA_REFILL_BLOCKING=1, then with--short-read 0.@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.