Repository navigation
fix(persona): a reseat pass must not re-open every citizen's stream — the fd leak that darkened the M5 - #3969
Merged
joelteply merged 3 commits intoSep 12, 2026
Conversation
… the fd leak that darkened the M5 Measured 2026-09-12 00:57–01:13Z on 48fbbfd, sixteen minutes after boot: the core held 19,866 open descriptors, 19,589 of them unix sockets to the airc daemon (which itself held 23). Every spawn then failed with EBADF and every reader saw a different symptom — the serving lane's `--list-devices` probe "could not run", the backend receipt fell back to CPU, the Metal lane came up on CPU and #3759's gate refused it every 5 s (zero lanes), `web/fetch` could not start Chrome. The board read busy; the node was dead. The chain: `seat_announced_rounds` joined every resident into every announced child round on every 10 s pass ("a join is idempotent on the daemon") and, for finished children, parted them again — each join/part bumps her membership epoch; every bump re-opens the command pump's daemon stream (1,961 `command_pump.reopened`, all MembershipChanged, attempt 0); the old stream's per-channel sockets stayed open. Recipe-spawned rounds the tracker does not own are exactly the "not local" children that re-joined forever. Three fixes, three layers: - the reseat pass reads standing FIRST and joins or parts only on a real membership change (per resident, by the child's room id; its `already` counter now counts); - the command pump ignores an epoch bump whose room set did not change (`persona.command_pump.membership_unchanged`) — idempotent joins anywhere in the substrate can no longer re-open streams; - a process fd gauge (`system_resources/fd_gauge.rs`) on the memory tick: `process.open_fds` every tick, `process.open_fds.high` past half the soft limit — this class is named before the node goes dark, never after. Still owed to airc-lib: the per-channel attach tasks must release their sockets when the stream drops (the guard aborts them; the sockets stayed), and the SDK must handle AttachCursorAdvanced instead of logging it 6,391 times a minute. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ded the membership it was deciding On 749d91c the first cut oscillated: standing is read through a member's subscription, so after every resident left a finished round nobody could read 'archived'; the next pass joined all five to find out, read it, parted all five — 733 seats and 256 departures of one room in sixteen minutes, each a membership epoch bump and a stream re-open (1,721 on the hotfix build). A child seen archived is remembered for the life of the process; a reboot re-learns it once. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
force-pushed
the
fix/a-reseat-pass-must-not-reopen-every-citizens-stream
branch
from
September 12, 2026 02:36
58ab414 to
75e3051
Compare
…usted provider is not a retry 2026-09-12 02:42:29Z: the first hosting attempt drew all twelve on-disk identities (five allowed by the hold, seven held out) and then failed because the airc daemon was mid- restart. The provider is built once at boot and every attempt draws from it, so the next 700 attempts read "identity provider exhausted at slot 0 — provider yielded 0 intents, planner requires 5" from a directory holding twelve citizens, and the node sat with zero residents on a healthy lane for half an hour. ResumeOrMintProvider::rewind() restarts the cursor; the hosting reconciler calls it before every attempt after the first (nothing was hosted, so nothing double-draws) and says so (`persona.host.provider_rewound`). Test beside the provider's own. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
deleted the
fix/a-reseat-pass-must-not-reopen-every-citizens-stream
branch
September 12, 2026 03:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Measured 2026-09-12 00:57–01:13Z on 48fbbfd, sixteen minutes after boot: the core
held 19,866 open descriptors, 19,589 of them unix sockets to the airc daemon (which
itself held 23). Every spawn then failed with EBADF and every reader saw a different
symptom — the serving lane's
--list-devicesprobe "could not run", the backendreceipt fell back to CPU, the Metal lane came up on CPU and #3759's gate refused it
every 5 s (zero lanes),
web/fetchcould not start Chrome. The board read busy; thenode was dead.
The chain:
seat_announced_roundsjoined every resident into every announced childround on every 10 s pass ("a join is idempotent on the daemon") and, for finished
children, parted them again — each join/part bumps her membership epoch; every bump
re-opens the command pump's daemon stream (1,961
command_pump.reopened, allMembershipChanged, attempt 0); the old stream's per-channel sockets stayed open.
Recipe-spawned rounds the tracker does not own are exactly the "not local" children
that re-joined forever.
Three fixes, three layers:
change (per resident, by the child's room id; its
alreadycounter now counts);(
persona.command_pump.membership_unchanged) — idempotent joins anywhere in thesubstrate can no longer re-open streams;
system_resources/fd_gauge.rs) on the memory tick:process.open_fdsevery tick,process.open_fds.highpast half the soft limit —this class is named before the node goes dark, never after.
Still owed to airc-lib: the per-channel attach tasks must release their sockets when
the stream drops (the guard aborts them; the sockets stayed), and the SDK must handle
AttachCursorAdvanced instead of logging it 6,391 times a minute.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo