Repository navigation
Description
What happened (talos-main rev248 = 1.0.3-763e257, 2026-09-28, rollout restart ds/aether-proxy #5 of a 5-roll run under 300 rps QUIC load)
main-worker-02, cross-pod hot restart, new pod aether-proxy-dwmng (started 16:37:45Z):
- 16:37:48.8
live predecessor confirmed; starting cross-pod hot restart(epoch 53 → 54) - 16:37:49.1 child
initializing epoch 54; 16:37:49.25 parentshutting down admin due to child startup/terminating parent process - 16:37:49.4–52.1 child: CDS 99 clusters,
all clusters initialized, LDS adds every listener (h3 inbound listeners included) - 16:37:52.55 child
all dependencies initialized. starting workers— the child's last log line for 38 s - 16:37:52.96 parent
closing and draining listeners— the parent's last Envoy log line - 16:37:52.98 supervisor
successor ready gate anchored(anchor=live, sinceFork 4.1 s) — the supervisor: on rev242 the old proxy pod gets SIGTERM mid-handoff (6–11 s after the fork, before the successor's readiness gate) in 7 of 15 handoffs #991 gate saw the child LIVE - 16:38:00.8
holding readiness through unreachable admin: successor likely initializing(admin 127.0.0.1:9901 stopped answering) - 16:38:30.8
liveness watchdog fired; terminating for container restart— twice, "unresponsive for 30s with child alive at epoch 53" and "…epoch 54" - 16:38:45.8
drain deadline elapsed, killing envoy epoch 53and…54; both reaped - 16:38:47.8
no live predecessor; starting fresh at epoch 0; traffic back at 16:38:50
First time this watchdog has ever fired (VictoriaLogs, 09-26 → now: exactly these 2 lines). The other four rolls of the run and both earlier deploys today were clean. kubectl shows restartCount 0 on aether-proxy-dwmng afterwards — check whether the watchdog's "terminating for container restart" actually restarts the container or re-execs in place.
Impact (node-local, bounded by the #991 watchdog)
- Access logs on w02: destination-side lines fell from ~560/5 s to ~85/5 s for 16:38:00–16:38:45 (only the parent's existing connections kept serving); source-side lines held (~350/5 s, k6 keep-alive on the parent). New connections to/from w02 were dead until the fresh epoch 0.
- Every source node logged
503 UC upstream_reset_before_response_started{QUIC_TOO_MANY_RTOS|Network_blackhole_detected}to the twins for svc-1/svc-2 pods on w02: ~70 at 16:37 and ~480 at 16:38 — the QUIC inbound on w02 went dark the moment the parent closed its listeners and the child never served. - k6: 5 ×
status=0(connection reset / broken pipe) at 16:38:45.96–45.98 = the kill; access log has the matching 50/DC bytes_sent=0. - Prober: 34
mesh_dns timeout+ 22liveness connection_error, all node=main-worker-02, none elsewhere — a real SLI hit. - Roll 4 (16:25:44) had 2 ×
503 UC …QUIC_PUBLIC_RESET|FROM_PEER|Received_stateless_reseton w05/w01 → svc-1 twin at 16:26:50/16:27:46 — the mild form (a parent-owned QUIC connection's packets reaching the child after the parent went away). Rolls 1–3: nothing.
Not explained yet
Why the child wedged between starting workers and serving. Nothing was deleted on w02 around then (no pod churn besides the proxy pod itself), so envoyproxy/envoy#47492 (netns gone) has no evidence. Candidates worth checking against the pinned 726d7ac + carried patches: a worker blocking in hot-restart socket passing (getListenSocket to a parent whose main thread is already in closing and draining listeners), or the #1022 thread-self netns exec (aether1022-exec-in-netns-thread-self.patch) interacting with per-worker QUIC/UDP socket creation under hot restart (rev248 has ~14 UDP/QUIC listeners per node). A core dump or --component-log-level at the next occurrence would settle it; it is nondeterministic (1 in 5 rolls here, 0 in the ~60 rolls since rev244).
Ask
- Reproduce on kind with
e2e/eastwest-quic-hotrestart.sh(SIGHUP hot restarts under h3 load, many pods per node) — count silent-child events. - If reproducible, get a stack of the child at the wedge (
/statswon't answer; usegdb -p/eu-stackin the pod) and identify the blocked worker. - Confirm the container actually restarts on watchdog termination (restartCount 0 above).
Related: #991 (the watchdog bounded this), #1022, #967, #979 (gate: handoff branch 0). Record: session memory project_1021_measurement_20260928.
Activity
bpalermo commentedon Sep 28, 2026
Root cause: main-thread deadlock across the hot-restart sockets (Envoy 726d7ac + carried #47743 patch; reproduced on kind with a symbolized stack)
The child did finish
startWorkers. Its completion callback (server.cc:962-979) runsupdateServerStats()and thendrainParentListeners()— the latter is what makes the parent logclosing and draining listeners(server.cc:159). From there:HotRestartingParent::Internal::drainListeners(hot_restarting_parent.cc:266-270) installs the non-dispatched UDP handler; the QUIC listener (active_quic_listener.cc:200-203, 252-253) and raw UDP listener (active_udp_listener.cc:125-131) hand every packet no parent session owns tohandle()(:68-85), which posts it to the parent's main thread (:60-65) →RpcStream::sendHotRestartMessage→ forces the AF_UNIX datagram socket into blocking mode (hot_restarting_base.cc:84-85) andsendmsgwith no timeout (:122-143). The child's UDP listeners are paused until the parent terminates (udp_listener_impl.cc:39-58), so for the whole--parent-shutdown-time-swindow every packet of every new QUIC connection takes parent worker → parent main → UDS → child main.updateServerStats(server.cc:272-274) →getParentStats(hot_restarting_child.cc:161-176) → blockingrecvmsgwith no timeout (hot_restarting_base.cc:206-211)._udpsocket queue is full (≈24 unread 1.4 KB datagrams fills the send buffer, measured) when the child enters thatrecvmsg, the parent's main thread is parked insendmsgand never reads the Stats request. Workers keep serving existing connections (matches the steady source-side access logs); admin, xDS and timers are dead on both processes; both ignore SIGTERM because signals are handled on the main dispatcher — hence the supervisor had to kill both epochs.Not involved: the #1022 thread-self netns patch (inherited sockets, no setns),
startWorkersitself, and socket acquisition (duplicateParentListenSocket, hot_restarting_child.cc:138-159, is also a blocking no-timeout call and would wedge an LDS listener add inside the window — a second trigger, not the one in the stack).Reproduction —
e2e/hotrestart-wedge.shon branchspike/1050-hotrestart-wedge-repro(b93790d, no PR): eastwest-quic bring-up scaled to 17 h3 inbound listeners, load, SIGHUP hot restarts, wedge = child admin dark ≥5 s; captures per-thread syscall/wchan/kernel stack and a gdb backtrace.WEDGE_FREEZE_S=6: SIGSTOP the child inside the forwarding window): 3/3, identical to production — child's last linestarting workers, parent's lastclosing and draining listeners,unresponsive for 30s with child alive, both killed, fresh epoch 0.sendmsg ← RpcStream::sendHotRestartMessage ← DispatcherImpl::runPostCallbacks(wchansock_alloc_send_pskb, fd =envoy_domain_socket_udp_parent_0); childrecvmsg ← receiveHotRestartMessage ← HotRestartingChild::getParentStats ← HotRestartImpl::mergeParentStatsIfAny ← updateServerStats ← flushStatsInternal(wchan__skb_wait_for_more_packets, fd =envoy_domain_socket_child_1).restartCount 0seen on talos is still unexplained.Mitigation (aether side, chart-only)
--skip-hot-restart-parent-stats(options_impl.cc:85; checked at hot_restarting_child.cc:162) via the supervisor's extra-args path (buildEnvoyCmd, supervisor.go:905-918) inagent-proxy-daemonset.yaml. Removes the only periodic child→parent blocking call. Cost: the parent's gauges and its last ≤5 s of counter deltas are not merged (counters are per-generation already, #708). LeavesduplicateParentListenSocketduring the window (LDS add) and parent main-thread stalls without deadlock; a shorter--parent-shutdown-time-sshrinks that.Upstream shape (for the owner to take up; nothing posted)
Forward UDP with a non-blocking
sendmsgand drop on EAGAIN (UDP is lossy; also avoids the blocking-mode toggle), and give the child's blocking receives a timeout that treats the parent as gone. Supervisor idea: skip the 15 s SIGTERM grace when both epochs are silent, since SIGTERM cannot land on a blocked main thread.Soak gates to add
liveness watchdog firedper roll; zerodrain deadline elapsed, killing envoy epochfor an epoch with a live child.starting workers(supervisor could poll/server_infoand export a wedge counter).QUIC_TOO_MANY_RTOS/Network_blackhole_detectedfor the rolling node stays at baseline.e2e/hotrestart-wedge.sh WEDGE_FREEZE_S=6as the red-then-green check: 0 wedges with the flag.fix(proxy): pass --skip-hot-restart-parent-stats so the hot-restart c…
proxy: carried patch — non-blocking hot-restart UDP forwarding and bo…
fix(supervisor): kill both epochs at once when both are wedged, expor…