mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #267] Windows: the verify-window stall wedges the GPU into an unrecoverable "device lost" state (manual power cycle required), with no TDR logged #136
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#136
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 @1593914054 on GitHub (Sep 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/267
Environment
--max-context 262144 --kv int8 --kv-resident 32768 --spec 4 --spec-min-p 0.5 --mtp(CJK draft)--expert-cache auto --prefill auto --vision --vram-reserve-mib 700What happened
The engine loaded normally and reported
session is up (engine 0.1.24)with 1290 MiB of VRAM free with everything loaded — comfortably above the 256 MiB stall threshold, so this is not the low-VRAM-reserve case of #199.It then hung on the very first serve request, which was a short one (a one-sentence question,
max_tokens 200) — position 6, window 6. This is why I think it is a distinct data point from #251, where long prompts trigger it; here it needed no long prompt at all.The stall report
Same signature as #251: all expert-pool jobs finished, all workers parked, the GPU rang 48, and the host waits forever on the verify window.
Aftermath on Windows: the GPU is left unrecoverable
The server then answered with:
(3221226505 = 0xC0000409)
and immediately after that,
nvidia-smicould no longer talk to the card at all:So on Windows the stall does not stay contained to the engine: the GPU ends up in an unrecoverable device lost state, and the card only comes back after a power cycle. The remote desktop session died at the same moment and stayed dead — the machine needed someone to physically power-cycle it, which happened 19.5 hours later (hang at 04:11:14, power-off initiated 23:46:38).
No TDR / display-driver event was logged at all
I could not find any
Display4101/4102,nvlddmkm,WHEAorBugCheckevent in the Windows event log around the hang or in the following hours. The display driver's watchdog never fired, so Windows never attempted the usual "driver stopped responding → reset and recover" path; the device just went away. That is probably why it is unrecoverable, unlike an ordinary TDR.Windows System log around the recovery, for the record:
Notes
--servewithout--mtp(it requires--spec T,--mtp DIRand--prefill CHUNK), so there is no way to A/B the draft path out of the equation from the config.strata-stall-27624.dmp(thread stacks) andstrata-iq3_s.log.Related: #251, #29, #31
strata-stall-27624.dmp
strata-iq3_s.log
@Niko1221 commented on GitHub (Sep 30, 2026):
Thanks for the dump and the analysis. The final wait of a verify window is an unbounded sync, and the GPU-side waits spin on host-mapped flags with no abort, so when the watchdog kills the process those kernels are still resident. 0.1.31 makes that wait bounded and, before the watchdog exits, releases every flag so the waiting kernels finish. Could you retest on 0.1.30 meanwhile and tell us if it still happens?
@Niko1221 commented on GitHub (Oct 1, 2026):
0.1.31: when a verify window stalls, the watchdog now releases every GPU wait before it ends the engine, so no spin kernel outlives the process (tested with a simulated stuck flag: the GPU finished in 15 ms and nvidia-smi was healthy). Please reopen if you still get a device-lost state on 0.1.31.
@1593914054 commented on GitHub (Oct 1, 2026):
=== COMMENT FOR #267 — root cause isolated: 0.1.31's new MTP-prefill path, plus a separate driver idle crash ===
1. First-request crash is a 0.1.31 MTP-prefill regression —
STRATA_MTP_PREFILL_SYNC=1works around itThe serve request path is:
0.1.31 ships a new MTP-prefill path (
src/core/mtp.cpp, the E-4 "batch input upload + device graph" path viacapture_prefill_dev, on by default). On this machine the first request always dies there:(
cudaErrorUnknownfromcudaGraphLaunch(prefill_dev_exec_[T])/cudaStreamSynchronizeinsideMtpDrafter::prefill.)Setting the engine's existing fallback switch
(which forces the old per-group-sync path via
capture_prefill) made every request succeed — 21+ short requests plus a long prompt, all completed: decode ~38–53 tok/s, prompt ~48–76 tok/s, drafts accepted normally. So this part is an engine regression in 0.1.31's new MTP-prefill path, with a clean opt-out.2. There is a second, independent crash: the GPU dies while idle
With
STRATA_MTP_PREFILL_SYNC=1the requests work, but the machine still bugchecks while the engine is idle (no request running):0x116with Arg30xC000009A(nvlddmkm), and once0x133 DPC_WATCHDOG_VIOLATIONunderSTRATA_ARENA_PIN_GIB=1+STRATA_ARENA_LOCK=0.Full matrix on this machine (driver 616.92, same model/args otherwise):
STRATA_ARENA_PIN_GIB=8mtp prefill: unknown error--pcie-frac 0nvidia-smi -lgc 300,3000)mtp prefill: unknown errorSTRATA_MTP_PREFILL_SYNC=1STRATA_ARENA_PIN_GIB=1+STRATA_ARENA_LOCK=0Pinning is a "two-edged" variable: pinning the whole 46.84 GiB arena leaves the WDDM shared segment full, so TDR reset fails with
0xC000009A(0x116); pinning nothing leaves the 45 GiB arena pageable and the CPU expert pool's page-fault storm appears to trip a DPC watchdog (0x133).3. What I checked and ruled out
STRATA_MTP_PREFILL_SYNC=1part is engine-side and independent of the driver.)Net assessment
Two independent issues:
STRATA_MTP_PREFILL_SYNC=1works around it. This is the actionable engine bug.0x116/0x133) is not avoidable by any engine flag on this WDDM machine; it reproduces across driver branches and matches the known idle P0→P8 + large-pinned-memory crash.Requested action: please treat
STRATA_MTP_PREFILL_SYNC=1as evidence that 0.1.31's newcapture_prefill_devpath needs fixing (or should stay opt-in). The idle crash looks like NVIDIA-driver territory, but the fact that a ~46.84 GiB pinned arena is what makes the TDR reset fail (0xC000009A) may be worth a Windows-side note in the docs.@MrKop-git commented on GitHub (Oct 12, 2026):
Possibly related root-cause analysis: #2084 — on Linux/NVIDIA Pascal, the hard-freeze/GPU-wedge class traced to the driver's PMU halting during PCIe link-speed retraining (NVIDIA bug 6869496), with a one-line registry workaround. If the Windows wedge here shares the PMU/link-retraining trigger, the same mitigation class may apply.
@nghia1930mmm-cmd commented on GitHub (Oct 14, 2026):
Chào Dinesh Chander,
Cảm ơn bạn đã cập nhật về tình hình trên Strata 0.1.44. Rất tiếc khi biết vấn đề này vẫn chưa được giải quyết triệt để.
Trước khi chúng tôi đi sâu vào sửa lỗi mã nguồn, bạn có thể thử giảm bớt số lượng pool-workers hiện tại từ 13 xuống còn 8 và kiểm tra xem hiện tượng stall có còn xuất hiện hay không không? Điều này sẽ giúp chúng tôi xác định liệu đây là do xung đột tài nguyên phần cứng hay lỗi logic trong cơ chế xử lý của engine.
Mong phản hồi từ bạn.
Trân trọng,
[Your Name]
Trên 14 tháng 10, 2026 21:53:26 GMT+07:00, Dinesh Chander @.***> đã viết:
@rusty20080 commented on GitHub (Oct 25, 2026):
Repro on 0.1.44.1: first-request verify-window stall on 2x RDNA4 (gfx1201) / Windows — same post-fix wording, plus an unrecoverable wedge after
Reopening/re-referencing #267 with a third repro, different silicon and OS from
dinesh-chander's Oct 14 comment (gfx1100, Linux). Ours: AMD RDNA4, Windows,
ready-made HIP engine; engine ended by the server watchdog with exactly the
post-fix wording; the machine then degraded to a hard lock (unrecoverable until
power cycle) — because on this PC
TdrLevel=0(TDR disabled by registry), whichmatches the original #267 report's "no TDR logged".
Environment
engine\strata.exe), served throughserve/server.py--compat-bf16), (B) orcarouter Uncensored IQ2_M pack (gate/up IQ2_S, down IQ4_NL)"gpu": [0, 1],"layer_split": "auto"— auto chose K=45 (9070 XT carries layers 0-44, the 9060 XT 45-47 + head);--pipeline-windowson by default (2 stages, RDNA4)cudaHostRegistercapped to 8 GiB (logged), large pages refused (error 1314)Repro A — orca-iq3_xxs, 128K context on the split, stall under VRAM pressure (Oct 25 17:05)
9.9 tok/s, 153 tokens generated at 11.2 tok/s (drafts accepted 78/102), decode
expert-cache hit rate 60.6%, experts read from the GGUF in place
(85917.2 MB read;
--mmap-expertsdeclined the native pack, as documented).WARNING: only 711 MiB of VRAM free at the start of this request (below 1024 MiB): when the card is this full the driver can page GPU memory…→ then
strata serve: verify: the window never finished; its GPU waits were released but the GPU did not finish within 5 s (#267). Engine ended by the server.wedged, app hangs for ~1 h, manual power reset. Windows never attempted a TDR:
this PC's registry has
TdrLevel=0(TdrDelay/TdrDdiDelay 60) underHKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers. Same observable as the
original #267 ("no TDR logged, GPU unrecoverable until power cycle").
the stall fired on the run whose frees dropped under the 1 GiB reserve.
Repro B — orca-iq2_m, 32K context on the same split (Oct 25 18:42)
5251 of 24576 profiled pairs (~94.4% of routed mass); 1-token..6-token verify
windows all captured (
upload no error, sync no error).strata serve: verify: the window never finished; its GPU waits were released but the GPU did not finish within 5 s (#267)— the host had read 0 tokens.Server watchdog ended the engine at 90 s ("said nothing for 90 s; no CPU or disk").
nothing further (no PCIe probe lines), 2 min to a live-kernel WATCHDOG dump —
the machine then degraded and was power-reset ~50 min later.
is_iqaccepts types 20/22/18/23; MMQ table includes iq2_s, iq4_nl).
What we tried / did not try (stated explicitly)
STRATA_PF_STEP_SYNC=1,STRATA_KV_HOST_DMA=1,--pipeline-windows 0, or a smaller--prefill— TROUBLESHOOTING's steps 2-5are queued for a retest once the machine is back to a known-good driver state.
init on a wedged driver, so it never actually ran), iq3_xxs 128k again, or any
of this on NVIDIA/Linux.
TdrLevel=0on this PC (being restored to 3/10 s), so"unrecoverable" here is partially self-inflicted; the engine-side stall and its
post-fix wording are independent of that.
Log excerpts available (happy to attach)
strata-orca-iq3_xxs-128k-2gpu.log— the 17:05 session: healthy startup, slowfirst request,
only 711 MiB of VRAM freeWARNING, then #267.strata-orca-iq2_m-2gpu.log— the 18:42 session: startup + 6 captured verifywindows, then
window never finished ( released … ) (#267).strata-orca-iq2_m.log— 1-line init hang on 1 GPU.LiveKernelReports\WATCHDOGdumps today (module snapshot includesdxgkrnl.sys+amdkmdag.sys), Kernel-Power 41 + 6008 x2, no 4101/TDR event(TdrLevel=0), no commit-exhaustion event.
strata-stall-*.dmpif theWindows engine writes one on this path, a
/metricssnapshot, or theSTRATA_PF_STEP_SYNClog?Retest after a clean reboot + TDR restore (Oct 25 21:49-22:00)
We rebuilt the machine to a known-good starting state (clean reboot, engine
0.1.44.1 unchanged,
TdrLevel=3restored — previously 0) and ran both arms:"gpu": [0,1], split auto K=45, same session conditions)upload no error, sync no error), then the very first real request →strata serve: verify: the window never finished; its GPU waits were released but the GPU did not finish within 5 s (#267)STRATA_PF_STEP_SYNC=1Conclusions for the report: (1) the stall is specific to the 2-stage layer
split on this engine/build on gfx1201 (single-card of the same pack is fine);
(2) it fires on the first verify regardless of context size (32k here, 128k
under VRAM pressure in repro A); (3) after a #267 on this split the HIP device
state survives only until reboot; (4) with TDR correctly configured the failure
is at least contained (Engine dies, machine survives) — with our previous
TdrLevel=0it escalated to an unrecoverable desktop freeze.Retest artifacts:
L:\Strata\retest\(engine + server logs for both arms,timestamped copies).
Resolution found the same day: fixed by engine 0.1.50 (repo v0.2.2+)
We updated from engine 0.1.44.1 to the signed feed's 0.1.50 (repo state v0.2.6;
UPDATE.bat, model files untouched) — which carries86d10ed8, "verify (HIP):the first launch of each window graph reads the PLE rows and raises the PLE flag
before cudaGraphLaunch, so the launch cannot wait for a GPU that waits for the
flag (first-window hang on gfx1151)".
Same repro, new engine, same session conditions (fresh reboot,
TdrLevel=3):So the gfx1151 first-window PLE-flag case and our gfx1201 split case share the
root cause: the first
cudaGraphLaunchof a verify window could wait on aflag that only the launch itself would publish. Both engines' notes:
earlier, on our 0.1.44.1 build, the very first prompt stalled at the captured
window (
#267) deterministically, and their in-session engine restarts thenwedged the HIP device until reboot — gone on 0.1.50.
Artifacts:
L:\Strata\retest\*engine0150-*(both requests' logs) alongside the0.1.44.1repro logs in the same folder.Everything above is from logs produced on this machine today (engine 0.1.44.1 repros, engine 0.1.50 post-update run); the attribution of the root cause to
86d10ed8is by release correspondence, not a bisect. Happy to captureSTRATA_PF_STEP_SYNCoutput, a/metricssnapshot orstrata-stall-*.dmpif useful for the reopen - just say what helps.@m1k3-1337 commented on GitHub (Nov 6, 2026):
gfx1151 (Strix Halo, 128 GB, Linux, rootless Podman) — the verify stall follows engine starts that begin with the previous instance’s VRAM still allocated
Commit
296b59d, IQ3_S, --batch-mtp, --mtp-q4 all, --prefill 16384, parallel 3, expert cache 10.16 GiB in VRAM, idle_unload_s 600.Across 27 engine starts in strata-iq3_s.log, “capturing the 6-token window (N MiB of VRAM free)” reads 12.5–13.4 GB on normal starts. On 2026-11-06 a series of starts reported 6.7, 6.7, 4.0, 4.1, 4.1, 4.1 GB. The only verify: timed out at layer 10 … did not finish within 5 s (#267) in the whole log came right after the last 4.1 GB start. The next start was back at 13.4 GB and ran normally.
The sequence:
An engine aborted mid-request (exit -6).
The immediate restart hung at “almost ready … still starting” for 888 s (“did not start, try 1 of 3”).
Try 2 came up, and stalled 90 s later.
At the time, the only other GPU client was Ollama: GTT only, 0 VRAM, per DRM fdinfo. The kernel log showed no amdgpu errors or resets. The missing ~9 GB matches the expert cache, so it looks like the restarted engine began while the previous instance’s VRAM (its expert cache) was not yet released.
Suggestion: before (re)starting the engine, wait until the free VRAM is back near the level of a clean start, or until the previous instance’s GPU context is fully torn down. A log line with the free VRAM at that point would make this visible.