Skip to content

Crash log: name the pipelines the host driver was compiling - #603

Open
hxghr6 wants to merge 1 commit into
fxceless:mainfrom
hxghr6:diag/crash-names-pipeline
Open

hxghr6 wants to merge 1 commit into
fxceless:mainfrom
hxghr6:diag/crash-names-pipeline

Conversation

@hxghr6

@hxghr6 hxghr6 commented Nov 25, 2026

Copy link
Copy Markdown

A fault inside the host driver's shader compiler names only the driver's code (amdxc64.dll+0x861b9f in #120 and #145, +0x85fd0f in #422), and #505 could only say it happened "while several pipelines compile at once". The pipeline library already keeps the calls running, with their shaders, for the device-removed log line. This puts the same list into what crashes.log keeps, with the reporting thread's call marked (in the report of an exception, that is the faulting thread):

pipeline library: make of <name> [compute <hash>] running for 1234.5 ms on thread 4321 (the reporting thread)

Change

  • victory-loader: note_on_crash(fn() -> String) registers a line for the crash log, once per function. Notes go into the report of an unhandled exception and into every log_crash failure (host GPU failure, commit limit, unimplemented import). They run on the reporting thread and wait for no lock that thread may hold (try_lock).
  • victory-gpu: pipeline::crash_note() lists the library's running calls, with the same formatter as the device-removed note. Pipelines made with no host library are recorded as calls too.
  • victory-hle: D3D12XboxCreateDevice registers the GPU's note next to on_failure.

victory-loader does not depend on victory-gpu, hence the registry.

Tested on an RX 9070 XT

Windows 11, Adrenalin 32.0.31044.16, diag build of this branch on main c96b4f2, the title run into the world with scripted keys.

A fault inside the driver's compiler. This driver does not hit the 0x861b9f crash by itself, so while the world's pipelines compiled, a thread that was inside amdxc64.dll was made to call address 0x10 from where it was (its return address pushed, so the stack walk goes on into the driver). crashes.log:

VIctory: unhandled exception 0xc0000005 at 0x10 (execute 0x10: nothing mapped there)
  #0  0x10
  #1  amdxc64.dll+0x12a6d0
  #2  amdxc64.dll+0x82ba69
  ... (#3 to #26 in amdxc64.dll)
  #27 D3D12Core.dll+0x5cbc9
  ... (#28 to #35 in D3D12Core.dll and d3d12.dll)
  #36 victory.exe+0x23c18d
  #37 victory.exe+0x1a766d
  #38 victory.exe+0x1bfb44
  #39 victory.exe+0x686946
  pipeline library: make of 0402c2738d012db869c1820a6055f316 [compute 39f0e9aeb156a61c] running for 75359.8 ms on thread 1380 (the reporting thread), make of 82989f0ccaf4afb4ce3232286f4cb546 [compute 85f8e9aba7fde2a6] running for 201.1 ms on thread 5112, make of bac43ae95bc7217aa9b3824ba321c285 [compute 87df99711607dd60] running for 163.2 ms on thread 20716, make of 5a925be3a3dedb14e7f61cef418ceaeb [compute 776d835da5ffa646] running for 59.2 ms on thread 14732

The driver compiles on the thread that creates the pipeline (victory, then D3D12Core, then amdxc64), so the marked call is the pipeline the driver was compiling: here 39f0e9aeb156a61c, the compute shader of #505, 75 s into its compile.

A host GPU failure. On this card the device is sometimes removed (0x887A0006) during a world load with a cold driver shader cache. The same failure in crashes.log, from an earlier build of this branch whose log_crash was still main's, and from this one:

before:
VIctory: host GPU failure: host GPU device removed after 1 submissions sent ahead (VICTORY_RELAY=1) of 6 lists; no breadcrumbs (...); device removed: (...) (0x887A0006); a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command

after:
VIctory: host GPU failure: host GPU device removed after 2 submissions sent ahead (VICTORY_RELAY=1) of 7 lists; no breadcrumbs (...); device removed: (...) (0x887A0006); a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command
  pipeline library: make of c6fdfc9ed98f57d58f86212407bd78e2 [compute 6a7fcb54bf246310] running for 2897.7 ms on thread 1484, make of 902bc3f2c80d6af319cc222a0b556272 [compute 5f8cf29b763648eb] running for 1731.8 ms on thread 4764, make of 9cab6aa3b368bc2564e76097eec55c9b [compute 27ce027e7188bed3] running for 319.2 ms on thread 9232

No call is marked there: the thread that reported the failure was not making a pipeline.

Checks

  • New tests: pipeline::library::tests::a_crash_names_the_pipeline_the_reporting_thread_makes (the call is marked on the making thread only; a held list gives a line instead of a wait) and crash::tests::crash_notes_are_added_once_and_said_in_order (once per function, in order, kept by log_crash, no wait on a held list).
  • cargo test --workspace --locked: 507 passed, 0 failed (GPU tests on the RX 9070 XT, DXIL validation on).
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: clean.
  • cargo clippy --workspace --all-targets --locked -- -D warnings: its one error is resource::placed_filler_twins never used, already on main c96b4f2 (main's CI run fails the same way; GPU: keep clippy green without the diagnostics feature #491 and Keep clippy green without the diagnostics feature #530 fix it).
  • cargo xtask policy: ok.

Related

#458 and #520 name, in the log, a pipeline a worker has held for a minute while the run goes on (a compile that never ends). This names the pipelines in the crash log when the run ends (a compile that crashes, or any failure the crash log keeps). Not covered: victory translate --pipelines installs no crash reporter.

A fault inside the host driver's shader compiler (amdxc64.dll+0x861b9f on
RDNA4, fxceless#120, fxceless#145, fxceless#505) names only the driver's code, so finding the
program behind it took one process per pipeline. The pipeline library
already keeps the calls running, with their shaders, for the device-removed
log line; what the crash log keeps now lists them too, with the reporting
thread's call marked (in the report of an exception, the faulting thread):

  pipeline library: make of <name> [compute <hash>] running for 1234.5 ms
  on thread 4321 (the reporting thread)

That is the report of an unhandled exception and every `log_crash`
failure: a host GPU failure (the device-removed list went to the log only,
so crashes.log said "device removed" with no pipeline), a commit-limit
failure, an unimplemented import.

victory-loader does not depend on victory-gpu, so it takes notes from
other crates (`note_on_crash`); d3d12x adds the GPU's at device creation,
next to `on_failure`. A note runs on the reporting thread and does not wait
for a lock that thread may hold. Pipelines made with no host library are
listed as well.
@MamaLeVrai

Copy link
Copy Markdown

Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head af58134 into main f85101b in a throwaway tree (no conflict). cargo clippy --workspace --all-targets --locked -- -D warnings fails with exactly the errors main itself has on this machine (placed_filler_twins, depth_written, a sort; PR #841 fixes them); with --all-features it fails with the same number of errors as main (4). This PR adds none and removes none. cargo test --workspace --locked: run 1: 557 passed, 0 failed, 11 ignored (main alone: 555 passed). In run 2 the victory-gpu test binary died with an access violation, which I also see on main alone about 8 times in 100 runs (issue #850), so I do not attribute it to this PR. The title was not run, so this says nothing about in-game effect. No game data.

AI-assisted (Claude Code); no game data.

PiloteCode pushed a commit to PiloteCode/victory-fork that referenced this pull request Nov 25, 2026
Formats: inline repeated micro-tile copies when detiling textures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants