Kubernetes API Timeouts Traced to Three Bugs Across GKE, PSC and Linux

| 5 min read

Three failures, one symptom

The revealing part of this support case wasn’t the timeout. It was what the timeout concealed: three separate bugs, in three layers of the stack, combining to block roughly 800 developers from deploying to production for weeks. The case began in January 2026. Pods were intermittently unable to reach the Kubernetes API server, and the customer had already ruled out its own operators. GKE clusters across Google Cloud’s europe-west region were affected. Engineers from Google Kubernetes Engine (GKE), Private Service Connect (PSC), networking, hostnet, the kernel team and the Linux upstream community eventually traced the failures to three distinct causes. The final fix required a Linux kernel patch. Here’s how the investigation started.

Part one: The alarm bell that wouldn’t stop

The customer ran a large, multi-cluster GKE environment in europe-west, using Private Service Connect to expose the control plane privately. Its clusters also ran a range of system workloads: Twistlock security scanners, External Secrets Operator, Cilium network policy and several internal Kubernetes operators. The first errors appeared in a user acceptance testing (UAT) cluster in europe-west3. A few days later, a second cluster in the region showed the same problem. Applications across multiple namespaces reported timeouts when connecting to the cluster’s internal kube-apiserver VIP: ```text TimeoutError: Connect call failed ('1.2.3.4', 443) dial tcp 1.2.3.4:443: i/o timeout # 1.2.3.4 is the cluster's internal VIP for the kube-apiserver, # routed through Private Service Connect ``` At first, the failures came in bursts. The customer suspected a custom operator built with the *kopf* framework, but the logs put the first timeouts eight days before that operator was deployed. Shutting it down changed nothing. > “The issue persists even after completely scaling down the External Secrets Operator. The errors are appearing from customer workloads, and system-level pods we haven't touched.” That was a useful clue. The issue was showing up beyond the workloads the customer had changed.

Working through the suspects

The investigation began with the usual question: what changed? Several candidates were easy to test: - **The custom *kopf* operator:** Ruled out because the errors predated its deployment by a week and continued after it was stopped. - **External Secrets Operator:** Removed at the customer’s request. Timeouts continued in customer workloads that needed Kubernetes control plane (KCP) connectivity, as well as in cluster-internal system pods. - **Security agents:** Uninstalled, with no improvement. System-level Kubernetes components were still failing to reach their own control plane. - **Conntrack exhaustion:** The team checked whether half-open connections were filling the connection-tracking table on the control plane nodes. It was at about 50% of its default maximum of 1.3 million entries, far from full. - **Control plane overload:** The KCP VM was scaled up. kube-apiserver latency remained healthy, but the timeouts persisted. The reach was wider than any single workload. The team confirmed failures in five clusters, affecting DaemonSets, Deployments and system pods. External clients, including developer laptops and GitHub Actions runners, hit the same problem. That points to a shared connection path, not a broken application. The timeline shows how the case escalated: - **Day 1:** Intermittent I/O timeouts appear in one UAT cluster in europe-west3. - **Day 10:** The failures become frequent and persistent. - **Day 15:** The case is escalated and filed as a P0 bug. Multiple clusters are confirmed affected, about 800 developers are blocked, and production releases are frozen. - **Day 20:** The custom operator, security agents, conntrack exhaustion and control plane sizing have all been ruled out. - **Day 22:** Engineers collect packet captures at both the control plane node’s network interface and inside the kube-api container. With the obvious explanations gone, the investigation moved down the stack to the packets.

Part two: Tracing the ghost in the wire

A pod’s request to the Kubernetes API can take a surprisingly indirect route in a GKE cluster using Private Service Connect:
image1
The intended flow is: Pod → Worker Node → PSC NAT and proxy → internal load balancer → KCP VM network interface → kube-apiserver. When a pod connects to `1.2.3.4:443`, it’s dialing a virtual endpoint, not the control plane directly. Google’s networking fabric intercepts the connection, translates it through a Private Service Connect endpoint, sends it through an internal passthrough Network Load Balancer, then delivers it to the KCP VM. There, Envoy acts as a local proxy in front of kube-apiserver. PSC also adds a proxy protocol header to each new connection so kube-apiserver can see the client’s real IP. That detail would matter later.

What the packet captures showed

