Skip to content

recovery: fix BBRv2 PROBE_RTT wedge when inflight target is below cwnd floor - #2711

Open
NAVEENKUMARKR777 wants to merge 2 commits into
cloudflare:masterfrom
NAVEENKUMARKR777:fix/bbr2-probe-rtt-min-window-2698
Open

recovery: fix BBRv2 PROBE_RTT wedge when inflight target is below cwnd floor#2711
NAVEENKUMARKR777 wants to merge 2 commits into
cloudflare:masterfrom
NAVEENKUMARKR777:fix/bbr2-probe-rtt-min-window-2698

Conversation

@NAVEENKUMARKR777

Copy link
Copy Markdown

Summary

PROBE_RTT can only arm its 200ms exit timer once bytes_in_flight drains
below inflight_target (0.5 × BDP). When that target is below the
connection's cwnd floor (e.g. a large initial congestion window on a
low-RTT path), the floor keeps bytes_in_flight pinned above the target
forever, the exit timer never gets armed, and the connection wedges in
PROBE_RTT indefinitely with cwnd stuck at the floor.

Google's reference implementation (bbr2_probe_rtt.cc) arms the exit
timer when in-flight drops below the inflight target or below the
minimum congestion window, making the check exhaustive over both
cwnd-clamp outcomes:

if (congestion_event.bytes_in_flight <= InflightTarget() ||
    congestion_event.bytes_in_flight <=
        sender_->GetMinimumCongestionWindow()) {
  exit_time_ = congestion_event.event_time + Params().probe_rtt_duration;

The port only kept the first clause. This PR plumbs the connection's cwnd
lower bound (cwnd_limits.min()) through ModeImpl::on_congestion_event
and restores the second clause in ProbeRTT::on_congestion_event.

Fixes #2698.

Test plan

  • Added probe_rtt_exits_when_inflight_hits_the_cwnd_floor, a
    regression test that reproduces the wedge (verified it fails
    without the fix and passes with it).
  • cargo test -p quiche --features gcongestion,qlog recovery::gcongestion — 117 passed.
  • cargo test -p quiche --features gcongestion,qlog,ffi,internal — full suite, 1102 passed + 45 doc-tests.

🤖 Generated with Claude Code

…d floor

PROBE_RTT can only arm its 200ms exit timer once bytes_in_flight drains
below inflight_target (0.5 * BDP). When that target is below the
connection's cwnd floor (e.g. a large initial congestion window on a
low-RTT path), the floor keeps bytes_in_flight pinned above the target
forever, the exit timer never gets armed, and the connection wedges in
PROBE_RTT indefinitely with cwnd stuck at the floor.

Google's reference implementation arms the exit timer when in-flight
drops below the inflight target *or* below the minimum congestion
window, making the check exhaustive over both cwnd-clamp outcomes. Plumb
the connection's cwnd lower bound through ModeImpl::on_congestion_event
and restore that second clause in ProbeRTT.

Fixes cloudflare#2698

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@NAVEENKUMARKR777
NAVEENKUMARKR777 requested a review from a team as a code owner September 7, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BBRv2 connection can stay in PROBE_RTT indefinitely: exit condition is missing the minimum-window clause from the reference implementation

1 participant