A Linux kernel optimization from 2017, designed to fix a TCP edge case, quietly introduced a bug that could strand QUIC connections in a congestion spiral they couldn't escape.
Cloudflare engineers noticed their QUIC integration tests were failing roughly 60 percent of the time under conditions of heavy early packet loss. The culprit was CUBIC, the default congestion control algorithm in Linux and the one used in Cloudflare's open-source QUIC library, quiche. After the simulated loss phase ended, the congestion window locked at its floor of 2,700 bytes (two full-size packets) and oscillated between recovery and avoidance states 999 times over 6.7 seconds, once per round-trip time, never climbing back out. Tracing the problem led to a 2017 Linux kernel commit that resets CUBIC's internal epoch counter whenever bytes-in-flight drops to zero, a change originally meant to prevent runaway window inflation when idle TCP connections resume sending.
CUBIC governs bandwidth probing for most TCP and QUIC traffic on the public internet, so a broken recovery path isn't an academic edge case; it's a connection that stalls instead of finishing. The bug is also a textbook example of a recurring infrastructure hazard: optimizations ported from TCP into QUIC can arrive carrying timing assumptions that don't hold in the newer protocol, where the ACK clock behaves differently and the epoch logic that saved TCP creates a trap.
The eventual fix was close to a single line of code. Getting there required 999 state transitions worth of instrumentation and the kind of corner-case test coverage that most congestion control suites never bother to include.
