Repository navigation
fix(inference): a stalled stream on a lane working for others waits on, bounded; only a lane that did nothing fails it (card 115f9a14) - #4506
Conversation
|
CHANGES REQUESTED at fcee991. The waiting rule is right, and so is the bounded ceiling (the act's own 3x). One defect in how it's wired: the decision is read twice. In both the no-bytes path (~line 454) and the progress-stall path (~line 522), the existing #4480 block still runs first:
Consequences:
Fix: classify once per checkpoint, one match with three arms:
🤖 Generated with Claude Code |
… both wait and failure; no strike or fail probe on a checkpoint that waits (Cormac on #4506) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…asured prefill rate, so a slow lane between counter moves reads as working (Codex on #4506); UBATCH_TOKENS set once in lane_args Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…rate, covering the IntelMac's measured chunk-gap jitter (214 s at 11.6 tok/s) (Cormac on #4506) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… both wait and failure; no strike or fail probe on a checkpoint that waits (Cormac on #4506) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…asured prefill rate, so a slow lane between counter moves reads as working (Codex on #4506); UBATCH_TOKENS set once in lane_args Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…rate, covering the IntelMac's measured chunk-gap jitter (214 s at 11.6 tok/s) (Cormac on #4506) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…irst (serving_rates), the per-request rate only as fallback; test comment says two ubatches (Cormac on #4506) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
39ae393 to
c26145c
Compare
…n, bounded; only a lane that did nothing fails it (card 115f9a14) IntelMac 2026-09-28 05:07Z (Cormac's read): a turn at 96% prefill failed at the 90 s idle bound while the server prefilled slot 4's 2,048-token chunk every ~176 s. Both the no-bytes timeout and the progress stall now take ONE classification of the lane per checkpoint (lane_class): a lane that did real work for anyone within the work window (the idle bound or two ubatches at the server-total prefill rate, whichever is longer) is busy, so the bound becomes a checkpoint (inference.stream.busy_not_dead) and the stream waits on, up to the act's own 3x ceiling. Only a lane that did nothing fails the stream and counts toward relaunch. UBATCH_TOKENS is set once in lane_args. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
fa1ae75 to
7fd2124
Compare
|
APPROVED #4506 at 7fd2124: 8/8 concluded success. At both checkpoints (no bytes, progress stall) the lane class is read ONCE, and waits_on plus the fail match both use it, so Starved within the ceiling waits with no strike, and only WedgeEvidence strikes. The work window is max(idle, 2 ubatches at the server-total prefill rate), covering the IntelMac's measured 214 s chunk gap. UBATCH_TOKENS carries its derived-or-floor and context-budget exemption. The busy_not_dead and fail rows carry #4505's persona, purpose, phase, prefill progress and ms_since_lane_work. |
…e no-movement window for every engine wait (card 0b52b957) (#5462) * A page save behind another slot's prefill is not a stopped engine: one no-movement window for every engine wait (card 0b52b957) enrico, 2026-10-26 07:59-08:59Z: 3 of 3 page-save quotes were refused 15-17 s after the other slot began a 2,048-token batch at 10.4-15.4 tok/s (~130-200 s per batch), each mind cold on her next turn (page_on_disk_unconfirmed at 08:14, 08:34, 08:54). The engine's /slots counters advance a whole batch at a time, and wait_while_engine_progresses ended any wait at its first checkpoint when a slot was processing and nothing had moved. The page switch checkpoints at 3x its measured p90 (16.8 s there), far shorter than one batch. sse_stream already owned the right answer, "two batches at the measured prefill rate, never less than the floor, capped at the act ceiling" (work_window, #4506). It moves into llama_server::progress as unmoved_window, the one authority for how long a processing engine may stay unmoved, and every wait that reads /slots uses it: - WaitBounds { checkpoint, unmoved }: a plain Duration converts to both (the old strict reading), so callers that pass a bound are unchanged; - page switches (quote, save, restore receipt) pass WaitBounds::for_model(bound, the endpoint's launched model), read from the launch contract so a relaunch drain's saves are covered too; - the header wait passes WaitBounds::for_model(header_bound, its model); - the stream's starvation check calls unmoved_window directly. The refusal and busy probes now carry unmoved_ms. Tests (IntelMac, metal + test-fixtures, 33 passed): - a save behind a 190 s batch is served; - a receipt landing mid-window wins; - a never-moving engine ends within one checkpoint of the window; - a plain Duration is still stuck at once; - the moved window test covers no rate (floor) and a vanishing rate (capped). Mutation: restoring "processing and unmoved is stuck at once" fails the enrico fixture ("a switch behind a 190 s batch is served, not refused"). source-hygiene 60/60. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * unmoved window: the ceiling caps the rate's part, never the caller's floor (documented, pinned; Codex on #5462) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
…mes it (card e1a5a21a) (#5468) * The no-movement window takes the SLOWER measured prefill rate, and names it (card e1a5a21a) #5462 follow-up, measured on enrico 2026-10-26 13:15-14:15Z (0eeceda): 3 page-save quotes were still refused as "stopped progressing", with unmoved_ms 23,571 / 59,427 / 64,419. The per-request prefill rate read 9.7-16.2 tok/s (serving.prefill_rate.moved at 13:17, 13:28 and 14:13), so two 2,048-token batches take 250-420 s; the windows used imply 64-174 tok/s, the server-total rate unmoved_window preferred. Each refusal cost a mind her page. The errors are not symmetric: a window too long only delays calling a stuck engine (capped by UNMOVED_CEILING); a window too short refuses a working engine. window_rate (pure) takes the slower usable measurement and says which. WaitBounds carries the rate and its source, and the kv_page admission_refused and busy_not_dead probes report them. This reverses #4506's server-total preference, which assumed a long window was the costly error. Test: the_window_is_sized_from_the_slower_measured_rate (enrico's numbers: 9.7 vs 68 tok/s gives a >400 s window; the old choice gave ~60 s). Not built locally: no cargo on enrico while residents serve; CI compiles and tests it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * window docs: 250-420 s is TWO batches; one batch is 125-210 s at 9.7-16.2 tok/s (Codex on #5468) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
What broke: on the IntelMac at 05:07Z on 2026-09-28 (Cormac's read), a turn at 96% prefill failed at the 90 s idle bound (inference.decode.failed kind=keepalive_masked_no_progress). Meanwhile the server was prefilling slot 4's next 2,048-token chunk, about one every ~176 s at 11.6 tok/s, so our stream's own counters stood still. #4480 already stopped counting that as wedge evidence, but the turn still failed (sse_stream: "the turn still fails either way"). It is the busy-is-not-dead class behind the node's 41% dropped generations.
Fix:
Test: a_stalled_stream_waits_on_a_working_lane_and_only_there. It covers a working lane (waits on), a lane with no work (ends), a lane never observed (ends), and past the ceiling (ends).
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo