Skip to content
STIRUP

TECHNOLOGY INTELLIGENCE

Understand what's next.

Google Traces GKE API Timeouts to Linux Kernel TCP Bug

Intermittent Kubernetes API timeouts in GKE were traced to three interacting issues involving PSC, Envoy, and a Linux kernel bug that discarded reordered FIN packets.

Share
AI-generated conceptual illustration accompanying: Google Traces GKE API Timeouts to Linux Kernel TCP Bug
AI-generated editorial illustration of the article topic; not a photograph, product screenshot or measured result.

Interacting Bugs Across Systems

Interacting bugs across systems can lead to complex and difficult-to-diagnose failures in cloud infrastructure. Google recently traced intermittent Kubernetes API timeouts in GKE to three interacting issues spanning GKE, Private Service Connect (PSC), and the Linux kernel. According to InfoQ, a customer using PSC for private control-plane access experienced intermittent timeouts when pods attempted to reach the Kubernetes API server. The investigation revealed that packet reordering in PSC, combined with Envoy's half-close behavior, and a Linux kernel bug that discarded certain reordered FIN packets, collectively caused the connectivity failures. These issues blocked approximately 800 developers from deploying to production. The case highlights the challenges of debugging distributed systems and the importance of cross-layer collaboration in cloud environments.

Collaborative Root Cause Analysis

In the collaborative root cause analysis of GKE API timeouts, engineers from multiple Google teams, including GKE, Private Service Connect, networking, hostnet, kernel, and the Linux upstream community, worked together to identify three distinct root causes. Akash Thakur, a senior technical solutions engineer at Google Cloud, explained that the investigation involved complex troubleshooting across I/O timeouts, virtual network interfaces, and the Linux TCP state machine. This effort ultimately revealed a kernel issue that caused sockets to remain indefinitely in the FIN_WAIT_2 state. Packet captures at multiple network layers were essential in identifying the problem, while correlating network symptoms with infrastructure changes helped establish the connection between the three bugs. The findings were shared in a blog post by Google Cloud.

Resolution and Kernel Patch

The resolution to the GKE API timeouts traced back to a Linux kernel TCP bug required a fundamental change at the operating system level. According to reports, the final fix was not implemented through a configuration adjustment or a feature flag, but rather as a direct patch to the Linux kernel. This patch, authored by Eric Dumazet, formerly a software engineer at Google, addressed the underlying TCP issue that was causing the timeouts. The kernel fix was merged into Linux version 6.9.7 and backported to the 6.6 and 6.1 LTS branches. As a result, GKE customers began receiving the update in version 1.33.5 and later. This approach highlights the importance of kernel-level fixes in resolving complex networking issues that impact cloud infrastructure.

Complexity of Infrastructure Failures

How Google Traced GKE API Timeouts to a Linux Kernel TCP Bug

Complexity of Infrastructure Failures

Infrastructure failures often arise from the interplay of multiple components, making root cause analysis challenging. In the case of Google Kubernetes Engine (GKE) API timeouts, the symptom — an I/O timeout on a connection that never completed — was consistent across layers, including the Private Service Connect, the kernel's TCP state machine, and Envoy's connection management. This uniformity in symptoms across different system layers made the issue particularly difficult to diagnose.

Guangba Yu, a postdoctoral researcher at the Chinese University of Hong Kong, emphasizes that for AIOps and chaos engineering, the key is to organize simultaneous path observations, protocol state, and rollout events while distinguishing symptom recovery from state-machine correction. This approach helps in identifying whether a system is merely recovering from a symptom or actually correcting the underlying state machine.

Thakur highlights how individually reasonable behaviors across networking, proxies, and operating systems can combine into complex infrastructure failures. This underscores the need for a holistic approach to diagnosing and resolving such issues.

Kernel Version and Backporting

Google Cloud Kubernetes Engine (GKE) encountered API timeouts traced back to a Linux kernel TCP bug. The kernel version in use by GKE was 6.1, which is three years old. Although the bug had already been fixed in the upstream kernel, GKE required a backport of the fix to apply it to their older version. This highlights the challenges of maintaining compatibility and security in production environments that rely on older software versions. Justin Garrison, field CTO at Sidero, noted initial interest in the article's discussion of kernel patches, emphasizing their importance in addressing such issues. However, the anonymized case provided does not include a population failure rate or fully explain all API timeout incidents. As such, the evidence points to a specific technical challenge rather than a comprehensive analysis of the problem's scope.

Sources and reporting notes

Based on published source material. No independent hands-on testing is claimed.

Read more