ProcessStamp.IsRunning counts an unreaped process as running on Linux #35

Closed
opened 2026-10-23 00:23:07 -05:00 by ethan-hann · 0 comments
Owner

ProcessStamp.IsRunning (src/Savepoint.Core/Git/ProcessStamp.cs) decides whether the git a killed SavePoint left behind still runs, using Process.GetProcessById and HasExited. For a process that is not SavePoint's own child, .NET reports a zombie (state Z in /proc/<pid>/stat) as not exited. Where nothing reaps orphans (a container whose PID 1 never waits, or a parent that hangs), the next start or game write could wait on a git that has already finished (D46.1).

The Linux process list now skips states Z, X, and x (LinuxProcessInspector.IsExitedState). ProcessStamp should use the same rule on Linux.

Done when a stamped git that is a zombie counts as gone on Linux, with a test.

`ProcessStamp.IsRunning` (`src/Savepoint.Core/Git/ProcessStamp.cs`) decides whether the git a killed SavePoint left behind still runs, using `Process.GetProcessById` and `HasExited`. For a process that is not SavePoint's own child, .NET reports a zombie (state Z in `/proc/<pid>/stat`) as not exited. Where nothing reaps orphans (a container whose PID 1 never waits, or a parent that hangs), the next start or game write could wait on a git that has already finished (D46.1). The Linux process list now skips states Z, X, and x (`LinuxProcessInspector.IsExitedState`). `ProcessStamp` should use the same rule on Linux. Done when a stamped git that is a zombie counts as gone on Linux, with a test.
ethan-hann added this to the 1.0 milestone 2026-10-23 00:23:07 -05:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ethan-hann/SavePoint#35
No description provided.