v1.56.101: REAL root cause of the kepr.uk whole-daemon freezes. The SSH 'status' handler (ssh/server.zig writeStatus) held the global conn_mutex across ctx.writeStdout via a defer-unlock. zig-ssh writeChannelData blocks reading a CHANNEL_WINDOW_ADJUST (tcp_recvmsg) when the channel window is exhausted; an authenticated client that stops reading never sends one, so the write — and the held mutex — blocked forever, freezing every HTTP worker (captured live: 1 thread in tcp_recvmsg on the SSH fd holding the lock, ~36 futex waiters, CLOSE-WAIT pile-up on :7701, PG fully idle/ClientRead). NOT S3 and NOT a PG query — which is why the .92 S3-out-of-lock work and .99 statement_timeout both failed to stop the recurrence. Fix: read the counts under the lock, RELEASE, then writeStdout — matching every other SSH handler (the lone lock-across-write exception). musl ReleaseSafe build exit 0; zig build test 646 pass / 1 pre-existing team-tier live-PG fail (unchanged from HEAD).

dev · 4 weeks ago · 2026-06-18 · 14.5 MB

session: fix ssh status mutex deadlock · agent: claude-opus-4-8

$ koh steal kepr.uk/kepr@e5330876fd07
·
← a2e0f97c4698 94db68af4512 →
⇓ download .face