Skip to content

test(qualification): handle process exit during procfs status reads - #60

Open
DivyamTalwar wants to merge 1 commit into
codex/jitmind-j08-reviewed-20260928from
fix/jitmind-proc-liveness-20260929
Open

DivyamTalwar wants to merge 1 commit into
codex/jitmind-j08-reviewed-20260928from
fix/jitmind-proc-liveness-20260929

Conversation

@DivyamTalwar

Copy link
Copy Markdown
Owner

Root cause

Fixes #59. PR #58's Linux/Python 3.11 run reproduced an observation race in the pre-existing test helper: /proc/<pid>/stat disappeared after the existence check, raising ProcessLookupError while checking an already-exited owned child.

Change

  • Treat FileNotFoundError and ProcessLookupError during that status read as process disappearance.
  • Preserve permission and malformed-record errors instead of calling an unknown observation a dead process.
  • Parse the status after the process-name closing parenthesis, so spaces in a process name do not hide zombie state.
  • Keep the real process-group cleanup, timeout/output-limit and unrelated-child survival assertions unchanged.
  • Add seven deterministic disappearance, live/zombie, permission and malformed-data controls.

This changes test observation only. It does not alter product subprocess cleanup or loosen its assertions.

Verification

Candidate 75821f2d6c5e717400c83377c11035e13f9a5899, based on PR #49.

PYTHONPATH=$PWD python -m pytest -q -p no:cacheprovider
# 889 passed, 0 failed, 0 skipped; 3 expected optional-provider warnings
python -m compileall -q jitmind tests
python -m pip check
git diff --check
# passed

The supervisor verified unchanged source hashes during the run. The Linux race itself is evidenced by run https://github.com/DivyamTalwar/JITMIND/actions/runs/36506320213; the local macOS run uses deterministic procfs observations plus the unchanged real child-process tests. It is not relabelled as a native Linux reproduction.

Stacked on #49. This small follow-up will precede #58 so the instrumentation PR can retain a focused diff and rerun its complete matrix. No automatic merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant