From 3524e04b64c5c7c160aac3c6b15dcadd21ade6aa Mon Sep 17 00:00:00 2001 From: zzstoatzz Date: Wed, 19 Aug 2026 01:19:56 -0500 Subject: [PATCH] adopt zio e1fc874: lost poller wakes are re-armed, and export the counter Picks up the root-cause fix for the 2026-08-18 partial-deafness incident. zio's poller delivery is destructive -- it clears the token and drops the epoll registration as it emits -- and the scheduler discarded any event whose fiber was not parked. Since `step()` runs the ready batch before it polls, a fiber readied by a cancellation, a close-fd wake or a futex wake is `.ready` at exactly that moment, so its wake was lost permanently: the fd left epoll with the peer's close frame still unread, the worker parked forever, the socket never closed, `relay_connected_inbound` never decremented, and the host never marked down. That is the shape captured in prod -- 365 CLOSE_WAIT sockets, none of them in epoll, 205 still holding an unread close frame. This bump also moves zio off a canary branch and onto main. main had diverged since 2026-08-05 and was missing every fix the 2026-08-04 incident produced, including the ready-queue starvation fix; it is now reconciled. `zio_sched_events_rearmed_total` exports the condition. The soak in zio's bench/deafness.zig does not trigger it with ordinary hangup and cancel churn, so the field trigger is still unnamed -- this counter is what will name it. Co-Authored-By: Claude Opus 5 (1M context) --- build.zig.zon | 4 ++-- src/main.zig | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 4da78c0..4e54fed 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -13,8 +13,8 @@ .hash = "websocket-0.1.10-ZPISdUowBQAXIl_X9VpZozIxBLVf_o5wYjOMMdobrXF5", }, .zio = .{ - .url = "https://tangled.org/zzstoatzz.io/zio/archive/beb13c8.tar.gz", - .hash = "zio-0.0.0-psl_OYO_AgBLeJexl9ZTEQAOoJDODXoqcin86O7f4EtN", + .url = "https://tangled.org/zzstoatzz.io/zio/archive/e1fc874.tar.gz", + .hash = "zio-0.0.0-psl_OZIHAwDCE15s7t7Z-VProMKXTxp9es5rAgRsvWnk", }, .pg = .{ .url = "https://tangled.org/zzstoatzz.io/pg.zig/archive/c5a5607.tar.gz", diff --git a/src/main.zig b/src/main.zig index 47d1ba3..efba0a6 100644 --- a/src/main.zig +++ b/src/main.zig @@ -204,11 +204,11 @@ const MetricsServer = struct { \\# TYPE zio_fiber_starts gauge \\ , .{ - d.sched.switches, d.sched.live, d.sched.ready, - d.sched.parked, d.sched.futex_waiters, d.sched.timers, - d.sched.inject_pending, d.sched.free_list, d.poller_registrations, - d.sched.arm_failures, d.sched.last_arm_errno, d.dns_queued, - d.dns_workers, d.dns_idle, + d.sched.switches, d.sched.live, d.sched.ready, + d.sched.parked, d.sched.futex_waiters, d.sched.timers, + d.sched.inject_pending, d.sched.free_list, d.sched.events_rearmed, + d.poller_registrations, d.sched.arm_failures, d.sched.last_arm_errno, + d.dns_queued, d.dns_workers, d.dns_idle, }) catch ""; var total = base_body.len; if (total + extra.len <= metrics_buf.len) { -- 2.51.2