RDNA4: the AMD shader compiler crashes (amdxc64+0x861b9f) when pipelines compile on several threads; one thread avoids it #2124
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#2124
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@rpmaster2 on GitHub · 2026-11-25 05:35 UTC · original
The AMD shader compiler crashes while several pipelines compile at once, and compiling them on one thread avoids it.
Host: RX 9070 XT 16 GB (RDNA4), Adrenalin 26.11.2 (32.0.32029.2010), Windows 11 26300, Ryzen 5 5600, 32 GB, pagefile 32/48 GB on F:. Diag build,
VICTORY_D3D12_DRED=1,--console series-xunless noted, 42Enterpresses over 1.83-7.31 s.What happens: the title dies with an access violation inside the driver, not in our code:
followed by the driver stack (
amdxc64.dll+0x957eba,+0x959456,+0x957814,+0x864d5d,+0x955d16,+0x676605) and the title's Breakpad handler. No device removal, no DRED page fault - the process dies in the DXIL compiler while a pipeline is being created.Repro rate: 3 of 3 runs on current
main@940d32f, and the same offset on two other trees:main@940d32fmain+ #1762fxceless/victory-fork@310c6ebThe shader being compiled when it dies is not constant: the last translated compute program was
e79dd4bd900b4200in one run and1e4947eada3d9ee3in the next, so it is the act of compiling, not one program.The variable that matters: pipeline workers.
crates/victory-gpu/src/pipeline/make.rsspawnsavailable_parallelism/2clamped to 2..8 workers (6 here). With a local patch that makes that count an env var andVICTORY_PIPELINE_THREADS=1, the same build ran 420 s with no exception, 11 black-frame warnings, 2,608 draws/frame, 0.6 fps in the credits/prologue cutscene.So on this card the driver's compiler is not safe to call from several threads at once, and everything else (rendering, removal behaviour) is unchanged by the workaround.
Proposal: make the worker count configurable (
VICTORY_PIPELINE_THREADS, default as today) so AMD users have a workaround, and consider a lower default on AMD adapters. I can send the two-line patch as a branch if you want it; it is only thelet n = ...inqueue().Not tested: other AMD cards, NVIDIA, RDNA3,
--console series-s, and whether a cap of 2 or 4 is enough (I went straight to 1). No game data in this report: hashes, counts and error strings only.AI-assisted: written by DeepSeek (OpenCode harness) from my run logs; the hardware and the dump are mine.
Correction (same day): one thread delays the crash, it does not remove it.
A longer run on the same single-thread build (
VICTORY_PIPELINE_THREADS=1, 900 s cap) died the same way:It got further than the multi-threaded runs (1,710 draws/frame, 4 black-frame warnings) before dying, but the fault offset is identical. So the worker count is not the root cause - the first 420 s single-thread run that survived was luck, not evidence.
What is still true from the original report:
amdxc64.dll+0x861b9f), not a device removal and not a DRED page fault;main@940d32f, onmain+ #1762, and onfxceless/victory-fork@310c6eb- three trees, same offset;e79dd4bd900b4200,1e4947eada3d9ee3), so it is not one program;What I would try next, rather than threads: compile one shader at a time and log the exact program at the moment of the fault. If the fault moves with the program, it is the DXIL we emit for a class of programs (mesh/wave64 or large compute kernels are the two candidates on this host); if it stays at the same offset regardless of program, it is the driver itself and the workaround has to be on our side (skip that class).
Anyone who can run
VICTORY_SKIP_PIPELINESwith the two hashes above on RDNA4 would settle that quickly; I will do it here when the card is free.Still not tested: RDNA2/3, NVIDIA,
--console series-s, and other driver versions. No game data in this report: hashes, counts and error strings only.AI-assisted: written by DeepSeek (OpenCode harness) from my run logs; the hardware and the dump are mine.
@rpmaster2 on GitHub · 2026-11-25 05:53 UTC · original
A reproducer without running the title, which should make this much cheaper to bisect.
on
main@940d32f, diag build, no game process involved, dies part-way throughshaders.rpf:and then the process is gone - no
victoryerror line, no summary, exit status 1. That is the same silent exit as the in-game fault atamdxc64.dll+0x861b9f, and it happens in the driver's compiler, so the tool's own error handling never sees it.Why this matters: it reproduces in ~12 minutes with no game, no save, no keys, and no device, so a
git bisectbetween the last known-good tree and940d32fcan run on this alone. The last known-good tree on my host isffe310e(yesterday'smain), which ran the game for 3-5 minutes at a time across a dozen runs with noamdxc64fault at all.I have not confirmed the two crashes are the same event, only that both are abrupt and that the in-game one is
amdxc64.dll+0x861b9f. If anyone wants to run the bisect, the recipe is: build--profile diag -p victory --features diagnostics,victory translate --pipelines, and treat "reaches 100% and prints the summary" as good versus "dies around 86%" as bad. I can start it here, it is just long (about 13 minutes per step).No game data in this report: counts, hashes and error strings only.
AI-assisted: written by DeepSeek (OpenCode harness) from my run logs; the hardware and the dump are mine.
@rpmaster2 on GitHub · 2026-11-25 07:28 UTC · original
Bisected, and confirmed in the game. The first bad commit is
c75fdba("GPU: views the shaders pick from the heap, and one change journal for title memory"); its parent4f57f46("Shaders: cube samples with gradients take their level from the gradients") is clean.Method. Signal =
victory translate --pipelines(the offline reproducer from my previous comment): a good commit reaches 100% and prints the summary, a bad one dies part-way.git bisect start 940d32f ffe310e, build--profile diag -p victory --features diagnosticsat each step, one translate per step. It converged in 8 steps.In-game confirmation, same host, same save, 42
Enterpresses, 300 s:c75fdba0xc0000005 at amdxc64.dll+0x861b9fduring startup, last line a host compute pipeline, max 14 draws/frame4f57f46(parent)Both sit in the front end at 14 draws/frame, so the difference is not "how far it got": the parent simply never hits the fault that the child hits while compiling its startup pipelines.
What that commit touches, from
git show --stat: newcrates/victory-gpu/src/bindless.rs(+554),descriptor/host.rs(+90),descriptor.rs,draw.rs,capture.rs,copystat.rs, plus README. The message: "Buffer views and title-written textures get host views when the title writes them; lists that index the heap have every range current at submission. Changes are tracked per 64 KiB page with guards, kernel writes and aliased mappings reported."How a view/heap commit ends in the shader compiler is the part I cannot answer from here - my guess is that the host views it now creates (formats, planes, the writable twins) are what the pipelines are compiled against, and one of those states hits the driver bug. The fault offset is the same one as every other crash in this issue, so the driver is still the thing falling over.
Suggestion: on AMD, treat
c75fdbaas the regression to look at first, or test the tree with it reverted - it is the only commit between a clean run and a startup crash in my bisect.Caveats: one bisect, one in-game run per side, and the offline signal can be affected by the shader cache (a warm cache can skip compilation); I verified the end points in the game so the pair above is not cache-dependent.
No game data in this report: counts, hashes and error strings only.
AI-assisted: written by DeepSeek (OpenCode harness) from my run logs; the hardware and the dump are mine.
@Marvisak on GitHub · 2026-11-25 12:53 UTC · original · edited 2026-11-25 15:48 UTC
Automated triage for the maintainers.
Thanks, a complete report: RX 9070 XT, Adrenalin 26.11.2 (32.0.32029.2010), Windows 11 26300,
940d32f, and the fault text:0xc0000005 at amdxc64.dll+0x861b9f, read0x8, inside the driver's compiler during pipeline creation.VICTORY_PIPELINE_THREADS) is a diagnostic knob, not the fix.victory translate --pipelines) lands onc75fdba("views the shaders pick from the heap…"); its parent4f57f46is clean in the game too.The cause is tracked in #1785, which has the earlier reports of this address (#1783 is the first). Since the last triage, two RX 9070 XT testers there ran open PR #2122, which gives a buffer size query a heap handle of its own. With it, a full
translate --cache --pipelinesfinished with noamdxc64.dllcrash, and an in-game run built 1,271 pipelines without one. Your offline reproducer onmain+ #2122 would be a useful third data point. Note thatmain(da82e44) has since changed how heap handles are made (850b66f), so please name the commit you test.The recovery policy in the last comment is a design proposal for the maintainers: catch a compiler fault on a pipeline worker, park that thread, and add the pipeline to a skip list. It would not remove the driver fault, and a thread abandoned inside the compiler may hold locks, as noted there.
Generated by Claude Code
@rpmaster2 on GitHub · 2026-11-25 14:51 UTC · original
A suggestion rather than a patch, in case it is useful.
Today a pipeline that faults while being made costs the whole session: the fault happens inside a pipeline creation call on one of our threads, and the process is gone. On our card (RX 9070 XT, Adrenalin 26.11.2) a handful of pipelines do this reproducibly; the cause was never established on our side.
What has helped in a fork of this project is a recovery policy, not a fix in the driver:
Two things to decide on: a thread abandoned in the compiler may hold locks, and the endless path checks where the thread is first (compiler code, not the heap) before suspending it. The skip list only grows with pipelines that reproducibly fault, so it stays short.
Where this has been tried, GPL-3.0-or-later as here:
https://github.com/Belobug/VIctory-Belobug-AMD at 71652a2 - crates/victory-gpu/src/pipeline/ (library.rs: the handler, the skip file, the watcher; make.rs: the workers and replacements).
With this policy the fork keeps the process alive for many minutes on this card and keeps making progress; without it, the same runs end in a couple of minutes. If an upstream implementation appears, we can test it here.
AI-assisted: written by DeepSeek (OpenCode harness) from the user's logs and the fork's source; no game or personal data.
amdxc64.dllwhile a translated compute pipeline is created #2517