mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1118] Batch slots: the engine stalls ("no progress for 60 s … reading the prompt (batched)") when a long prompt is read while another slot decodes; STRATA_BATCH_DECODE_SHARE=0 avoids it #473
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#473
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 @uncle-daddy-jp on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1118
Summary
With
"parallel": 3(--batch 3), the engine stalls and then kills itself ("no progress for 60 s during a request (reading the prompt (batched), done up to token N)") when a long prompt is being read while another slot is decoding. It reproduces every time with real agent traffic (a ~6K prompt generating in slot 0 while a ~21K prompt is read), and in a synthetic load of 3 concurrent requests (6.4K / 21.5K / 8.2K tokens). It does not reproduce with short prompts.STRATA_BATCH_DECODE_SHARE=0makes it go away;"parallel": 1of course too.--prefill 2048,--batch 2, and turning the conversation cache off do not help. Two server-side follow-ups are listed below (a 400 after an engine restart, and requests that stay open for ~6 minutes after the engine died).Environment
1735d64(the one before today's history rewrite) + PR #1057/#1101 (stager sleep) + the aarch64 port from PR #409 (44df8fd) cherry-picked. Engine reports 0.1.40. The batched prompt path is upstream code; the port only touches build, UMA sizing and ARM CPU kernels, so I expect this to reproduce on x86 Linux with--mmap-expertsas well, but I have not tried that.--mmap-experts --expert-cache auto --prefill auto --spec 4 --mtp … --kv int8 --max-context 131072 --vision, all 24,576 experts in the GPU cache, control vector on (also reproduced with it off).Repro
"parallel": 3instrata-<model>.json(plus--conversation-cache-mib 12288 --conversation-cache-slots 12, but it also reproduces without the conversation cache).reasoning_effort: medium,reasoning_budget_tokens: 4096, max_tokens 1500); B = 21.5K prompt, thinking on, two tools; C = 8.2K prompt, thinking off, max_tokens 300.Engine log at the stall (from
strata-<model>.log):The stall report: "0 of 0 jobs claimed, 19 of 19 workers parked", "the GPU rang 1; flags: served 1, plan (A) 0, copies (B) 0", "released the verify window's GPU waits (#267): the GPU finished in 27 ms". In production the same four lines appeared four times in ten minutes (done up to token 8192 each time, i.e. the first chunk boundary), each followed by a 30-60 s engine restart.
What it looks like from the outside: between prompt chunks the server lets the decoding slot run (
STRATA_BATCH_DECODE_SHARE, default 0.5); because the prompt path has borrowed cache slots, that decode window runs as the doorbell graph; the window is captured and then nothing progresses.What was tried (same 3-request load, 3 rounds each)
--batch 3, prefill auto (8192)--batch 3,--prefill 2048--batch 2, conversation cache 4096 MiB--batch 3, conversation cache off--batch 3+STRATA_BATCH_DECODE_SHARE=0--batch 1Two server-side follow-ups seen during the restarts
list.remove(x): x not in list→400 invalid request.serve/server.pyrecreateswait_lens/slot_cvwhen it restarts the engine (around line 660); a request that was queued across the restart then hitsself.wait_lens.remove(entry)in itsfinallyand the client gets a 400 for a request it never got to send.engine_silence_s(300 s) closes them with an error, ~384 s in total. Clients with a 120 s timeout have long given up; failing them at once when the engine dies would be kinder.Workaround in use
"parallel": 1with the conversation cache (--conversation-cache-slots 12). Stable so far under the same traffic.Logs (engine log, server stdout, stall reports, the load script) are available if useful. Measured with the help of Claude (Anthropic).
@uncle-daddy-jp commented on GitHub (Oct 7, 2026):
Update: the two server-side follow-ups at the end (the
list.remove(x)400 after an engine restart, and requests staying open for ~300 s after the engine died) are already covered on main by #1012's commits57a69eband3a711ae(v0.1.40.1) - our build was from1735d64, just before them. The stall itself (reading the prompt (batched)stopping at a chunk boundary while another slot decodes) is the part that remains;STRATA_BATCH_DECODE_SHARE=0is still the only setting that avoids it here.@Niko1221 commented on GitHub (Oct 7, 2026):
Fixed in 0.1.40.2. batch_poll, run_slot_rows and service() tested the init-time all_resident_ flag where the token path uses ar_on(), so a prompt loan switched the window to the doorbell graph but the host stopped serving it. Reproduced on 4x R9700 (STRATA_SPLIT_OWN_BUFFERS=0 so every stage loans, --batch 3, a 20K-token prompt read next to two decoding slots): 0.1.40 ends with 'verify: an earlier window never finished on the GPU', the fix runs through. STRATA_BATCH_DECODE_SHARE=0 is no longer needed. Please retest on your Spark. The serve follow-ups (400 after a restart, requests open after the engine died) are tracked separately.
@uncle-daddy-jp commented on GitHub (Oct 7, 2026):
Retested on the DGX Spark (GB10, 128 GB unified, aarch64) with v0.1.40.3 (
d5ea713) + the #409 aarch64 port cherry-picked on top. The hang is gone.Setup: IQ3_S,
"parallel": 3(--batch 3),--prefill auto,--mmap-experts --expert-cache auto, conversation cache 12 GiB / 12 slots, STRATA_STAGER_SLEEP at its Linux default.It is back in production on parallel 3. Thanks for the quick fix.
(Build note for #409: on top of the port, main 0.1.40.x needs a link stub for
q8k_quant_avx2in the portable/aarch64 build; native_expert.cpp only calls it behindcpu_avx2_ok(), which is false there.)