mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1740] [Bug]: Two-GPU pipelined decode (--pipeline-windows 2) stalls on Windows: the serving thread blocks in cudaSetDevice while both stages wait on it #695
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#695
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 @architectds on GitHub (Oct 9, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1740
What happened
Two-GPU pipelined decode (
--pipeline-windows 2) stopped in the middle of a long agent request and never resumed: notoken for 60 s, then the server's stall report, the released GPU waits (#267) and an engine restart (#29). It is rare
here - once in 51 requests, about 12 hours of agent use - but each hit is an outage: the request fails, the parked
conversations are gone, and the client's retry has to read its whole prompt again (398K tokens, about 4 minutes on this
PC), so Strata is unusable for about 5 minutes.
The state at the stall (the report below, position 398,917 of a 512K context): both pipeline windows in flight, and
each stage's GPU has rung for a layer the host has not served.
served 3/12; GPU rang 4served 11/36; GPU rang 12Where the host was. The stall dump's thread stacks, symbolized with the build's PDB (dbghelp): the serving thread
sat in the CUDA runtime under
Verifier::service, in theOnDeviceguard'scudaSetDeviceat the end ofservice(verify.cpp:3084 in v0.1.41), called from the loop's stage-1
service(generate.cpp:10308). No other engine threadwas in CUDA: the 15 pool workers parked, the 8 stagers idle, the PLE reader, the stdin reader and the watchdog. So the
GPUs wait for the host's flags while the host waits inside a driver call - it looks like the (WDDM) driver waiting for
work that cannot move on. Every
servicecall switches the device (cudaGetDeviceand twocudaSetDevice) evenwith nothing to serve, and the loop calls it for both stages on every pass: about a billion passes in that session.
Before: the same shape once on 2026-10-06 in a test run of a fork build of 0.1.39 with Hardin22's pipelined
windows: position 102,464, stage 0's odd window
served 2/12; GPU rang 3, the loop counter at 103,183,883 in bothreports, host idle 61 s. So it does not need a long context.
A proposed fix is in the PR linked below:
servicereturns before any CUDA call while nothing has rung, which takesthe driver calls out of the waiting loop (a WDDM flush every 2 ms stays). It cannot prove itself quickly at one stall
in ~50 requests; we run it from today and will report here.
Strata version, GPU, OS
0.1.41 (stock
fb58e0d, built locally for sm_86 + sm_120, CUDA 13.0) · RTX 3060 12 GB (stage 0, also the display) + RTX5070 Ti 16 GB (stage 1), both PCIe 3.0 x8 · Windows 11 · Ryzen 9 5900XT, 96 GB DDR4-3200
Config:
"gpu": [1, 0],"layer_split": "12", IQ3_S (GSQ-RCO),STRATA_PREFILL_CPU_SHARE=auto,--expert-cache auto --prefill auto:16384 --spec 4 --spec-min-p 0.70 --mtp <rt> --max-context 512000 --kv q4_0 --kv-resident 32768 --vision --vram-reserve-mib 1200 --vram-reserve-later-mib 500 --rope-scaling yarn --rope-scale 1.953125 --pcie-frac 0.35 --mmap-experts --conversation-cache-mib 8192 --conversation-cache-slots 4 --pipeline-windows 2 --trim-stage-weightsEngine log
The dump (373 KB) is available on request; it may hold prompt text on the stacks, so it is not attached.
@Niko1221 commented on GitHub (Oct 10, 2026):
Fixed in v0.1.42 by #1741 (the pipelined decode loop no longer switches the CUDA device on every poll while no layer has rung).