Repository navigation
fix(net): stop a stalled group read spinning on closed routes - #6690
Conversation
Recover::wants polled the route state in a loop until it was pending, but a closed route state stays ready forever. A reader stalled mid-group when its routes closed without concluding spun inside one poll. Treat closed routes like a conclusion, as Recover::poll and end() already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review.
|
Problem
Recover::wantsinrs/moq-net/src/model/resume.rsloops whilepoll_changedis ready.poll_changedmaps a closed route state (kioReferror) toReady. When the routes close without settingendorconcluded, and a reader is stalled mid-group on the same copy, the loop never exits: one worker spins at 100% CPU inside a single poll, fromGroupServe::poll_servethroughgroup::Consumer::poll_resumedintowants. A runtime waiting on that task never shuts down. It came in with #6224.Approach
Treat
route.is_closed()likeconcludedin the loop's exit check, asRecover::pollandend()already do. A closed route then reads like a conclusion: the reader parks on the copy it is reading and finishes the group from it.Regression test
a_stalled_group_parks_when_the_routes_close: a reader stalled mid-group, routes dropped, then the read is pending, and the group finishes from the original copy. Without the fix, kio's sim poll budget panics with "Ready poll limit exceeded" atpoll_changed.Impact
Alternatives
poll_changedreturnPendingon a closed state: it would then never wake for a closed route, andpoll's own closed check relies on it waking.Follow-ups
just cipasses on 558d633.(Written by Opus 5.5)
🤖 Generated with Claude Code