CUBIC Congestion Controller Bug Causes Persistent Minimum cwnd in Quiche, Fixed by One‑Line Patch
Patch the CUBIC epoch logic to reset on idle and allow cwnd to recover after loss.
Patch the CUBIC implementation by resetting the epoch on idle to allow cwnd to recover.
Summary
Quiche, Cloudflare’s open‑source QUIC implementation, uses CUBIC as its default congestion controller. A test that injects 30 % packet loss for the first two seconds and then stops loss fails 61 % of the time; the congestion window remains pinned at the minimum floor of 2700 bytes and oscillates every ~14 ms, matching the 10 ms RTT. The bug manifests after a congestion collapse event when the network stops dropping packets, yet CUBIC fails to grow the window.
Root cause analysis traced the issue to the app‑limited exclusion logic introduced by a Linux kernel commit (30927520dbae…) that resets the epoch only on loss. When the application idles, delta_t grows arbitrarily large, causing the cubic growth curve to produce a very steep slope and a cwnd that never recovers. Reno passes the same test, confirming the problem is specific to CUBIC.
The fix is a single line that resets the epoch on idle or adjusts the delta_t calculation so that cwnd can grow after loss. After applying the patch, the test passes consistently and CUBIC behaves correctly in loss‑heavy scenarios. The incident highlights the importance of testing congestion controllers in extreme states that are rarely exercised in normal traffic.
Key changes
- CUBIC cwnd remains pinned at the minimum floor of 2700 bytes after loss stops.
- Oscillation occurs every ~14 ms, matching the 10 ms RTT, with 999 state transitions in ~6.7 s.
- Bug originates from the app‑limited exclusion logic in the Linux kernel commit 30927520dbae….
- The epoch is only reset on loss, causing delta_t to grow arbitrarily large during idle periods.
- Reno passes the same test, confirming the issue is specific to CUBIC.
- A one‑line patch resets the epoch on idle or adjusts delta_t to prevent cwnd from staying at minimum.
- After the patch, cwnd recovers and the test passes consistently.
- The fix demonstrates the need for loss‑heavy scenario testing in congestion controllers.