diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-29 13:27:52 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-29 14:27:36 -0300 |
| commit | e9328a417ef82d72a73f5e3e7d182591616137de (patch) | |
| tree | 48061dfa8cbf293f59006202539137d431f96860 /docs/next-daemon.md | |
| parent | f1f52054e3fe82f94697561d6fe9f9c14774f5de (diff) | |
| download | pardes-e9328a417ef82d72a73f5e3e7d182591616137de.tar.gz pardes-e9328a417ef82d72a73f5e3e7d182591616137de.zip | |
9p_io.zig: a session's liveness is a flock on its socket's .lock, not a connect, which FreeBSD refuses to a full listen queue as to a dead socket
The owner holds `<socket>.lock` flocked from before it binds until after
it unlinks (claim, release; the fatal-signal path unlinks it too). The
startup sweep, the registry sweep, a registry entry's replacement and
`taken` ask that lock: held is live, free is dead. They unlink only while
holding it, so no new owner comes between the judging and the unlink,
and two starters of one name are told apart by who took it. A socket
with no lock, a pardes from before the locks, is still judged by a
connect. The daemon's own start was already decided by its flock.
The sweep test gains a live session whose socket refuses connects on
every system (bound, not listening, its lock held) and a dead one's free
lock, which goes with it; it passes on the FreeBSD box now.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/next-daemon.md')
| -rw-r--r-- | docs/next-daemon.md | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/docs/next-daemon.md b/docs/next-daemon.md index e63f69c6..159e66e7 100644 --- a/docs/next-daemon.md +++ b/docs/next-daemon.md @@ -360,16 +360,19 @@ Everything of ours lives in `/root/pardes-test`, nothing outside it. - A kitty `t=f` naming a FIFO hung the open everywhere but Linux; a stat by path now comes first. - A Unix socket whose listen queue is full refuses a connect with - ECONNREFUSED, exactly as a socket nobody listens on does. The - registry sweep reads that refusal as a dead session, so it could - remove a live session's socket while its queue overflows. **Open:** - the unit test "the registry sweep takes the dead entries" fails on - it. + ECONNREFUSED, exactly as a socket nobody listens on does, so a sweep + that judged by connecting could remove a live session's socket while + its queue overflowed. A session's liveness is now its lock: it holds + `<socket>.lock` flocked from before it binds until after it unlinks + (9p_io.zig `claim`), the sweeps and `taken` ask that lock, and they + unlink only under it. A connect judges only a socket with no lock, one + of a pardes from before the locks. The daemon's own start was already + decided by its flock. - **The tests there.** The box runs them as root, with no zls, fish or fonts installed. - - main: 1138 passed, 36 skipped, 4 failed: the sweep above; the LSP - format retry (no zls); and two tests that make a file or directory - unreadable, which root reads anyway. + - main: 1139 passed, 36 skipped, 3 failed: the LSP format retry (no + zls), and two tests that make a file or directory unreadable, which + root reads anyway. - panes: 224 passed, 1 failed (`Shell fish`: no fish). kitty: 43 passed. The small programs all pass but fonts (no fonts). - Off Linux, the parts of tests whose refusing path is Linux's |
