Repository navigation
fix(moq-quic): only a Data-space packet can be the MTU probe - #8967
Conversation
Loss detection matched every space's packet numbers against the in-flight MTU probe, which only the Data space sends. A Handshake packet sharing the probe's number was skipped as a lost probe (removing the real probe from the Data space), then declared lost on a later pass after a higher packet, which broke the lost-packet map's increasing-insert invariant. Black-hole detection also took other spaces' packet numbers. 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 17 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. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the space-scoping fix for MTU probe identification in moq-quic loss detection.
in_flight_mtu_probe(space): returnsNoneoutsideSpaceId::Data, so a Handshake or Initial packet that has the same number as the Data-space probe is no longer skipped as the probe. That also stops the latersent_packets.removeonSpaceId::Datafrom removing the real probe.on_non_probe_lost(space, …): drops non-Data losses before the black-hole detector sees them. This also removes a latentpn - current.latest_non_probeunderflow inBlackHoleDetector::on_non_probe_lostwhen a Handshake pn is lower than a Data pn already recorded. The signatures now match the existingon_acked(space, …).- Tests: call sites updated, and the search test now asserts that no Handshake pn counts as the probe.
claude-opus-5-5 | 𝕏
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed 3fab898a166e0708487691109211b438802ff4d5. No blocker. Probe lookup and black-hole loss accounting now use the Data packet-number space, consistent with ACK handling; Handshake loss can no longer remove the same-numbered Data probe. Since the failing case was rare in the sweep, I'd keep the exact deterministic handshake case as a regression fixture if it runs cheaply. Static review only; I did not rerun the simulator.

Summary
Nightly's
Tests (rs quic-sim)failedtests::sim::handshake_under_loss(job 133445816309) on adebug_assertinSlots::insert: "insertions must increase".Root cause:
detect_lost_packetscompared every space's packet numbers against the in-flight MTU probe's number, but only the Data space sends probes and every space numbers from 0. In the failing case the client's Handshake pn 0 matched the Data-space probe's pn 0. Loss detection skipped Handshake pn 0 as a "lost MTU probe" and declared pn 1 lost. Then it removed the real probe from the Data space's sent packets, and the next pass declared Handshake pn 0 lost after pn 1, solost_packetsgot an insert below its last entry. In release builds the assert is off, so the Data probe is marked lost by mistake and the Handshake packet's loss is delayed.MtuDiscovery::in_flight_mtu_probeandon_non_probe_lostnow take theSpaceId, ason_ackedalready does, and ignore other spaces. The black-hole detector orders losses against probes by packet number, so Handshake losses no longer go into it either.The bug came from quinn: quinn-proto 0.11.19 has the same
in_flight_mtu_probe()comparison and space-blindon_non_probe_lost.The quiche
handshakelossinterop cellThe other Nightly failure in this area,
MISMATCH client=moq-quic server=quiche handshakeloss(job 132842368343), is a different cause. The moq-quic client loggedhandshake timed out(no panic). That run was on 505a86f, before #8824 raisedhandshake_timeoutfrom 10 s to 30 s for exactly this case. Any residual is owned byquest/m4/quic-handshake-speedup.md. Interop only began running in Nightly two days ago, and today's jobs (which include #8824) were still running when this opened.Validation
handshake(14917314294402731587, 26290µs, loss 0.2415 / 0.1728)(the failing case from the CI log). Before the fix, it panicked inSlots<LostPacket>::insertfromdetect_lost_packetsviaon_loss_detection_timeout. Instrumented, it showed client Handshakesent=[0,1,2,3], both well pastloss_delay, with only pn 1 declared lost. After the fix it passes.MOQ_QUIC_SEED=573977490 MOQ_QUIC_CASES=4096(the Nightly configuration) passes, and so do seeds 1, 2, 3 at 4096 cases. Before the fix, seeds 1 to 3 pass too, so the collision is rare (one case in about 16k).cargo test -p moq-quic --lib mtudpasses (all mtud and MTU discovery connection tests).just checkpasses.Impact
MtuDiscovery).Caused by
Inherited from quinn with the port (moq-dev/moq#6635 era), so it is as old as the code. Exposed by the new
handshake_under_losssweep from moq-dev/moq#8824.Models
Size: XS
Implementer: Claude, claude-opus-5-5, unknown effort
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 3fab898
Base: origin/main at 13e593c
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1e564-18d9-7b33-aebb-680c981acb3a, round 1Score: 9/10,
The fix correctly scopes MTU-probe identification and black-hole loss tracking to Data-space packet numbers, with no actionable regressions found by source inspection; builds and tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none