Repository navigation
Conversation
Verify Darwin lock holders before treating a PID as live so stale locks can self-heal after macOS reuses the recorded PID for an unrelated process. Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Contributor
Author
|
Closing this draft because #4229 already covers the same issue with a broader, earlier implementation. Avoiding duplicate reviewer load. |
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
mdwriteand adjust lock-error tests to avoid relying on real PID 1 semantics.Root cause
_is_pid_alive()only validates process identity through/proc/<pid>/cmdlineon Linux. macOS has no/proc, so a stale.openviking.pidleft after reboot can be mistaken for an active OpenViking process when Darwin reuses that PID for a system daemon.Fixes #4210.
Test plan
OV_PREBUILT_BIN_DIR=/tmp/openviking-ov-prebuilt OV_SKIP_RAGFS_BUILD=1 uv run --extra test pytest --no-cov tests/unit/test_process_lock.py→ 38 passed, 4 warningsNote: plain
uv run --extra test pytest tests/unit/test_process_lock.pycould not build locally because this machine does not have Cargo available to buildopenviking/bin/ov. I used a temporary prebuiltovplaceholder only for local Python test execution.