WIP: fix(runtime): the log writer's flush no longer deadlocks with the writer; the writer runs on Linux too #1284

Draft
Molier wants to merge 1 commit from Molier/Longshot:linux/async-log into main
First-time contributor

Type: fix · Risk: medium · Tested on: Linux (CachyOS, kernel 7.4.0-rc1), Radeon RX 9070 XT, RADV (Mesa 26.2.6): game-free tests, and a local build with the writer on · Needs: Windows, any GPU (log_flush() is shared code)

Why

On Linux every line the game logs is written to stderr by the thread that logs it, one write per line, unbuffered. Windows has had a writer thread that queues and batches those lines, but its code was gated to _WIN32, so on Linux that writer never ran. The per-frame lines used for performance work (RX_VK_SLOW_LOG, HOS_FPS_LOG, HOS_THREAD_TIMES) are logged by the replay thread, so on Linux a slow disk holds that thread and the frame. Windows' own comment in host/hos_thread.c records the render thread held 140-310 ms in one line's write before its writer existed. This change enables the existing writer on Linux. No tracker issue fits.

How to reproduce

Seen on: main, Linux, any disk
Settings and switches: defaults
Steps:

  • Synthetic hold: the slow case of tests/log_batch_test.c with the writer off (HOS_LOG_SYNC=1, main's Linux behaviour): 100 lines against a 50 ms sink.
  • Deadlock, shared with Windows: the inversion case. Main's log_flush() takes the write lock then the queue lock; log_main() takes the queue lock then the write lock.
    Expected: the calling thread returns in well under a millisecond per line; a flush during a write completes.
    Actual: slow: 100 lines in 5110.33 ms (writer off); DEADLOCK in 12 of 12 runs of inversion (exit 3).

What changed

Enable the existing log writer on Linux and fix a lock-order deadlock in its flush that Windows also has. Document the two existing log switches.

  • host/hos_thread.c: the writer gate is (defined(_WIN32) || defined(__linux__)) && !defined(__EMSCRIPTEN__). Every call it needs has a Linux shim in host/posix: SRW locks, condition variables, CreateThread, the unhandled-exception filter (the crash signals), GetStdHandle/WriteFile, GetTickCount64. Emscripten keeps its stub; batching and the kill switch are unchanged.
  • host/hos_thread.c, log_flush(): take the queue lock then the write lock (the writer's order), and copy the batch into a local array (a shared static one raced between two flushes). This lock-order fix is in shared code that Windows also runs.
  • Crash path on Linux: report_crash, installed by hos_commit_init after the log's own filter, ends in hos_log_flush(); the crash signals installed by SetUnhandledExceptionFilter (SEGV, BUS, ILL, FPE, ABRT) reach it. The explicit flush sites (hos_fatal, svcExitProcess, window close, hos_relaunch before execve) are shared and unchanged.
  • docs/development.md: rows for HOS_LOG_SYNC=1 and HOS_LOG_BATCH_MS=<ms>, previously undocumented.
  • tests/log_batch_test.c, tests/test_log_batch.py: 12 game-free cases, now runnable on Linux.

Measurements

Verdict: the deadlock is fixed: the inversion case of tests/log_batch_test.c deadlocks with main's lock order (12 of 12 runs, measured before the rebase) and passes here. On main, log_main() takes log_lock and then log_write_lock while it still holds log_lock; log_flush() takes log_write_lock and then log_lock. In the game on Linux the writer brought no frame-time gain: the median is the same, and the tail figures are higher with the writer on (table below); whether that is beyond run-to-run variation is not established.

Baseline: one build of nightly-338 (main @ e9e7cf0b) plus local patches (this change among them), with HOS_LOG_SYNC=1 in one arm and unset in the other. It is not main against this PR; that run is listed under Must be tested.

Hardware: Linux (CachyOS, kernel 7.4.0-rc1), Ryzen 7 5800X, 32 GB, Radeon RX 9070 XT, RADV (Mesa 26.2.6), gamescope
Scene: "heavy" = Castle Town market -> Hyrule Castle -> Hyrule Field, twice, capped 60; 3+3 interleaved runs (6 legs), 21,600 frames pooled per arm
Method: per-frame times from the heavy benchmark's frame-time logs; async writer on against off (HOS_LOG_SYNC=1) on the same build, after a warm-up; 3+3 interleaved runs, median reported per leg and pooled
How to reproduce: the heavy route at capped 60, one arm with HOS_LOG_SYNC=1, the other with it unset, on the same build

HOS_LOG_SYNC=1 (old: per-line writes, no writer) HOS_LOG_SYNC unset (writer on)
p50 frame time 19.05 ms 18.81 ms
p99 frame time 41.5 ms 43.2 ms
p99.9 frame time 221 ms 246 ms
Frames over 100 ms 45 55
Time in frames of 40 ms or more 16,499 ms 19,495 ms

Per leg (median of 3 runs each): 1 of 6 legs differs beyond its runs' spread (Hyrule Castle, second pass: 3.7 % faster with the writer on); the other five are within ±3.4 % either way. No A/A pair of an unchanged configuration was run, so the spread of the tail figures is not known.

Flags and settings

No new switches. Two existing ones are documented; neither ships with a changed default.

Flag What it is Before this PR After this PR Effect Helps / doesn't help / untested Recommendation
HOS_LOG_SYNC=1 Write each line from the thread that logs it, one write each (no writer thread) Linux: the only path; Windows: opt-in kill switch, writer on by default Linux: opt-in (unset = writer on); Windows unchanged A slow disk holds the logging thread again Helps A/B and finding a line's own thread; not measured in-game here off (the default); on only for testing
HOS_LOG_BATCH_MS=<ms> How long the writer waits before writing that time's lines in one write (default 250 ms, max 2000 ms; 0 = each wake at once) Windows only Windows and Linux A few writes a second instead of one per line Untested in-game on Linux unchanged (250 ms)

Testing

Tested: Linux (CachyOS, kernel 7.4.0-rc1), Ryzen 7 5800X, Radeon RX 9070 XT, RADV (Mesa 26.2.6), gamescope : game-free tests, and in the game the A/B in Measurements (the local build ran both benchmark routes with the writer on; no run hung). python -I -B tests/test_log_batch.py: 12 of 12 cases pass (batch, default, off, burst, flush, threads, slow, sync, exit, crash, crash_locked, inversion); the same test against main's host/hos_thread.c fails ("log queue block not found"). Stress under load (8 runs at once, 6 CPU-bound helpers): crash 100 of 100, crash_locked 100 of 100, threads 300 of 300, exit 100 of 100, slow 20 of 20, inversion 24 of 24 ok. Host compile with clang from the installed toolchain, host build flags, -Wall -Wextra: only the pre-existing pick_cache_cores unused-function warning, exit 0.

Not tested: Windows (see Must be tested); a live game crash exercising the deadlock fix (the game-free crash and crash_locked cases cover the flush on the crash path); a real disk stall (the sink is simulated); Emscripten (stub unchanged, not compiled here); tests/run_all.py in full on this rebase.

Must be tested:

  • Windows, any GPU: python -I -B tests/test_log_batch.py (12 cases; the Linux-only crash cases are skipped there) and a deliberate crash in a test build with lines still queued, expecting them to reach the log file (Test Farm: @Beanstalk windows, python -I -B tests/test_log_batch.py).
  • Linux, RADV, gamescope: the in-game A/B above on hf48run (a save in Hyrule Field, the character running a fixed route, 1440p output, render scale 1, frame generation off, uncapped) and on heavy, expecting no change in log content or order and crash-path lines to reach the log before exit (by hand).
  • Linux, RADV, gamescope: main @ ac778751 against this PR @ 269ad429, 2 interleaved runs each (still to do): run hf48run and heavy, expecting the fps and frame-time numbers in Measurements to be confirmed or corrected; the current numbers are from a single-build A/B, not main against this PR (by hand).

Risks

What could break: every log line on Linux now goes through a queue and a writer thread. A line logged just before a crash or exit that misses a flush site could be lost; the crash report and atexit flush the queue, and the explicit flush sites are shared and unchanged. log_flush() now takes the queue lock before the write lock: a flush that finds a write in progress waits while holding the queue lock (a producer logging at the same moment waits too). Only the full-queue, exit and fatal paths flush, so this is rare.

Known, not changed: the writer's own crash filter (log_drain_raw, one TryAcquire on the queue lock) can drop lines queued while the writer holds that lock at a crash: 63 of 80 crash runs under load kept their lines. Not reached on Linux (the crash report replaces that filter); on Windows it is reached when HOS_LARGE_PAGES=1 skips hos_commit_init. Left for its own PR.

Turning it off: HOS_LOG_SYNC=1 (per run, no rebuild) restores the per-line path; the deadlock fix has no switch — revert the commit.

Compatibility: longshot_log.txt on Linux: lines reach the file up to HOS_LOG_BATCH_MS (250 ms) after they are logged. Lines written straight to stderr by the platform shim or the crash paths' raw drain can now appear before earlier queued lines. Nothing in saves, options, caches or the ABI changes.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what
    can't be run by hand is in Testing's Not testable by hand, with why.
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and
    in Risks. Not ticked yet: Measurements show higher tail frame times with the writer on, and the risk of lost log lines is unmeasured.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (not run in full on this rebase; the PR's own tests pass (named in Testing)).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
  • Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value.
  • A game-free test added for the fix, failing on main and passing here.
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Docs updated.
**Type:** fix · **Risk:** medium · **Tested on:** Linux (CachyOS, kernel 7.4.0-rc1), Radeon RX 9070 XT, RADV (Mesa 26.2.6): game-free tests, and a local build with the writer on · **Needs:** Windows, any GPU (`log_flush()` is shared code) ## Why On Linux every line the game logs is written to stderr by the thread that logs it, one write per line, unbuffered. Windows has had a writer thread that queues and batches those lines, but its code was gated to `_WIN32`, so on Linux that writer never ran. The per-frame lines used for performance work (`RX_VK_SLOW_LOG`, `HOS_FPS_LOG`, `HOS_THREAD_TIMES`) are logged by the replay thread, so on Linux a slow disk holds that thread and the frame. Windows' own comment in `host/hos_thread.c` records the render thread held 140-310 ms in one line's write before its writer existed. This change enables the existing writer on Linux. No tracker issue fits. ## How to reproduce **Seen on:** main, Linux, any disk **Settings and switches:** defaults **Steps:** - Synthetic hold: the `slow` case of `tests/log_batch_test.c` with the writer off (`HOS_LOG_SYNC=1`, main's Linux behaviour): 100 lines against a 50 ms sink. - Deadlock, shared with Windows: the `inversion` case. Main's `log_flush()` takes the write lock then the queue lock; `log_main()` takes the queue lock then the write lock. **Expected:** the calling thread returns in well under a millisecond per line; a flush during a write completes. **Actual:** `slow: 100 lines in 5110.33 ms` (writer off); `DEADLOCK` in 12 of 12 runs of `inversion` (exit 3). ## What changed Enable the existing log writer on Linux and fix a lock-order deadlock in its flush that Windows also has. Document the two existing log switches. - `host/hos_thread.c`: the writer gate is `(defined(_WIN32) || defined(__linux__)) && !defined(__EMSCRIPTEN__)`. Every call it needs has a Linux shim in `host/posix`: SRW locks, condition variables, `CreateThread`, the unhandled-exception filter (the crash signals), `GetStdHandle`/`WriteFile`, `GetTickCount64`. Emscripten keeps its stub; batching and the kill switch are unchanged. - `host/hos_thread.c`, `log_flush()`: take the queue lock then the write lock (the writer's order), and copy the batch into a local array (a shared static one raced between two flushes). This lock-order fix is in shared code that Windows also runs. - Crash path on Linux: `report_crash`, installed by `hos_commit_init` after the log's own filter, ends in `hos_log_flush()`; the crash signals installed by `SetUnhandledExceptionFilter` (SEGV, BUS, ILL, FPE, ABRT) reach it. The explicit flush sites (`hos_fatal`, `svcExitProcess`, window close, `hos_relaunch` before `execve`) are shared and unchanged. - `docs/development.md`: rows for `HOS_LOG_SYNC=1` and `HOS_LOG_BATCH_MS=<ms>`, previously undocumented. - `tests/log_batch_test.c`, `tests/test_log_batch.py`: 12 game-free cases, now runnable on Linux. ## Measurements **Verdict:** the deadlock is fixed: the `inversion` case of `tests/log_batch_test.c` deadlocks with main's lock order (12 of 12 runs, measured before the rebase) and passes here. On `main`, `log_main()` takes `log_lock` and then `log_write_lock` while it still holds `log_lock`; `log_flush()` takes `log_write_lock` and then `log_lock`. In the game on Linux the writer brought no frame-time gain: the median is the same, and the tail figures are higher with the writer on (table below); whether that is beyond run-to-run variation is not established. Baseline: one build of nightly-338 (main @ e9e7cf0b) plus local patches (this change among them), with `HOS_LOG_SYNC=1` in one arm and unset in the other. It is not main against this PR; that run is listed under Must be tested. Hardware: Linux (CachyOS, kernel 7.4.0-rc1), Ryzen 7 5800X, 32 GB, Radeon RX 9070 XT, RADV (Mesa 26.2.6), gamescope Scene: "heavy" = Castle Town market -> Hyrule Castle -> Hyrule Field, twice, capped 60; 3+3 interleaved runs (6 legs), 21,600 frames pooled per arm Method: per-frame times from the heavy benchmark's frame-time logs; async writer on against off (`HOS_LOG_SYNC=1`) on the same build, after a warm-up; 3+3 interleaved runs, median reported per leg and pooled How to reproduce: the heavy route at capped 60, one arm with `HOS_LOG_SYNC=1`, the other with it unset, on the same build | | `HOS_LOG_SYNC=1` (old: per-line writes, no writer) | `HOS_LOG_SYNC` unset (writer on) | |---|---|---| | p50 frame time | 19.05 ms | 18.81 ms | | p99 frame time | 41.5 ms | 43.2 ms | | p99.9 frame time | 221 ms | 246 ms | | Frames over 100 ms | 45 | 55 | | Time in frames of 40 ms or more | 16,499 ms | 19,495 ms | Per leg (median of 3 runs each): 1 of 6 legs differs beyond its runs' spread (Hyrule Castle, second pass: 3.7 % faster with the writer on); the other five are within ±3.4 % either way. No A/A pair of an unchanged configuration was run, so the spread of the tail figures is not known. ### Flags and settings No new switches. Two existing ones are documented; neither ships with a changed default. | Flag | What it is | Before this PR | After this PR | Effect | Helps / doesn't help / untested | Recommendation | |---|---|---|---|---|---|---| | `HOS_LOG_SYNC=1` | Write each line from the thread that logs it, one write each (no writer thread) | Linux: the only path; Windows: opt-in kill switch, writer on by default | Linux: opt-in (unset = writer on); Windows unchanged | A slow disk holds the logging thread again | Helps A/B and finding a line's own thread; not measured in-game here | off (the default); on only for testing | | `HOS_LOG_BATCH_MS=<ms>` | How long the writer waits before writing that time's lines in one write (default 250 ms, max 2000 ms; 0 = each wake at once) | Windows only | Windows and Linux | A few writes a second instead of one per line | Untested in-game on Linux | unchanged (250 ms) | ## Testing **Tested:** Linux (CachyOS, kernel 7.4.0-rc1), Ryzen 7 5800X, Radeon RX 9070 XT, RADV (Mesa 26.2.6), gamescope : game-free tests, and in the game the A/B in Measurements (the local build ran both benchmark routes with the writer on; no run hung). `python -I -B tests/test_log_batch.py`: 12 of 12 cases pass (`batch`, `default`, `off`, `burst`, `flush`, `threads`, `slow`, `sync`, `exit`, `crash`, `crash_locked`, `inversion`); the same test against main's `host/hos_thread.c` fails ("log queue block not found"). Stress under load (8 runs at once, 6 CPU-bound helpers): `crash` 100 of 100, `crash_locked` 100 of 100, `threads` 300 of 300, `exit` 100 of 100, `slow` 20 of 20, `inversion` 24 of 24 ok. Host compile with clang from the installed toolchain, host build flags, `-Wall -Wextra`: only the pre-existing `pick_cache_cores` unused-function warning, exit 0. **Not tested:** Windows (see Must be tested); a live game crash exercising the deadlock fix (the game-free `crash` and `crash_locked` cases cover the flush on the crash path); a real disk stall (the sink is simulated); Emscripten (stub unchanged, not compiled here); `tests/run_all.py` in full on this rebase. **Must be tested:** - Windows, any GPU: `python -I -B tests/test_log_batch.py` (12 cases; the Linux-only crash cases are skipped there) and a deliberate crash in a test build with lines still queued, expecting them to reach the log file (Test Farm: @Beanstalk windows, `python -I -B tests/test_log_batch.py`). - Linux, RADV, gamescope: the in-game A/B above on `hf48run` (a save in Hyrule Field, the character running a fixed route, 1440p output, render scale 1, frame generation off, uncapped) and on `heavy`, expecting no change in log content or order and crash-path lines to reach the log before exit (by hand). - Linux, RADV, gamescope: main @ ac778751 against this PR @ 269ad429, 2 interleaved runs each (still to do): run `hf48run` and `heavy`, expecting the fps and frame-time numbers in Measurements to be confirmed or corrected; the current numbers are from a single-build A/B, not main against this PR (by hand). ## Risks **What could break:** every log line on Linux now goes through a queue and a writer thread. A line logged just before a crash or exit that misses a flush site could be lost; the crash report and `atexit` flush the queue, and the explicit flush sites are shared and unchanged. `log_flush()` now takes the queue lock before the write lock: a flush that finds a write in progress waits while holding the queue lock (a producer logging at the same moment waits too). Only the full-queue, exit and fatal paths flush, so this is rare. Known, not changed: the writer's own crash filter (`log_drain_raw`, one `TryAcquire` on the queue lock) can drop lines queued while the writer holds that lock at a crash: 63 of 80 crash runs under load kept their lines. Not reached on Linux (the crash report replaces that filter); on Windows it is reached when `HOS_LARGE_PAGES=1` skips `hos_commit_init`. Left for its own PR. **Turning it off:** `HOS_LOG_SYNC=1` (per run, no rebuild) restores the per-line path; the deadlock fix has no switch — revert the commit. **Compatibility:** `longshot_log.txt` on Linux: lines reach the file up to `HOS_LOG_BATCH_MS` (250 ms) after they are logged. Lines written straight to stderr by the platform shim or the crash paths' raw drain can now appear before earlier queued lines. Nothing in saves, options, caches or the ABI changes. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what can't be run by hand is in Testing's Not testable by hand, with why. - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [ ] Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and in Risks. Not ticked yet: Measurements show higher tail frame times with the writer on, and the risk of lost log lines is unmeasured. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [ ] `python -I -B tests/run_all.py` passes (not run in full on this rebase; the PR's own tests pass (named in Testing)). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported. - [x] Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value. - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Docs updated.
fix(linux): the log writer thread runs on Linux too
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 8s
269ad42927
The async log writer (host/hos_thread.c: queue, log_main, batched
writes, log_flush on exit and on the crash paths) was gated to
_WIN32, so on Linux every hos_log line, and every logf line that goes
through it (RX_VK_SLOW_LOG, HOS_FPS_LOG, HOS_THREAD_TIMES), was an
unbuffered write on the thread that logged it. That thread is the
replay thread for the per-frame lines. The Windows writer's own comment
records a 140-310 ms hold in one line's write from exactly this.

Every call the writer makes already has a host/posix shim (SRW locks,
condition variables, CreateThread, GetStdHandle/WriteFile for the raw
drain, GetTickCount64). The gate is now (_WIN32 || __linux__), and
__EMSCRIPTEN__ keeps its stub.

log_flush took the write lock and then the queue lock; log_main takes
the queue lock and then the write lock. A flush that got the write
lock while the writer held the queue lock and waited for it deadlocked
(tests/log_batch_test.c "inversion": 12 of 12 runs, deterministic;
once in 600 runs of the threads case under load before the change).
log_flush now takes the queue lock first, then the write lock, the
writer's order, and takes its batch into its own array. This is in the
shared writer, so the Windows build gets it too.

Crash and exit paths are the same code as on Windows. On Linux the
crash report (mkw_glue.c report_crash, set by hos_commit_init after
the log's own filter) ends in hos_log_flush, and SetUnhandledExceptionFilter
installs the crash signals (SEGV, BUS, ILL, FPE, ABRT) that reach it.
The explicit flush sites (hos_fatal, svcExitProcess, the window's close,
hos_relaunch's execve) run unchanged.

Kill switch: HOS_LOG_SYNC=1 restores the per-line synchronous write.
HOS_LOG_BATCH_MS is unchanged.

tests/test_log_batch.py now runs on Linux too, building the same
extracted writer against host/posix/windows.h and win32_posix.c. New
cases: threads (8 threads, every line once, each thread's lines in
order), slow (a 50 ms sink holds no caller), sync (HOS_LOG_SYNC=1 is one
write per line), exit (queued lines go out from atexit), crash and
crash_locked (queued lines reach stderr before SIGABRT ends the
process, through the crash report's flush, also with another thread
holding the queue lock), inversion (the deadlock above).

Assisted-by: Claude Code
Assisted-by: Claude (Anthropic)
Author
First-time contributor

Tested in game: this commit has been in the local build the Measurements come from since 2026-11-16 (nightly-338 base; Linux, CachyOS, Ryzen 7 5800X, RX 9070 XT, RADV Mesa 26.2.6, gamescope), with the writer on in every run except the HOS_LOG_SYNC=1 arm: both benchmark routes, several hours in total, and no run hung. Not run: this branch built from its own commit on current main, a real crash with lines still queued, and anything on Windows, where the changed log_flush() also runs.

Tested in game: this commit has been in the local build the Measurements come from since 2026-11-16 (nightly-338 base; Linux, CachyOS, Ryzen 7 5800X, RX 9070 XT, RADV Mesa 26.2.6, gamescope), with the writer on in every run except the `HOS_LOG_SYNC=1` arm: both benchmark routes, several hours in total, and no run hung. Not run: this branch built from its own commit on current main, a real crash with lines still queued, and anything on Windows, where the changed `log_flush()` also runs.
Owner

Brought up to the ready-for-review standard (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know).

  • Tested on my own PC: ticked: Author's comment: the commit ran in the author's local game build on RX 9070 XT, RADV, with the writer on, across both routes.
  • Nothing gets worse that I know of: not ticked: Measurements show higher tail frame times with the writer on, and the risk of lost log lines is unmeasured. Measure that cost and state it in Risks, then tick it.
Brought up to the [ready-for-review standard](https://git.magicbean.dev/MagicBeanDev/Longshot/src/branch/main/CONTRIBUTING.md#ready-for-review-out-of-wip) (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know). - *Tested on my own PC*: ticked: Author's comment: the commit ran in the author's local game build on RX 9070 XT, RADV, with the writer on, across both routes. - *Nothing gets worse that I know of*: not ticked: Measurements show higher tail frame times with the writer on, and the risk of lost log lines is unmeasured. Measure that cost and state it in Risks, then tick it.
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 8s
This pull request is marked as a work in progress.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'linux/async-log:Molier-linux/async-log'
git switch 'Molier-linux/async-log'
Sign in to join this conversation.
No reviewers
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!1284
No description provided.