Linux process start times are dated up to a second early, so a game a launcher hands over is not followed #216

Closed
opened 2026-10-27 02:47:45 -05:00 by ethan-hann · 1 comment
Owner

LinuxProcessInspector dated every process start from /proc/stat btime, a whole second with the fraction dropped, so every start time on Linux was up to a second early (0.93 s on the test VM's current boot). When a launcher stub exits before the session watcher's first look, the watcher links the handed-over game by when and where it started, requiring it to start at or after the session's start; a game dated 0.9 s early was rejected and the session ended as "the game never appeared". It hits any Linux player whose launcher exits at once, on most boots. Found by RealSessionTests on the Linux test VM.

Fix: date starts from the clock minus /proc/uptime (hundredths of a second), cached per inspector, falling back to btime when the two disagree by more than about a second (containers), and take the session's start time before the process is started so a game that starts a few ms after an unseen stub is never rejected.

LinuxProcessInspector dated every process start from /proc/stat btime, a whole second with the fraction dropped, so every start time on Linux was up to a second early (0.93 s on the test VM's current boot). When a launcher stub exits before the session watcher's first look, the watcher links the handed-over game by when and where it started, requiring it to start at or after the session's start; a game dated 0.9 s early was rejected and the session ended as "the game never appeared". It hits any Linux player whose launcher exits at once, on most boots. Found by RealSessionTests on the Linux test VM. Fix: date starts from the clock minus /proc/uptime (hundredths of a second), cached per inspector, falling back to btime when the two disagree by more than about a second (containers), and take the session's start time before the process is started so a game that starts a few ms after an unseen stub is never rejected.
ethan-hann added this to the 1.0 milestone 2026-10-27 02:47:45 -05:00
Author
Owner

Shipped in 0.9.17 (PR 227).

Shipped in [0.9.17](https://git.tortal.tech/ethan-hann/SavePoint/releases/tag/v0.9.17) (PR 227).
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#216
No description provided.