fix(lock): reject zombie process owners - #3897
Open
august-agent wants to merge 1 commit into
Open
august-agent wants to merge 1 commit into
august-agent wants to merge 1 commit into
Conversation
Confidence Score: 5/5The PR appears safe to merge, with the new zombie checks preserving live and stopped owners while reclaiming exited owners that cannot release their locks. The changed liveness boundaries first retain the existing Reviews (1): Last reviewed commit: "fix(lock): reject zombie process owners" | Re-trigger Greptile |
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.
Summary
kill -0succeeds for a zombie because the PID still exists, even though the process can no longer run or release its lock.The existing liveness checks therefore preserve dead ownership indefinitely.
This change adds portable zombie-state checks using Linux-compatible
/proc/<pid>/statwhen available andpsotherwise, then applies them at the two existing owner-liveness boundaries.This addresses #3620.
It is split out of #3617 at the maintainer's request so the liveness restoration can be reviewed on its own.
Tests
bin/fm-test-run.sh --jobs 1 tests/fm-watcher-lock.test.sh tests/fm-claude-stop-autoarm.test.sh- 2 suites passed.bin/fm-lint.sh- passed.The complete
bin/fm-test-run.sh --allwalk is not green in this local environment because of aggregate-only failures already present onorigin/main.The potentially related
fm-control-relaunch.test.shassertion,relaunch did not reach trace delivery, passed in isolation but failed in two complete clean-origin/mainruns with this commit absent (186 suites with 9 failures, then 186 suites with 10 failures).That counterfactual rules out this patch as the cause; no open issue dedicated to that exact assertion was found.