stacks: scheduled dumps also go to the crash log #4132

Open
github-bot wants to merge 12 commits from github-bot/gh-4132 into main AGit
Owner

@⁠kc01-8 on GitHub · 2026-11-30 16:32 UTC · original
kc01-8:kc/stacks-crash-log → main · +13 −7 · 2 files · 12 commits · open

CI: the check job is red on main itself (84bd61e2c) with four clippy errors: loop_caps never read (victory-shader/src/emit/lower.rs), copystat::mb and Shadow::ranged never used, and a manual .is_multiple_of() in host.rs. This PR adds no clippy error and no failing test: I checked by running the workflow's steps on this PR merged into main and on main itself. Under Wine, two tests fail now and then on main as well (xmem::a_title_thread_goes_on_using_the_rest_of_a_view, crash::concurrent_crash_records_stay_together).

What: VICTORY_STACKS=<seconds>,... now also appends each dump to the crash log. Until now it printed to stderr only.

Why: under Proton the game is started without a console, so the program's stderr reaches no file and the scheduled dumps were lost. The hang watcher's dumps already go to the crash log; the scheduled ones now go there too.

The change (crates/victory-loader/src/stacks.rs, crash.rs):

  • dump_stacks builds the text in a String instead of calling eprintln! for each line.
  • Each thread is still suspended only while its context is read and unwound into the buffer allocated beforehand. The text is made after the thread is resumed, so no formatting or allocation happens while a thread that may hold the heap lock is stopped.
  • The text then goes to stderr as before, and to the crash log through crash::append_to_log, which is now pub(crate).

Tested on an RTX 3080 Ti under Proton Experimental 11.0, with a diagnostics build: in a run with VICTORY_STACKS set, the dump was in crashes.log: 142 threads, each with its frames. It showed all four pipeline workers inside the driver's pipeline compile, called from vkd3d-proton, which is how we found that the pipelines weren't coming from the driver's cache. On this tree, cargo clippy -p victory-loader -- -D warnings is clean with and without --features diagnostics.

Context: this came out of getting the title running at speed on an RTX 30 card under Linux/Proton, https://github.com/kc01-8/VIctoryNVIDIALINUX (branch kc/trustno1, built on this tree). There, with DLSS performance, play renders at 19.5 fps, and FSR 3 frame generation shows 35.8–37.4 frames a second.

🤖 Generated with Claude Code

**@⁠kc01-8** on GitHub · 2026-11-30 16:32 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4132) `kc01-8:kc/stacks-crash-log` → `main` · +13 −7 · 2 files · 12 commits · open **CI:** the `check` job is red on `main` itself (84bd61e2c) with four clippy errors: `loop_caps` never read (`victory-shader/src/emit/lower.rs`), `copystat::mb` and `Shadow::ranged` never used, and a manual `.is_multiple_of()` in `host.rs`. This PR adds no clippy error and no failing test: I checked by running the workflow's steps on this PR merged into `main` and on `main` itself. Under Wine, two tests fail now and then on `main` as well (`xmem::a_title_thread_goes_on_using_the_rest_of_a_view`, `crash::concurrent_crash_records_stay_together`). **What:** `VICTORY_STACKS=<seconds>,...` now also appends each dump to the crash log. Until now it printed to stderr only. **Why:** under Proton the game is started without a console, so the program's stderr reaches no file and the scheduled dumps were lost. The hang watcher's dumps already go to the crash log; the scheduled ones now go there too. **The change** (`crates/victory-loader/src/stacks.rs`, `crash.rs`): - `dump_stacks` builds the text in a `String` instead of calling `eprintln!` for each line. - Each thread is still suspended only while its context is read and unwound into the buffer allocated beforehand. The text is made after the thread is resumed, so no formatting or allocation happens while a thread that may hold the heap lock is stopped. - The text then goes to stderr as before, and to the crash log through `crash::append_to_log`, which is now `pub(crate)`. **Tested** on an RTX 3080 Ti under Proton Experimental 11.0, with a diagnostics build: in a run with `VICTORY_STACKS` set, the dump was in `crashes.log`: 142 threads, each with its frames. It showed all four pipeline workers inside the driver's pipeline compile, called from vkd3d-proton, which is how we found that the pipelines weren't coming from the driver's cache. On this tree, `cargo clippy -p victory-loader -- -D warnings` is clean with and without `--features diagnostics`. Context: this came out of getting the title running at speed on an RTX 30 card under Linux/Proton, https://github.com/kc01-8/VIctoryNVIDIALINUX (branch `kc/trustno1`, built on this tree). There, with DLSS performance, play renders at 19.5 fps, and FSR 3 frame generation shows 35.8–37.4 frames a second. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
`VICTORY_STACKS` printed every thread's stack to stderr only, which under
Proton reaches no file: the title is started without a console. The text
is now made after each thread is let go and appended to the crash log as
well (seen here under Proton: the four pipeline workers all inside the
driver's pipeline compile, called from vkd3d-proton).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 16:33:25 +00:00
The main this branch last merged (84bd61e2c) is no longer in trustno1/main,
so the PR showed its old commits as changes. This merge takes trustno1/main
as it is now and puts back only this PR's own change; nothing is force-pushed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/4132/head:github-bot/gh-4132'
git switch 'github-bot/gh-4132'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4132'
git switch 'github-bot/gh-4132'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4132'
git switch 'github-bot/gh-4132'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4132'
git switch 'main'
git merge --squash 'github-bot/gh-4132'
git switch 'main'
git merge --ff-only 'github-bot/gh-4132'
git switch 'main'
git merge 'github-bot/gh-4132'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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
github/trustno1-coder--VIctory-NVIDIA!4132
No description provided.