Game: the crash report of a run after a Linux Restart-now says the game logged to no file (the run_id line sits past the 8 KB search window) #1374

Closed
opened 2026-11-17 07:07:39 +00:00 by omgitsgela · 3 comments
Member

Version and channel

Found on current main (544229a2), reading and reproducing the code paths; also reproduced on parent revisions. Release and nightly alike: any Linux run that restarts through the Insert menu's "Restart now".

What happened

A crash report made by the run AFTER a Linux "Restart now" says its log section is "Not found: the game logged to no file", even though the game is writing logs/longshot_log.txt the whole time.

Mechanism (all three parts verified by running the real code with fixtures, during the review around #1322):

  1. On Linux, "Restart now" execs the new process in the same one (host/hos_relaunch.c:147-158): fd/2 stays the open longshot_log.txt it inherited, so the restarted run sees stderr as a regular file, skips the log-open block, and keeps appending at the old offset. That part is correct.
  2. The new run's run_id: line therefore lands at whatever offset the first run reached. The review's probe put it at 33 KB into the file.
  3. hos_crash_dialog.c's log_is_run (line 272-279) searches only the first 8192 bytes of the log for run_id: <wanted>. Past that window the crash dialog's find_run_log rejects the file, and the report's tail section prints "Not found: the game logged to no file". The bug report's long log copy still succeeds (it reads the whole file), so it is the crash report's tail that goes missing.

Expected

The restarted run's crash report finds its run's log tail, as a first run's does.

How often

Every time, when the run before the restart wrote more than ~8 KB (any real play session does).

Fix shape

Reader-side is the small fix: stream-search the file for the wanted run_id: (the same 256 MB cap read_log already uses) instead of the 8192-byte head window. Alternative shape: the relauncher explicitly rotates and reopens an owned log on restart so the new run starts at offset 0 (bigger behavior change: a restart today intentionally continues one file). A regression test needs a first run whose log passes 8 KB, then a restart plus crash record.

Reproduced during the review of #1322 with the real gate, relaunch, crash writer, bug-report code and crash helper under fixture stubs; a parent revision with a plain icon start fails the same way, so it is not from #1322 (that PR's only restart interaction is that Gaming-mode runs now also have this log to hit the bug with).

Before you send it

  • The problem is still there on the newest release or nightly (main 544229a2).
  • I searched the open issues for it (searched: restart log, run_id, crash report log).
  • I'm not attaching game files, keys, the game's executable, its .bin caches or saves.
## Version and channel Found on current main (544229a2), reading and reproducing the code paths; also reproduced on parent revisions. Release and nightly alike: any Linux run that restarts through the Insert menu's "Restart now". ## What happened A crash report made by the run AFTER a Linux "Restart now" says its log section is "Not found: the game logged to no file", even though the game is writing `logs/longshot_log.txt` the whole time. Mechanism (all three parts verified by running the real code with fixtures, during the review around #1322): 1. On Linux, "Restart now" execs the new process in the same one (`host/hos_relaunch.c:147-158`): fd/2 stays the open `longshot_log.txt` it inherited, so the restarted run sees stderr as a regular file, skips the log-open block, and keeps appending at the old offset. That part is correct. 2. The new run's `run_id:` line therefore lands at whatever offset the first run reached. The review's probe put it at 33 KB into the file. 3. `hos_crash_dialog.c`'s `log_is_run` (line 272-279) searches only the first 8192 bytes of the log for `run_id: <wanted>`. Past that window the crash dialog's `find_run_log` rejects the file, and the report's tail section prints "Not found: the game logged to no file". The bug report's long log copy still succeeds (it reads the whole file), so it is the crash report's tail that goes missing. ## Expected The restarted run's crash report finds its run's log tail, as a first run's does. ## How often Every time, when the run before the restart wrote more than ~8 KB (any real play session does). ## Fix shape Reader-side is the small fix: stream-search the file for the wanted `run_id:` (the same 256 MB cap `read_log` already uses) instead of the 8192-byte head window. Alternative shape: the relauncher explicitly rotates and reopens an owned log on restart so the new run starts at offset 0 (bigger behavior change: a restart today intentionally continues one file). A regression test needs a first run whose log passes 8 KB, then a restart plus crash record. Reproduced during the review of #1322 with the real gate, relaunch, crash writer, bug-report code and crash helper under fixture stubs; a parent revision with a plain icon start fails the same way, so it is not from #1322 (that PR's only restart interaction is that Gaming-mode runs now also have this log to hit the bug with). ## Before you send it - [x] The problem is still there on the newest release or nightly (main 544229a2). - [x] I searched the open issues for it (searched: restart log, run_id, crash report log). - [x] I'm not attaching game files, keys, the game's executable, its .bin caches or saves.
Member

Possibly related, for context:

  • PR #1059 fix(linux): a restart no longer hands the game its own log as stderr, so the new run moves it and the crash window finds it — Open Linux restart/log-handling fix; related mechanism, though report describes the distinct 8 KB search limit
  • issue #1259 Game: Steam Deck Gaming mode crash report has no game log — Related missing-log crash report on Steam Deck Gaming mode, different cause
Possibly related, for context: - PR #1059 fix(linux): a restart no longer hands the game its own log as stderr, so the new run moves it and the crash window finds it — Open Linux restart/log-handling fix; related mechanism, though report describes the distinct 8 KB search limit - issue #1259 Game: Steam Deck Gaming mode crash report has no game log — Related missing-log crash report on Steam Deck Gaming mode, different cause
Author
Member

Claiming the reader-side fix: log_is_run will stream-search the log for the wanted run_id line instead of reading only the first 8192 bytes, keeping read_log's existing 256 MB ceiling; a restart regression with a first run whose log passes the old window goes into the crash-dialog driver. The relauncher's inherit-the-open-log behavior stays as it is (continuing one file is deliberate).

Claiming the reader-side fix: log_is_run will stream-search the log for the wanted run_id line instead of reading only the first 8192 bytes, keeping read_log's existing 256 MB ceiling; a restart regression with a first run whose log passes the old window goes into the crash-dialog driver. The relauncher's inherit-the-open-log behavior stays as it is (continuing one file is deliberate).
Author
Member

Fix in flight: PR #1375 (fix/crash-dialog-log-run-search, head bf57a624). Reader-side shape as claimed: log_is_run streams the file for the wanted run_id line under read_log's existing 256 MB ceiling; the relauncher's inherit-the-open-log behavior stays. The crash-dialog driver now reproduces the whole path (a first run whose log is 24 KB deep, a restart, a crash, the Report-manually clipboard copy checked for the tail), fails on main with this issue's exact text, and mutation-probes the old 8 KB probe back to a fail.

Fix in flight: PR #1375 (fix/crash-dialog-log-run-search, head bf57a624). Reader-side shape as claimed: log_is_run streams the file for the wanted run_id line under read_log's existing 256 MB ceiling; the relauncher's inherit-the-open-log behavior stays. The crash-dialog driver now reproduces the whole path (a first run whose log is 24 KB deep, a restart, a crash, the Report-manually clipboard copy checked for the tail), fails on main with this issue's exact text, and mutation-probes the old 8 KB probe back to a fail.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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
MagicBeanDev/Longshot#1374
No description provided.