---
title: "When \"idle\" isn't idle: how a Linux kernel optimization became a QUIC bug"
url: https://daily.dev/posts/when-idle-isn-t-idle-how-a-linux-kernel-optimization-became-a-quic-bug-y5u5jcdr8
source_url: https://blog.cloudflare.com/quic-death-spiral-fix
type: article
source: "Cloudflare"
published: 2026-05-12T13:40:44.800Z
updated: 2026-05-12T13:41:09.762Z
tags: ["rust", "networking"]
reading_time: 14
upvotes: 48
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# When "idle" isn't idle: how a Linux kernel optimization became a QUIC bug

**[Cloudflare](https://daily.dev/sources/cloudflare)** · 14 min read · 48 upvotes · 0 comments

## Summary

A deep-dive into a CUBIC congestion control bug in Cloudflare's quiche QUIC library, where the congestion window became permanently pinned at its minimum floor after heavy packet loss, causing a 'death spiral'. The root cause was a Linux kernel optimization for handling idle periods that was incorrectly ported to user-space QUIC: when cwnd collapsed to two packets, every ACK cycle drove bytes_in_flight to zero, which the code misidentified as application idleness rather than congestion-limited waiting. This inflated the idle delta by a full RTT, pushing the recovery start time into the future and preventing cwnd growth. The fix was to measure idle duration from the last ACK time rather than the last send time, accurately distinguishing true idleness from normal RTT wait periods. The change restored 100% pass rates in the test suite.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.cloudflare.com/quic-death-spiral-fix>

## Similar posts on daily.dev

- [How Cloudflare Solved a Congestion Bug in quiche](https://daily.dev/posts/how-cloudflare-solved-a-congestion-bug-in-quiche-arfb4mtr5) · InfoQ · 2 upvotes · 0 comments
- [Defending QUIC from acknowledgement-based DDoS attacks](https://daily.dev/posts/defending-quic-from-acknowledgement-based-ddos-attacks-1fnmwhvvy) · Cloudflare · 1 upvotes · 0 comments
- [IonStack part II: GhostLock, a stack-UAF that has existed in ALL Linux distributions for 15 years](https://daily.dev/posts/ionstack-part-ii-ghostlock-a-stack-uaf-that-has-existed-in-all-linux-distributions-for-15-years-wznoxduhk) · Hacker News · 2 upvotes · 0 comments

---

Tags: [#rust](https://daily.dev/tags/rust), [#networking](https://daily.dev/tags/networking)

[View this post on daily.dev](https://daily.dev/posts/when-idle-isn-t-idle-how-a-linux-kernel-optimization-became-a-quic-bug-y5u5jcdr8)
