GPU: VICTORY_COMPILER_GUARD=0 leaves the driver compiler's faults to the driver (NVIDIA) #158
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/158"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by pjanes22 on 2026-11-25T17:52:02Z.
The pipeline library's crash guard (
Making+ the vectored handlercompiler_crashed) sees an access violation near address 0 on a compilingthread before the driver's own handlers do. NVIDIA's compiler
(nvgpucomp64.dll) takes such faults itself and handles them: the log shows
"first-chance exception 0xc0000005 at nvgpucomp64.dll+0x2d5..." and the
pipeline is then made or refused normally.
With the guard on, on an RTX 5080 20-28 world mesh pipelines a run were
reported as "the driver's compiler crashed making a pipeline", their threads
parked and their names written to crashed.txt; every later run refused them
at once with E_FAIL (0x80004005) without asking the driver. That is why the
refusals came with no debug-layer message and changed from run to run.
An older fork without the guard made the same shader pairs on the same card.
Fix:
VICTORY_COMPILER_GUARD(default on, unchanged on AMD):0registers nohandler and ignores crashed.txt.
With the guard off the driver itself answers: most of these pipelines are
made, the rest are refused with E_OUTOFMEMORY (0x8007000E), as Yoshi-233
measured in #15. Not tested whether the guard could tell the two cases apart
by itself (e.g. by the faulting module).
AI-assisted: analysis and patch written with Claude, run and tested on my machine.
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by KernelSmoker on 2026-11-25T18:52:27Z.
Verified PR head
97a673c(x86_64-pc-windows-gnu, Rust 1.98.1):cargo clippy -p victory-gpu --no-deps --all-targets --locked --target x86_64-pc-windows-gnu: no warnings incrates/victory-gpu/src/pipeline/library.rs.cargo check --workspace --all-targets --locked --target x86_64-pc-windows-gnu: passed.Two minor cleanup notes in
crates/victory-gpu/src/pipeline/library.rs:/// Whether the driver crashed making the pipeline named \name` before.) was left abovecompiler_guard()instead of staying abovefn crashed(name: &str)`.Making::new(lines 169–174), onlyAddVectoredExceptionHandlerrequiresunsafe;compiler_guard()andtracing::warn!can sit outside theunsafeblock. (Also note thatendless(name, true)still runs whenVICTORY_COMPILER_GUARD=0, which is fine if only the VEH crash guard is meant to be disabled.)Imported from Belobug/VIctory-Belobug-AMD. Originally posted by Aniseto on 2026-11-26T20:08:13Z.
First test report from this machine for
Belobug/VIctory-Belobug-AMD, at the exact PR head97a673c:System
rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5 (shared env)a-publier, notmainResults
cargo test -p victory-gpu --lib pipeline::library -- --test-threads=1(defaultVICTORY_COMPILER_GUARD): 4 passed, 0 failed, 0 ignored (112 filtered out, exit 0)VICTORY_COMPILER_GUARD=0 cargo test --workspace --locked --no-fail-fast -- --test-threads=4: 551 passed, 12 failed, 17 ignored across 25 binaries (exit 101), 0 SKIPPED. The 12 failures weredynamic_slots_are_held_until_released,sdr_and_display_deferrals, sixmodules::xmemtests, fouremit::valu_teststests andrepository_passes_policy.What this adds
KernelSmoker checked this head with clippy and
cargo checkonx86_64-pc-windows-gnu; this is the first Windows MSVC run on a physical NVIDIA adapter in the thread. The fourpipeline::librarytests pass at this exact head with the guard at its default. With the guard off, the full suite at the same head had the failures listed above; I did not establish whether they come from this change, from this head's older base or from this host. This head is far from the currenta-publier(cd8dfc0), so no comparison against current main is implied.Not tested
A real driver compiler fault with the guard on or off, a paired smoke run under the title, release profile, AMD and Intel GPUs, native wave64 hosts, Wine, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.