RDNA4: the AMD shader compiler crashes (amdxc64+0x861b9f) when pipelines compile on several threads; one thread avoids it #2122
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?
Imported from Marvisak/VIctory. Originally posted by rpmaster2 on 2026-11-25T05:35:18Z.
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.
Imported from Marvisak/VIctory. Originally posted by rpmaster2 on 2026-11-25T05:53:59Z.
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.
Imported from Marvisak/VIctory. Originally posted by rpmaster2 on 2026-11-25T07:28:18Z.
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.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T12:53:37Z.
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
Imported from Marvisak/VIctory. Originally posted by rpmaster2 on 2026-11-25T14:51:48Z.
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 #2515Imported from Marvisak/VIctory. Originally posted by mintymerry7-create on 2026-11-26T20:12:25Z.
A data point at the same offset (RX 9060 XT, same driver 32.0.32029.2010, Windows 11 26300). In our runs the crash was always the same pipeline, compute
f16876929fa64f9f. It came right after that shader's translation and at the same place in the world: three runs, on two forks (avatarmanz-based and rorodev-based). Leaving out just that one pipeline let the others go on compiling on several threads, and we have not seen the crash since.So here it looked tied to that one shader rather than to the thread count. Both may hold: the driver bug may need that shader and concurrent compiles together.
What we use (https://github.com/mintymerry7-create/VIctory-7900XTX/tree/rdna4-perf, built on avatarmanz/VIctory-7900XTX):
VICTORY_LEAVE_OUT: hashes left out of pipeline creation; defaultf16876929fa64f9f;nonemakes it.Our full config and results on this card: https://github.com/avatarmanz/VIctory-7900XTX/issues/345
(AI-assisted)
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-28T01:11:28Z.
Correction, added later: there is a more specific trigger for this exact fault, so commit exhaustion is at most part of it.
amdxc64.dll+0x861b9fhappened with Belobug's "size query not reused" fix already in.getDimensionsa handle of its own on RDNA 4, markedNonUniformResourceIndexand kept out of the translator's REUSE (ported as ScarlettPort#93).The commit-limit readings below still stand as observations, but the shared size-query handle is the first thing to rule out.
A mechanism that may tie the reports here together, from five-star-recomp's measurements on the same driver and from the log in #3601. These are read from their threads and the attached log; I have no AMD card and ran nothing.
five-star-recomp#19 (RX 7800 XT, Adrenalin
32.0.32029.2010, the same driver as this issue):CreatePipelineState. Each time, the commit charge was at the limit just before: 68.3 of 68.9 GB, 70.1 of 70.9 GB, and 52.8 of 67.9 GB with five compiles in flight (comment). Their reading is an allocation failure the compiler doesn't check. They also note a race isn't ruled out, since a second build thread was in the same functions.#3601's log (RX 9070 XT, Adrenalin 26.11.2, 32 GB), same fault,
0xc0000005 at amdxc64.dll+0x861b9f (read 0x8)onvictory-pipelines-1:16005 MB private … 6013 MB left to commit.system.memory.swap.free1,329,140 KB ofsystem.memory.swap.total49,206,824 KB: about 1.3 GB of a 47 GB commit limit left.So about 4.7 GB of commit went in 9 s while that worker was in the compiler. Luislariosss's Breakpad context on #1785 had 3.1 GB of a 47.2 GB limit free just before the same fault.
How this would explain what's been seen here: one pipeline worker delays the crash (fewer compiles at a time), leaving out one pipeline (
f16876929fa64f9f, mintymerry7-create) avoids it, andvictory translate --pipelinesdies part-way through (rpmaster2). All three are what an exhausted commit charge would give.Two checks would test it. First, the
left to commitvalue on the last copystat line before the fault, in the other logs. Second, the DXIL size of the pipeline being compiled at the fault. If it holds, five-star's mitigation applies: they compile programs over 2 MB in a separate process with a memory and time limit (--host-pipelines, ThatRecompDev on five-star-recomp#19), so a driver fault becomes a failed compile and the pipeline stays a stand-in. That is close to rpmaster2's recovery suggestion above.One caution from xcl, if anyone tries shrinking the programs: xcl's compact form (one copy of each distinct block, xcl#1315/#1316) brings
CS_ScreenProbes_ActivateProbesdown from 29.75 MB to 1.05 MB of DXIL. But on an RX 7800 XT, forcing it on 18 sampled programs raised DXIL from 5.29 to 17.03 MB and driver compile time from 186.5 s to over 1,152 s (as quoted in xcl#1316). So the form only helps for the few huge programs. Forced everywhere it made programs bigger and compiles slower, which is why xcl applies it only above a size threshold (compact_wanted, 20,000+ instructions).A follow-on risk, unconfirmed here: xcl#2512 (RX 6700 XT, Windows) found that on AMD the driver's cached pipeline blob is a small stub pointing into the driver's own shader cache. Stubs written by a run that later crashed or was killed removed the device (
0x887A0006) when a later run handed them back, instead of being refused. Without them, the same pipelines came from the driver's cache in milliseconds. VIctory's library is the same kind of thing on AMD ("about 140 bytes per pipeline",pipeline/library.rs:25), and it is saved every 20 s during a run (SAVE_EVERY,:306-313). So a run that ends in this fault could leave entries that a following run trips on. If anyone sees a device removal early in the run after one of these crashes, moving the library out of the cache folder would tell.AI-assisted (Claude Code, Claude Opus 5.5 read the threads and the #3601 log).
Imported from Marvisak/VIctory. Originally posted by Bonky00 on 2026-11-29T23:27:50Z.
Confirming #2124 on a second host, and three things that may narrow it.
Host: RX 9070 XT 16 GB (Navi 48, RDNA4), Adrenalin 32.0.32029.2010, Windows 11 26300, i5-9600KF (6 cores / 6 threads, no SMT), 64 GB DDR4-2666.
Tree:
myokex/victory-amd@vi-xtx5d058ff(a fork ofavatarmanz/VIctory-7900XTX0a435665, now 404). Diag build,--console series-x,-Safe.1.
VICTORY_SHADER_OPTchanges the outcome, and I can't find it reported anywhereWith the default (63, all clean-up passes) the init-time crash reproduces 4 of 4 times at
amdxc64.dll+0x861b9f/+0x957eba, throughD3D12Core->d3d12!CreatePipelineState.With
VICTORY_SHADER_OPT=0("no passes: the module as the lowering made it") the init crash is gone, andvictory warmshows the compiler is both far less crash-prone and 13x faster per pipeline on the same 1,976 pipelines:A GitHub search for
SHADER_OPTin this repo returns nothing, so this may not be reported yet. Two readings, both actionable: either one of the six passes emits DXILamdxc64cannot cope with (which is what that switch's comment says it exists to tell apart), or the passes simply produce work AMD's compiler is slow on. Either wayopt=0is a free workaround here, because the passes are a net loss on this driver anyway.2.
VICTORY_PIPELINE_WORKERS=1alone does not give one workerThis is for the "one thread avoids it" finding. In this tree
make.rs:421spawnsworkers + screens, wherescreens = SCREEN_WORKERS (2)wheneverscreens_first()is true, i.e. whenscreen_budget()(VICTORY_SCREEN_WAIT_MS, default 10000) is not zero:So
VICTORY_PIPELINE_WORKERS=1still runs 3 concurrent compilers. One thread needsVICTORY_PIPELINE_WORKERS=1andVICTORY_SCREEN_WAIT_MS=0. Reporting it because an earlier "one worker didn't help" result here was a false negative for exactly this reason.With that pair the crash does go away: the run reaches the point where the player takes control (no exception, no device removal)
3. With
opt=0a second, different fault site appearsAfter the init crash is fixed, runs die ~3.5 minutes into the world, reproducibly:
Different offset, and a null dereference rather than the wild read at
+0x861b9f, so it looks like a second bug rather than the first moving. It is one of the 5 pipelineswarmrecords inwarm-bad.txt;warmsurvives them because it compiles in child processes and the runtime cannot.VICTORY_SKIP_PIPELINESdoes not help, and cannot:pipeline::is_skippedis consulted only indraw.rs(1336, 2611, 3713), i.e. at draw time, never beforeCreatePipelineState.The trade-off, which is why I think #3292 is the real fix
opt+0x861b9f)+0x7380f8)VICTORY_PIPELINE_WAIT_MS=5000With one thread,
dropped N/frame without a host pipeline: being madesits at 5,613/frame and only ~33 draws reach the card. Raising the per-frame wait budget drains the queue (503-1,744 dropped) but the frame becomes 5.2 s, so nothing in between works either.What argues for #3292:
victory warm --used --jobs 6compiles the same kind of work in child processes and built 284 pipelines in 8 s with 0 ending their process, median 2.5 ms each. Parallel compilation is safe when each compile is isolated - so the answer looks like isolation at runtime rather than fewer threads.Separately: the in-world floor here is memory bandwidth, not the compiler
Probably its own issue. At 3,246-4,382 draws/frame: 18,006-22,442 MB of refreshes per frame, GPU 1-13% busy, 1,450-1,994 ms of user CPU per frame across all threads. On DDR4-2666 dual channel (~30 GB/s) that arithmetic is the 495-788 ms frame.
VICTORY_SEND_CHANGED=1cut refreshes only 22,442 -> 18,006 MB (-20%), not the ~150x I hoped for from the "10,767 MB unchanged" watch figure - that number is bytes compared, not bytes sent. Noting it so nobody repeats the same wrong inference.