Engineers captured traffic at the KCP VM’s PIGv interface, Google’s programmable virtual network interface, and inside the kube-apiserver container. The incoming SYN packets were reaching the VM. The reply was the problem: instead of the SYN-ACK expected in a TCP handshake, the client received an ACK that belonged to an earlier connection. Wireshark initially labeled the streams “TCP Port numbers reused.” The example below shows a completed connection, retransmissions of its ACK, and a later SYN reusing source port 53426. The new SYN receives an ACK associated with the previous stream, then times out. ```text Time Source Port → Destination Port Info 09:13:41 10.0.13.77 53426 → 10.117.0.2 443 [SYN] Seq=0 Win=42600 09:13:41 10.117.0.2 443 → 10.0.13.77 53426 [SYN, ACK] Seq=0 Ack=1 Win=64768 ... (data exchange, connection completes) 09:13:42 10.117.0.2 443 → 10.0.13.77 53426 [TCP Retransmission] 09:13:42 10.117.0.2 443 → 10.0.13.77 53426 [TCP Retransmission] ... (many retransmissions of the same ACK) # 2 minutes later, same port 53426 is reused for a new connection 09:13:44 10.0.13.77 53426 → 10.117.0.2 443 [SYN] Seq=1498 ← NEW connection (expected: SYN-ACK) (received: ACK Seq=1498 Ack=1025 — belongs to PREVIOUS stream) 09:13:44 10.0.13.77 53426 → 10.117.0.2 443 [SYN] Retransmit... 09:13:44 10.0.13.77 53426 → 10.117.0.2 443 [SYN] Retransmit... → eventually: i/o timeout ``` The pattern suggested that the KCP VM was answering a fresh SYN with an ACK from a connection that had ended minutes earlier. The old connection had used the same source port, and the VM had not fully cleared its state. The packet sequence from the investigation describes the close in more detail: > “The KCP server sends FIN,ACK; client responds with FIN,ACK and then ACK. But KCP receives ACK before FIN,ACK. KCP server never ACKs the FIN,ACK — continuous retransmission of ACK. RST does not clear state.”

An “Invalid ACK” counter starts climbing

As one group examined packet captures, another checked metrics for the Private Service Connect infrastructure, including the user space packet switch (USPS). USPS is Google’s software switching layer for NAT and proxy protocol header injection on PSC connections. In Andromeda, Google’s networking fabric, a counter named “Proxy protocol drop: invalid ACK packet” had stayed flat for months. In February 2026, it rose sharply to several drops per second across the affected europe-west regions. The timing matched a USPS version rollout. That release included a fix for a different bug. The available evidence showed that it also changed how PSC handled a particular class of packet, though the metric alone didn’t explain why.

Why a TCP challenge ACK matters

The next clue involved challenge ACKs, a TCP security mechanism defined in RFC 5961. After a TCP connection closes, the server may retain its sequence numbers briefly. If a new connection arrives using the same source and destination ports—the same five-tuple—the kernel can’t immediately tell whether it’s seeing a stale packet from the old connection or an attempt to inject data into a session. RFC 5961 specifies a cautious response: send a challenge ACK carrying the old connection’s last known sequence number. A legitimate client that receives this unexpected ACK should recognize that stale state is involved and send a reset (RST). The server can then clear the old state and accept a fresh SYN. ```text # Step 1: New client sends SYN on a reused port Client → Server: SYN (seq=X, same 5-tuple as an old connection) # Step 2: Server is in FIN_WAIT_2, sends challenge ACK Server → Client: ACK (ack=old_seq — "is this really you?") # Step 3: Client recognizes the stale state, resets it Client → Server: RST # Step 4: State is cleared. Server accepts the next SYN normally. Client → Server: SYN (new connection) Server → Client: SYN-ACK ← handshake succeeds ``` The mechanism depends on that challenge ACK reaching the client. The USPS change was dropping it.

The side effect of a security fix

The USPS change was intended to address a legitimate security issue in PSC’s proxy protocol handling. As part of that work, it dropped packets classified as “invalid ACKs” during a connection handshake—specifically, ACKs arriving before the initial SYN-ACK. A challenge ACK fits that description: it arrives in response to a SYN, before the new handshake has completed. USPS silently discarded it. PSC’s use of NAT made this failure more likely to surface in GKE. Many pods, across different nodes and namespaces, share a single endpoint; after NAT, they can reuse source ports and create five-tuple collisions. That makes challenge ACKs more frequent than they would be on a typical direct connection. The USPS change didn’t create challenge ACKs. They were already part of TCP’s handling of stale connections. The change blocked them, breaking a cleanup process the GKE TCP stack had been relying on.

Mitigation: Rolling back the change

The rollback restored service, but exposed a deeper failure

In February, rolling back the USPS change restored the previous behavior: challenge ACKs passed through instead of being dropped. The rate of “Proxy protocol drop: invalid ACK packet” fell toward baseline almost immediately. By early March 2026, the customer confirmed that all affected clusters had recovered and timeout errors had stopped. That got the customer back online. It didn’t explain why the KCP VM could leave a connection in FIN_WAIT_2 for more than two minutes. The rollback had restored behavior the system had accidentally come to rely on, so the investigation continued.

Three failures lined up

The first clue came from packet captures taken at the KCP VM’s host NIC and at the PIGv, the virtual NIC visible to the VM. Packets arrived in order at the host, then appeared reordered after passing through USPS. Private Service Connect’s miss-thread processing explains how that can happen. A packet starting a new flow takes a slower path to add the proxy protocol header and establish NAT state; later packets use a faster path. During connection teardown, that difference can let a FIN or RST arrive after ACKs that followed it. What the KCP VM received:
# Expected close:
Client → Server: FIN, ACK
Server → Client: ACK
Server → Client: FIN, ACK
Client → Server: ACK
→ Connection closed.

# Reordered close at the KCP VM:
Client → Server: ACK
Client → Server: FIN, ACK
Server → Client: FIN, ACK
Client → Server: FIN, ACK
→ The server should ACK the client's FIN, but doesn't.
The reordered client FIN arrived after the server had sent its own FIN. The server moved through FIN_WAIT_1 to FIN_WAIT_2 after receiving the client’s ACK, then ignored the client’s delayed FIN. Why didn’t Linux clean up the socket? On the KCP VM, tcp_fin_timeout was set to 60 seconds, but that timer applies only to orphaned sockets—those no longer held by a process. Envoy, the proxy in front of kube-apiserver, had called shutdown(SHUT_WR). That closes the write side while keeping the socket open to receive data, a valid form of TCP half-close. Because Envoy still held the socket, Linux didn’t consider it orphaned, and the timeout never started.
Proto Local Address    Foreign Address  State
tcp   10.128.0.5:443   10.0.13.77:53426 FIN_WAIT_2

# The socket has remained in FIN_WAIT_2 for more than 120 seconds.
# tcp_fin_timeout=60 hasn't fired because Envoy holds it with SHUT_WR.
# Private Service Connect NAT reuses port 53426 for a new pod connection.
# The new SYN matches the old 5-tuple; the kernel sends a challenge ACK.
# USPS drops that ACK, and the connection times out.
There was also a Linux kernel bug. A normally functioning TCP stack should process a FIN received in FIN_WAIT_2 and advance the connection to TIME_WAIT. In kernel 6.1, which ran on the KCP VMs’ Container-Optimized OS (COS), that didn’t always happen. The problem was in tcp_ack(). RFC 5961 allows certain older ACK numbers when they fall within an acceptable sequence window, accounting for packet reordering. In one kernel 6.1 code path, tcp_ack() returned zero for an old but acceptable ACK. The FIN-processing caller treated that result as a reason to stop, silently discarding the FIN.
commit 795a7dfbc3d9
Author: Eric Dumazet <edumazet@google.com>
net: tcp: accept old ack during closing

tcp_ack() returns 0 when ack is old but acceptable wrt rfc5961.
In FIN_WAIT_2, this caused tcp_fin() to never be called for a
valid received FIN, leaving the connection stuck indefinitely.

Fixed: properly handle old-but-acceptable ACKs during connection close.
Introduced in 6.1, fixed in 6.9.7. LTS backports: 6.6.y and 6.1.y.
The bug was introduced in 6.1 and fixed upstream in 6.9.7. GKE’s KCP VMs used COS builds based on 6.1 and 6.6, so the correction had to be backported and delivered in a COS image update.

Why the combination mattered

Each issue had a different role. Packet reordering made the FIN arrive late. Envoy’s half-close kept the socket from becoming an orphan, so the timeout couldn’t clean it up. The kernel bug prevented it from handling the delayed FIN. Then Private Service Connect NAT reused the port, the kernel sent a challenge ACK, and the USPS change dropped it. The connection failed. Alone, each bug would have had a narrower effect. Together, they turned a delayed packet into a persistent socket, then into a customer-visible timeout. The resolution required three changes across several teams and weeks of work: - **Immediate mitigation, February 2026:** USPS was rolled back so challenge ACKs were forwarded again. The affected clusters recovered by early March. - **Proxy protocol correction:** A replacement Private Service Connect change addressed the challenge ACK case. The team added a PacketDrill test to catch regressions. - **Kernel fix:** Eric Dumazet’s upstream patch, “net: tcp: accept old ack during closing,” was merged in Linux 6.9.7 and backported to the 6.6.y and 6.1.y LTS branches. It shipped in GKE 1.33.5 and later, resolving the issue at the OS level for GKE versions using those COS images.

What the investigation required

The same i/o timeout could point to Private Service Connect, the Linux TCP state machine, or Envoy. Each layer offered a plausible explanation, but none told the whole story. This is more significant than it first appears: the failure only made sense once the teams connected what each layer was doing to the same packet sequence. Simultaneous captures at the host NIC, the PIGv, and inside the container revealed the reordering. Correlating those captures with the February 18 USPS metric spike exposed the dropped challenge ACKs. Reproducing the behavior in a lab led to the kernel bug. Without those steps, the rollback might have looked like a complete fix. The work took about two weeks and drew on seven or eight specialties, including GKE networking, Private Service Connect infrastructure, Hostnet, Andromeda, and KCP, along with the kernel community. Shared case notes, a bug tracker, and carefully collected packet captures helped the distributed group build one explanation from evidence spread across several systems. The customer returned to production, and the kernel received a fix. The lasting lesson is practical: when network symptoms cross product boundaries, packet-level evidence from multiple points in the path can be the difference between restoring service and finding the reason it failed.

This blog is based on real case data from an anonymized customer support engagement and internal bugs. The Linux kernel fix referenced is commit 795a7dfbc3d9, authored by Eric Dumazet. Thanks to the engineers across GKE, Private Service Connect, Hostnet, Andromeda, COS, and the Linux networking community who helped resolve the issue.

Source: Akash Thakur · cloud.google.com