Repository navigation
fix(inference): a stream whose own progress stalls on a lane that is delivering to others is starvation, not wedge evidence (card 2caa0de5) - #4480
Merged
Conversation
…delivering to others is starvation, not wedge evidence (card 2caa0de5)
sse_stream stamped note_real_decode_failure for keepalive_masked_no_progress
unconditionally, and two stamps trip serving.health via=real_turn_failures,
which outranks the real_work and slot_progress trust paths. On the IntelMac on
2026-09-27 a fresh lane was relaunched 8 min after it started (21:23Z) while
health read ok via real_work (21:22:11) and slot_progress (21:22:26): with 6
CPU slots, one request's prefill sat behind the others' for its whole idle
window. That was the 7th relaunch drain of the day.
The never-started path already answers this with
classify_never_started_timeout(ms_since_real_work, waited): real work for
anyone within the wait = Starved, nothing stamped (the 2026-08-15 bench-hard-rs
lesson). The keepalive-masked path now asks the same question. Starved probes
inference.queue_starved {stalled: progress} and the turn still fails; a lane
that delivered nothing to anyone in the window still counts (#363 intact). The
classifier is the already table-tested pure function; its doc now names both
uses.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
Contributor
Author
|
Fable read d5ff4d6: right, and it reuses the one classifier (classify_never_started_timeout on ms_since_real_work) instead of a second rule: a stalled stream on a lane that delivered real work to anyone within the idle window is starvation (inference.queue_starved), never a relaunch stamp. Word at green. Non-blocking: the starved turn itself still fails. Under #4453's rule it could keep waiting at the checkpoint while the lane delivers, instead of throwing away the work already prefilled; worth a follow-up card. |
Contributor
Author
|
Fable: APPROVED at d5ff4d6, 8/8 green. |
joelteply
deleted the
fix/keepalive-stall-on-busy-lane-is-starvation
branch
September 27, 2026 21:48
joelteply
added a commit
that referenced
this pull request
Sep 28, 2026
…n (a checkpoint), bounded by the act's ceiling; 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 (keepalive_masked_no_progress) while the server prefilled slot 4's 2,048-token chunk every ~176 s. #4480 already stopped counting that as wedge evidence, but the turn still failed. Now both the no-bytes timeout and the progress stall classify by the lane's last real work: a lane that worked for anyone in the window is busy, the bound becomes a checkpoint (inference.stream.busy_not_dead) and the stream waits on, up to the act's own 3x ceiling. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A stream whose own progress stalls on a lane that is delivering to others is starvation, not wedge evidence (card 2caa0de5).
What happened (IntelMac, 2026-09-27, core log)
inference.decode.failed kind=keepalive_masked_no_progress. A request's stream kept carrying keepalive bytes while its own prefill or decode didn't advance for the idle window.serving.health ok=true via=real_work, and 21:22:26ok=true via=slot_progress. The lane was delivering and progressing.via=real_turn_failureshits threshold 2 and relaunches, outranking every trust path. It was the 7th drain.With 6 CPU slots, one request's prefill can sit behind the others' for its whole idle window while the engine works. At one build job the build was only 48% CPU (llama-server 305%, core 186%), so this is contention.
The fix
The never-started path in
sse_streamalready asks the right question:classify_never_started_timeout(ms_since_real_work, waited). If real work reached anyone during the wait, the result isStarvedand nothing is stamped (the 2026-08-15 bench-hard-rs lesson). The keepalive-masked path skipped that question and stamped unconditionally, and now it asks it:inference.queue_starved {stalled: "progress"}. The turn still fails, and nothing counts toward relaunch.Test
The decision is the already table-tested pure
classify_never_started_timeout(never_started_timeout_on_a_delivering_lane_is_starvation_not_wedge_evidence: delivering, quiet, never, boundary); its doc now names both uses. The wiring mirrors the never-started arm line for line. A stream-level test would read two process-globals (the failure counter and the last-real-work clock) and be order-dependent, so I didn't add one.Not built locally: this node's deploy build holds the shared target. CI is the compile.
Docs: CONCURRENCY-STYLE-GUIDE. Siblings: #4468 (a condemned engine ends waits at their checkpoint), #4471 (the build cap).
🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE