mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #605] --ple-io direct on rotational storage deadlocks prefill; the watchdog reports it as a generic engine stall (triage discriminator + --ple-io ram fix) #284
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#284
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 @cjmckenna on GitHub (Oct 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/605
Summary
On a host whose model files sit on a 7200 RPM SATA disk, the default
--ple-io directdeadlocks prompt reading. The 60 s watchdog kills the engine with a message that asks the user to file a bug, so the storage cause is invisible.--ple-io ramfixes it completely.The point of this report is less "HDD is slow" and more that this watchdog signature has many causes (cf. #579 AMD/HIP, #251 verify-window, #224 PLE illegal access, #481
SleepConditionVariableSRW, #31 mid-generation freeze) and there is currently no way for a reporter to tell them apart. Below is the discriminator that worked, and a suggestion to put it in the stall report.Hardware
/dev/sdb1, TOSHIBA DT01ACA2,rotational=1, mq-deadline,nr_requests=64Flags:
--expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp rt --max-context 131072 --kv int8 --kv-resident 32768Symptom
Reproduced on every deliberate attempt with a fixed payload, including on freshly loaded engines immediately after a restart. I did not run a formally counted trial series, so I will not put a precise hit rate on it; it never once succeeded with that payload before the fix.
What it is not
Each of these was ruled out by test, and most cost a rebuild or a full engine reload:
reasoning_effort=nonechanges nothing.-DCUDAToolkit_ROOT=/usr/local/cuda-13.3; note thatsetup.pypasses only-DCMAKE_CUDA_COMPILER, so CMake independently resolved Debian's 12.4libcudart). The stall survived the corrected build unchanged.STRATA_UNBUFFERED_LOAD=0measured about 1% worse here: median 43.4 s against a 42.9 s baseline, three cache-busted runs each on a fixed 27K-token prompt. Offered as a counter-data point since #577 is open; it presumably helps when the file cache is the hot path, which--ple-io ramremoves.What it is: the discriminator
/proc/<engine pid>/task/*/wchanduring the hang, identical across two dumps taken 10 s apart:Sixteen threads in
Dstate onblk_io_scheduleis the whole diagnosis. A CUDA-side deadlock parks threads on a futex or a CUDA sync, never on block I/O. It also explains0 of 0 jobs claimed: prefill never dispatches expert work because it is still waiting on PLE table rows.--ple-io directis documented as "unbuffered SSD reads". With--ple-inflightat its default of 256, against a 320M-row table, on a queue withnr_requests=64, a rotational actuator cannot service the random reads inside the watchdog window.Why it looks like a size limit, and is not
The most misleading part, and what cost the most time here:
"word word word..."Repetitive text hits a handful of n-gram rows that the row cache serves; token-diverse text scatters reads across the table. Content diversity is the trigger, not length, so a reporter who bisects on prompt size will never converge.
Fix
--ple-io ram, locking the 27 GB table into RAM of 121 GB total:Suggestions
Dstate plus theirwchanwould separate storage stalls from GPU and sync stalls at a glance, on every future report carrying this signature./sys/block/<dev>/queue/rotationalis a single read, and the engine already sizes the table and knows available RAM, so it could suggest or auto-select--ple-io ramwhen the table fits.--ple-io directsays "unbuffered SSD reads"; since it is the default, it seems worth stating outright that it is unsuitable for rotational storage.Happy to run controlled follow-ups on this box, including
--ple-io mmap, varied--ple-inflight, or an A/B with the model relocated to the SATA SSD.@Niko1221 commented on GitHub (Oct 4, 2026):
Thank you for the diagnosis. The wchan dump was the missing evidence. In 0.1.39, on Linux: the engine warns at start when the n-gram table is on a rotational disk with
--ple-io directand recommends--ple-io ramor an SSD. Setup adds--ple-io ramitself on a rotational disk when the RAM holds the table next to the model, and otherwise warns. The stall report now lists the engine's threads in state D and their wchan (e.g.threads waiting on the disk (state D): 16 of 35 (blk_io_schedule x16)), so this case can be told apart from an engine deadlock. DETAILS.md says--ple-io directis for SSDs and has a troubleshooting row for it.@cjmckenna commented on GitHub (Oct 4, 2026):
My pleasure. Glad you were able to get it implemented
On Sun, Oct 4, 2026 at 8:33 AM Niko @.***> wrote: