Skip to content

proxy handoff on the DESTINATION node stalls new connections — 8 mesh_dns-tier first_byte timeouts in 1.4 s (w04, sixth proxy roll) #1320

Closed as not planned

Description

@bpalermo

Found grading the 8 h soak nightly-1006-surge/2.4.9-73c23e3 (T0 2026-10-06T15:02:13Z, talos-main). Successor to #1240 (closed with the Pyroscope move, which did relieve w05: stalls 10,807 → 1,721, slow probes 295 → 28).

8 AETHER_PROBE_FAIL lines between 20:39:28.13Z and 20:39:29.49Z, from FOUR source nodes (w04 ×4, w05, w01, w03), 4 on the authoritative target and 4 on the forwarded one. With the new phase fields (#1252) every one reads phase=first_byte reused=false, DNS 3.5–372 ms and connect 0.6–2.7 ms complete, ttfb_ms 1627–1999: the budget ran out waiting for the first byte. Liveness 0/719,981; k6 0/9,179,931.

Source access logs for 20:39:20–35Z: 7 0/DC downstream_remote_disconnect rows, all to upstream 10.244.0.112:18008 = echo-…-k28vq on main-worker-04; the ≥1 s 200s in the same 15 s go there too. w04's successor proxy started Envoy epoch 202 at 20:39:20.03Z; the predecessor logged envoy thread stall … starved at 20:39:15–18Z with nodeBusyPct 75.9 → 90.2. w04 is now the node with the most stalls (3,732 of 9,857 fleet) and has slow probes outside rolls.

So the stall is on the destination node's inbound path during its own hot-restart overlap; it hits every source and both DNS-tier targets. Grading must attribute a probe failure to the destination node, not the prober's node.

To establish: what else runs on w04 (it hosts an echo replica; co-tenants and their CPU), whether the inbound listener's accept/handshake is starved or the upstream app connection is, and the remaining #1093 levers (handoff CPU headroom, realistic CPU requests on the test pods). One run is one sample.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Activity

  1. bpalermo commented on Oct 7, 2026

    @bpalermo
    OwnerAuthor

    Investigated read-only (2026-10-07). Cause: node CPU saturation on w04 during the hot-restart overlap; the delay is on the inbound HTTP/3 (QUIC) path.

    Measured

    • All 7 logged failures reached w04's Envoy (same x_request_id on a destination row; envoy_http_inbound_downstream_rq_rx_reset_total on w04 → 7 at 20:39:30Z). Two legs: 1.1–1.55 s before w04's Envoy started the stream (source start → destination start), then 0.3–0.7 s from Envoy to the echo app on 127.0.0.1:8080 (normal 2–4 ms). No 503/UF, no connect failures; the echo container is not throttled (33m of a 100m request, no limit).
    • The inbound hop is HTTP/3 on UDP 18008, and six of the seven rode QUIC connections that had carried requests 1–3 s earlier — not a new handshake. The TCP listener was near idle.
    • UDP receive drops: envoy_listener_inbound_udp_downstream_rx_datagram_dropped_total for the echo pod's h3 listener first appears at 20:39:30Z (8 → 16); Envoy logged 'Kernel dropped N datagram(s)' on the parent at 20:39:28.5Z and on the child at exit. Non-zero on w04 only, in this one bucket (an increase()-based reading, so not strictly proven fleet-wide).
    • Saturation, not one starved worker: in 20:39:26–30.5Z every sampled thread of BOTH generations was starved (node busy 100 %, PSI 1102 ms/s; worker run-queue waits 590–878 ms per second, main threads 434–685 ms). The node was already 71–79 % busy before the roll. Fork-to-drain was 3.5–4.25 s, the same as in 29 clean handoffs.
    • No aether container burst; only the second Envoy generation was added (both ≈ 1.65 cores for 10 s). About half of w04's CPU before the roll (~1.2 of ~3.0 cores) is outside anything the metrics attribute: kubelet, containerd, machined, kernel, non-aether pods (present-day snapshot: ~0.65 core outside kubepods on an idle worker). The two nodes with the most steady stalls, w02 and w04, are the two hosting an otel-collector replica (205m and 173m).
    • Test workloads are not the cause: 11–15 aether-test pods per node, requests roughly realistic, hostname spread already in e2e/soak/echo.yaml.

    Inferred, not measured: with the carried QUIC patches the child's UDP listeners stay paused until the parent exits, so during the ~15 s overlap each datagram for a child-owned connection hops parent worker → parent main → child main → child worker; with each of those threads waiting 0.4–0.9 s per second, a > 1 s delay on established connections follows. No per-hop timestamps exist to prove it.

    Not supported by the data: drain timing/ordering; a larger proxy CPU request; TLS handshake load.

    Levers

    1. Capacity (GitOps, owner): move the otel-collector replicas off w04 and w02 (≈ 0.17–0.2 core each); budget ~0.65 core of fixed per-node overhead.
    2. Candidate product change, unproven: a receive-buffer option on the inbound QUIC listeners (InboundQUICUDPListenerConfig sets prefer_gro only → kernel default buffer). Tracked separately.
    3. Instrumentation needed to close this properly — tracked separately.

    Grading note: attribute a probe failure to the DESTINATION node.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

  2. added
    bug
    proxy
    on Oct 7, 2026
  3. bpalermo commented on Oct 8, 2026

    @bpalermo
    OwnerAuthor

    The 2026-10-08 sortie soak (aether 2.4.16-8f0ff40) reproduced this on worker-04 and widened it: 40 mesh_dns timeouts, all from the prober on w04. 12 sit on a w04 proxy handoff (this issue's mechanism, with w04 as the source as well); 28 happened with no handoff. The new access-log fields were decisive: on the failed probes' source rows ds_cx_age_ms is 561–1444 ms on a brand-new connection, against 0–17 ms on other nodes in the same seconds. The evidence and the options are in the issue filed today for the non-handoff part (worker-04 saturating on a 30 s phase that follows the kubelet/cAdvisor scrapes). Liveness was 0 non-success and the load 9,180,000 / 9,180,000.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

  4. bpalermo commented on Oct 10, 2026

    @bpalermo
    OwnerAuthor

    Closing as not a product defect. Rebuilt from logs for four affected handoffs: the failed connections do not line up with any one step of the hot restart. Some began before the successor was forked, some while it was still initializing and had no listeners (the parent was the only acceptor), some several seconds into the drain overlap. In each case the node was at 97 to 100 % CPU with every Envoy thread of both generations runnable and waiting for a CPU; none was blocked. The client's TCP connect completed in milliseconds and the request then waited unread until the 2 s budget ran out.

    The same handoff on nodes with CPU headroom, at 67 to 81 % of the inbound load, produced no request over 1.5 s in 18 handoffs. The parent already drains only after the successor's workers start; successor initialization used well under one core and was not what filled the failing second. A larger proxy CPU request, a longer drain and a larger UDP receive buffer were measured earlier and do not change it.

    The remedy is CPU headroom on the node for the roughly 20 s of a handoff (runbook, "Sizing nodes for a proxy hot restart"). Since #1435 a starved stall line names the top CPU consumers, which is the tool for finding what holds that headroom.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugproxy

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions