Repository navigation
Conversation
After a hard-killed daemon, the runtime dir keeps the socket/anchor/ identity publication while every lock is kernel-released. The CLI activation guard probed generation and treated the ECONNREFUSED socket as an active daemon (fail-closed, intentional for saturated listeners), so install/update failed forever with 'active CBM sessions ... could not be stopped safely' even though nothing was running — a deadlock by residue, since only daemon-start paths ran the stale cleanup. cli_activation_production_reserve now recognizes the provably-stale combination — generation present with no lifetime reservation, under the startup lock it already holds — and runs the existing cbm_daemon_ipc_stale_generation_cleanup repair, then re-probes before deciding. Stale cleanup re-checks both conditions and refuses on a genuinely held reservation, so a live daemon (including a saturated BSD listener) is never disturbed: the guard falls back to the original BUSY verdict. POSIX-only; Windows semantics are unchanged. Fixes DeusData#1760 Signed-off-by: Ulises Millan Guerrero <ulises.millanguerrero@gmail.com>
|
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. |
|
Thank you for the detailed stale-residue analysis and for reusing the existing guarded cleanup path. I checked current There is one factual contribution-policy blocker before code review. This focused fix also adds 131 lines under five new |
|
Not a review yet — this one is parked on our side for an unrelated reason, and I did not want you to find that out only after doing more work. Please drop the That request stands independently of the review, so you can act on it now across all three without waiting on me. I will come back to the change itself. Thank you for the batch — #1787 in particular is a good catch and I have approved it. |
|
Thank you for this — you were the first to put a fix in front of us for #1760, and your diagnosis (generation present, lifetime reservation absent, startup lock held, so the cleanup that already exists should run before declaring BUSY) was exactly right. We went with #1894 (now on main as 760c08f), which does the same recovery one layer lower, inside the daemon's IPC stale-generation cleanup, so it also covers the markerless .sock/.anc pair from #1757 and the worker hot-loop in #2015; it also carries the device/inode and two-link revalidation the unlink needs. Since it subsumes this change, I am closing this PR rather than merging both; the credit for getting there first is yours, and the fix ships in v0.10.9. If you see any residue of the wedge on that release, please open a fresh report and ping me. Thanks again. |
What does this PR do?
After CBM processes are hard-killed (
pkill/kill -9), the runtime dir keeps the published socket/anchor/identity files while every file lock is kernel-released. The CLI activation guard probed generation and treated theECONNREFUSEDsocket as an active daemon — a deliberate fail-closed choice that protects saturated BSD listeners — soinstall/updatefailed forever with "active CBM sessions ... could not be stopped safely" even though nothing was running. Only daemon-start paths ran the stale cleanup, which the CLI could never reach: deadlock by residue.cli_activation_production_reservenow recognizes the provably-stale combination — generation present, lifetime reservation absent, startup lock already held — and runs the existingcbm_daemon_ipc_stale_generation_cleanuprepair, then re-probes generation before deciding. The cleanup re-checks both conditions and refuses on a genuinely held reservation, so a live daemon (including a saturated BSD listener) is never disturbed and the guard falls back to the original BUSY verdict. POSIX-only; Windows keeps its rendezvous-record semantics unchanged.Verified with an end-to-end regression test: a child listens and exits without unlink (hard-kill residue), then the real activation guard installs successfully, removes the residue, and records the
completedphase.Checklist
git commit -s) — required, CI rejects unsigned commits (DCO, see CONTRIBUTING.md)make -f Makefile.cbm test)make -f Makefile.cbm lint-ci)