ReviewOS

pantry-pm/pantry

fix(action): handle ESRCH while observing an exiting Linux service

#256
Closed chris opened this 4 days ago ·
4 days ago

Stacks release 0.75.364 passed its auth tests but failed the test(auth-3) job during Post Setup Pantry, with ESRCH: no such process, read.

Failure: https://github.com/stacksjs/stacks/actions/runs/40822948962/job/123279851087

The Linux identity reader samples /proc/<pid>/stat, directory ownership, cmdline, and stat again. A process exiting between these reads can produce ESRCH before procfs removes the directory. serviceGroupHasLiveProcesses already treats ESRCH and ENOENT as an exited process; serviceProcessIdentity handles only ENOENT.

Treat ESRCH as an exited process in the Linux identity observation, without weakening permission, ownership, birth-identity, group, or directory checks. Add child-isolated OS-boundary regressions for exit at either stat read or the cmdline read, plus ENOENT and EACCES controls. Retain the real owned-service cleanup tests.

This blocks publication of framework improvements needed by https://github.com/stacksjs/hq.training/issues/346 and the final verification in https://github.com/stacksjs/hq.training/issues/358. Consume the released action through its immutable commit in Stacks CI.

Sign in to comment on this issue.