Repository navigation
fix(quic): announce stream limits that arrive after a refused open - #5774
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A server accepted before the rest of a multi-packet ClientHello learns the client's stream limits only when the next Initial arrives. A 0.5-RTT open_uni refused in between never woke, so the connection sat until the idle timeout. That is what fails moq-tokio's zero_rtt test on macOS, where loopback can deliver the second Initial after accept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 16 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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. |
|
Merge summary:
(Written by Claude Opus 5.5) |
Problem
moq-tokio quic::driver::tests::zero_rtthas failed on every macOS Platform run since #5664 moved moq-tokio ontomoq-quic(first failure in run 38924430657). It times out in the initial full handshake: the server's 0.5-RTTopen_uniand the client's firstaccept_uniboth end inTimedOutafter the 30s idle timeout. Linux passes.The default aws-lc-rs provider sends a post-quantum key share, so the ClientHello (about 1.5 KB) spans two Initial packets. On Linux both have arrived by the time the server calls
accept, andfinish_acceptreplays the second one, so the client's transport parameters are known before the test callsinto_0rtt().open_uni(). When the second Initial shows up afteracceptinstead, which macOS loopback allows, the server has a stream limit of 0.open_uniis refused and parks onStreamEvent::Available. The second Initial then sets the limit throughStreamsState::set_params, which emits no event. Nothing wakes the opener, and the connection idles out. Upstream quinn has the sameset_params(checked againstmain), and noq does too. This test was first added to the repo in #5664, so it never ran on the noq stack.Approach
StreamsState::set_paramsemitsStreamEvent::Availablewhen it raises a stream limit after anopenwas refused, the same eventMAX_STREAMSraises. A newopen_refusedflag gates it so ordinary handshakes emit no extra event. A plain "limit rose" check fired on every connection and broke 29 proto tests that assert exact event sequences.moq-quic tests::late_peer_params_make_streams_available: long ALPN names split the ClientHello under either crypto provider, the server accepts after the first Initial,openis refused, and once the pair is driven the server must reportAvailableand open the stream. Without the fix it fails on Linux at theAvailableassertion.rs/moq-quic/README.md.Impact
StreamEvent::Availablealready exists and now also fires in this case.Alternatives
stream_budget_availablein the moq-tokio driver onHandshakeDataReady. That would only work around a missing proto event, and moq-uring and other drivers would still be broken.Availableon every limit increase from transport parameters. Correct, but it adds an event to every handshake and churns 29 tests.Verification
just checkpasses locally.zero_rttin 0.18s instead of a 30s timeout). Windows failed only on the knownmoq-relay::drills relay_killed_mid_group_aborts_then_resumes(quest/m0/ci/platform-windows-drill.md).Follow-ups
moq-gst source::imp::session_tests::a_refused_redial_posts_a_bus_error_after_playbackfailed once locally withAddrInUseon a loaded host. It is unrelated to this change, and the rerun passed.🤖 Generated with Claude Code
(Written by Opus 5.5)