diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-21 01:34:10 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-21 01:51:21 -0300 |
| commit | 63f59cbf3092c8bb7e3eae155969c0249fe2063d (patch) | |
| tree | 09b8e3631b3e7797e597124dedb284f09f2d8cd7 /runtime/daemon.zig | |
| parent | 6d937cd125ca04a2edb92b2d014014ee6c2eb45d (diff) | |
| download | pardes-63f59cbf3092c8bb7e3eae155969c0249fe2063d.tar.gz pardes-63f59cbf3092c8bb7e3eae155969c0249fe2063d.zip | |
replica: an attach handed to a session as it upgrades is told so and joins the new process, never cut unanswered by the exec: `Peers.refuseAll` returned at once when no client was joined, and with clients its `drop` closed the connections queued in `Peers.inbox` without a word, and a hand-over posted after it was closed by the exec (MSG_CMSG_CLOEXEC), so `pardes attach NAME` started as NAME upgraded said "the session hung up before the dump was whole" and exited 1, with PARDES_PAIR or without (exp2: a `new --detach` session, no variable, ReleaseSafe main: 2 of 20 attaches at 0 ms); now refuseAll tells each queued connection what it tells its clients (`replica.upgrading`, "the session is upgrading to another build of pardes", the words tui and gui passed), `Peers.upgrading` makes `post` tell a later hand-over the same at once (reset at the next boundary: the exec failed), and a first join told so dials again patiently (`join` -> `redial`, its view optional); the pair row that failed on the release build only (daemon.py --pair, `ended_by(how, *attached('rows'))`, the coordinator's landing check) was this race, reached through the test: its `upgraded()` waited for `--upgraded=` in the session's command line, which a second Upgrade's old process already had, so it attached to the old process; found under strace (the daemon handed the attach, then took the session's `upgrade`, then exec'd); the release build and the test's long runtime path only moved the timing; `upgraded()` now waits for the session's 9P socket made anew; tests: core/replica.zig "an Upgrade tells a client handed to the session and not joined yet that it is upgrading ..." (main: both hand-overs still queued, never told), test/daemon.py `attach_upgrading` (plain, --pair, --attach-upgrading: an attach started 0-25 ms after the Upgrade's word, without the variable and with it: main's release build failed its first round)
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'runtime/daemon.zig')
0 files changed, 0 insertions, 0 deletions
