fix: recover markerless stale rendezvous sockets during activation - #1894
fix: recover markerless stale rendezvous sockets during activation#1894mvanhorn wants to merge 1 commit into
Conversation
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
|
Thanks for this — and apologies that the only thing you have heard so far was the automated acknowledgement. Status: the one thing blocking it is DCO. Every other required check is green, which is a better starting position than most PRs arrive in. It is a single commit ( The substance still needs a proper read against #1760 before anything is promised — that is queued, not skipped. But the sign-off is worth doing now so the review is not waiting on a formality when it comes up. |
Fixes DeusData#1760 Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
498f69b to
8e70590
Compare
What does this PR do?
Extend the existing POSIX stale-generation cleanup in
src/daemon/ipc.cto recognize the markerless hard-linked.sock/.ancpair only while it retains the matching startup lock and a temporary exclusive lifetime reservation. Require both paths to be secure sockets for the same device/inode with the exact two-link shape, revalidate those identities immediately before inode-matched unlinking, and continue to refuse unanchored, mismatched, malformed, replaced, or actively reserved endpoints. Make the activation-only generation probe invoke this serialized cleanup before classifying a remaining endpoint, soinstallandupdateuse the recovery path already shared by daemon startup without weakening the conservativeECONNREFUSEDbehavior for live or saturated listeners.Hard-killing a POSIX daemon or MCP process can leave the owner-private rendezvous namespace with a hard-linked stable socket and anchor but without the pending or identity record that normally authorizes cleanup. The kernel releases the process-owned startup, lifetime, and cohort locks, yet activation's generation probe treats the refused socket as active and permanently blocks
installandupdate. Deleting/tmp/cbm-daemon-<uid>works around the problem, confirming that durable transport artifacts—not a live CBM session—cause the refusal. The current branch already documentsCBM_RUNTIME_DIR, distinguishes coordination failures from busy sessions, and returns a nonzero activation status, so this change is limited to safe automatic recovery of the reported crash shape.Fixes #1760
Checklist
git commit -s) — required, CI rejectsNot run: no test command resolved in this workspace, so nothing was executed to pass.
unsigned commits (DCO, see CONTRIBUTING.md)
make -f Makefile.cbm test)Not run: no test command resolved in this workspace, so nothing was executed to pass.
make -f Makefile.cbm lint-ci)Not run: no test command resolved in this workspace, so nothing was executed to pass.