RDNA4: the AMD shader compiler crashes (amdxc64+0x861b9f) when pipelines compile on several threads; one thread avoids it #2124

Open
opened 2026-11-26 04:55:29 +00:00 by github-bot · 4 comments
Owner

@⁠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-x unless noted, 42 Enter presses over 1.83-7.31 s.

What happens: the title dies with an access violation inside the driver, not in our code:

VIctory: first-chance exception 0xc0000005 at amdxc64.dll+0x861b9f (read 0x8: nothing mapped there)

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:

build outcome
main @⁠940d32f crash at amdxc64+0x861b9f (twice; different last shader each time)
main + #1762 crash at the same offset
fxceless/victory-fork @⁠310c6eb crash at the same offset, earlier (before the world)

The shader being compiled when it dies is not constant: the last translated compute program was e79dd4bd900b4200 in one run and 1e4947eada3d9ee3 in the next, so it is the act of compiling, not one program.

The variable that matters: pipeline workers. crates/victory-gpu/src/pipeline/make.rs spawns available_parallelism/2 clamped to 2..8 workers (6 here). With a local patch that makes that count an env var and VICTORY_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 the let n = ... in queue().

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:

VIctory: first-chance exception 0xc0000005 at amdxc64.dll+0x861b9f (read 0x8: nothing mapped there)

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:

  • the crash is inside the driver's compiler (amdxc64.dll+0x861b9f), not a device removal and not a DRED page fault;
  • it happens on main @⁠940d32f, on main + #1762, and on fxceless/victory-fork @⁠310c6eb - three trees, same offset;
  • the shader being compiled differs between runs (e79dd4bd900b4200, 1e4947eada3d9ee3), so it is not one program;
  • a run can get as far as 1,710-9,159 draws/frame and the credits/prologue cutscene before it dies.

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_PIPELINES with 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:35 UTC · [original](https://github.com/Marvisak/VIctory/issues/2124) 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-x` unless noted, 42 `Enter` presses over 1.83-7.31 s. **What happens:** the title dies with an access violation **inside the driver**, not in our code: ``` VIctory: first-chance exception 0xc0000005 at amdxc64.dll+0x861b9f (read 0x8: nothing mapped there) ``` 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: | build | outcome | | --- | --- | | `main` @⁠940d32f | crash at amdxc64+0x861b9f (twice; different last shader each time) | | `main` + #1762 | crash at the same offset | | `fxceless/victory-fork` @⁠310c6eb | crash at the same offset, earlier (before the world) | The shader being compiled when it dies is not constant: the last translated compute program was `e79dd4bd900b4200` in one run and `1e4947eada3d9ee3` in the next, so it is the act of compiling, not one program. **The variable that matters: pipeline workers.** `crates/victory-gpu/src/pipeline/make.rs` spawns `available_parallelism/2` clamped to 2..8 workers (6 here). With a local patch that makes that count an env var and `VICTORY_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 the `let n = ...` in `queue()`. 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: ``` VIctory: first-chance exception 0xc0000005 at amdxc64.dll+0x861b9f (read 0x8: nothing mapped there) ``` 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: - the crash is inside the driver's compiler (`amdxc64.dll+0x861b9f`), not a device removal and not a DRED page fault; - it happens on `main` @⁠940d32f, on `main` + #1762, and on `fxceless/victory-fork` @⁠310c6eb - three trees, same offset; - the shader being compiled differs between runs (`e79dd4bd900b4200`, `1e4947eada3d9ee3`), so it is not one program; - a run can get as far as 1,710-9,159 draws/frame and the credits/prologue cutscene before it dies. 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_PIPELINES` with 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:55:29 +00:00
Author
Owner

@⁠rpmaster2 on GitHub · 2026-11-25 05:53 UTC · original

A reproducer without running the title, which should make this much cheaper to bisect.

victory translate --pipelines

on main @⁠940d32f, diag build, no game process involved, dies part-way through shaders.rpf:

F:\...\shaders.rpf: 22917 of 26503 containers (86%), 741 s

and then the process is gone - no victory error line, no summary, exit status 1. That is the same silent exit as the in-game fault at amdxc64.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 bisect between the last known-good tree and 940d32f can run on this alone. The last known-good tree on my host is ffe310e (yesterday's main), which ran the game for 3-5 minutes at a time across a dozen runs with no amdxc64 fault 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 05:53 UTC · [original](https://github.com/Marvisak/VIctory/issues/2124#issuecomment-7154244943) A reproducer without running the title, which should make this much cheaper to bisect. ``` victory translate --pipelines ``` on `main` @⁠940d32f, diag build, no game process involved, dies part-way through `shaders.rpf`: ``` F:\...\shaders.rpf: 22917 of 26503 containers (86%), 741 s ``` and then the process is gone - no `victory` error line, no summary, exit status 1. That is the same silent exit as the in-game fault at `amdxc64.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 bisect` between the last known-good tree and `940d32f` can run on this alone. The last known-good tree on my host is `ffe310e` (yesterday's `main`), which ran the game for 3-5 minutes at a time across a dozen runs with no `amdxc64` fault 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.
Author
Owner

@⁠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 parent 4f57f46 ("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 diagnostics at each step, one translate per step. It converged in 8 steps.

In-game confirmation, same host, same save, 42 Enter presses, 300 s:

build outcome
c75fdba 0xc0000005 at amdxc64.dll+0x861b9f during startup, last line a host compute pipeline, max 14 draws/frame
4f57f46 (parent) no exception in 300 s, max 14 draws/frame, black front end, no crash

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: new crates/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 c75fdba as 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.

**@⁠rpmaster2** on GitHub · 2026-11-25 07:28 UTC · [original](https://github.com/Marvisak/VIctory/issues/2124#issuecomment-7155896399) 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 parent `4f57f46` ("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 diagnostics` at each step, one translate per step. It converged in 8 steps. **In-game confirmation, same host, same save, 42 `Enter` presses, 300 s:** | build | outcome | | --- | --- | | `c75fdba` | `0xc0000005 at amdxc64.dll+0x861b9f` during startup, last line a host compute pipeline, max 14 draws/frame | | `4f57f46` (parent) | no exception in 300 s, max 14 draws/frame, black front end, no crash | 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`: new `crates/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 `c75fdba` as 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.
Author
Owner

@⁠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, read 0x8, inside the driver's compiler during pipeline creation.

  • The correction in the body matters: one pipeline worker only delays the crash, so #2250 (VICTORY_PIPELINE_THREADS) is a diagnostic knob, not the fix.
  • The bisect with the offline reproducer (victory translate --pipelines) lands on c75fdba ("views the shaders pick from the heap…"); its parent 4f57f46 is 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 --pipelines finished with no amdxc64.dll crash, and an in-game run built 1,271 pipelines without one. Your offline reproducer on main + #2122 would be a useful third data point. Note that main (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

**@⁠Marvisak** on GitHub · 2026-11-25 12:53 UTC · [original](https://github.com/Marvisak/VIctory/issues/2124#issuecomment-7163002660) · edited 2026-11-25 15:48 UTC <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-25T14:51:48Z at=2026-11-25T15:51:00Z --> 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`, read `0x8`, inside the driver's compiler during pipeline creation. - The correction in the body matters: one pipeline worker only delays the crash, so #2250 (`VICTORY_PIPELINE_THREADS`) is a diagnostic knob, not the fix. - The bisect with the offline reproducer (`victory translate --pipelines`) lands on `c75fdba` ("views the shaders pick from the heap…"); its parent `4f57f46` is 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 --pipelines` finished with no `amdxc64.dll` crash, and an in-game run built 1,271 pipelines without one. Your offline reproducer on `main` + #2122 would be a useful third data point. Note that `main` (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](https://claude.ai/code)_
Author
Owner

@⁠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:

  1. One vectored exception handler for the process, installed when the first pipeline is made.
  2. Pipelines are made on named workers, with the pipeline's name kept in a thread-local.
  3. The handler claims an exception only if it is an access violation, the faulting address is in the first 64 KiB (a compiler reading through a bad pointer), and a pipeline is being made on that thread. Anything else goes on to the default handler.
  4. On a claim it writes the pipeline's name to a skip file, logs it, and never returns into the compiler: that thread parks for good. The process continues, and the draws and dispatches that need the lost pipeline are dropped.
  5. The worker supervisor sees the worker gone, marks its pipeline unmade, and starts a replacement, so the rest of the work still gets done.
  6. Pipelines are named by a hash of the translated shader code, the root signature and the state, so a name is stable: the next run never makes a name from the skip file.
  7. A watchdog for compiles that never end notes them the same way and suspends their threads (a few programs also take GiBs while never finishing).

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.

**@⁠rpmaster2** on GitHub · 2026-11-25 14:51 UTC · [original](https://github.com/Marvisak/VIctory/issues/2124#issuecomment-7165932025) 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: 1. One vectored exception handler for the process, installed when the first pipeline is made. 2. Pipelines are made on named workers, with the pipeline's name kept in a thread-local. 3. The handler claims an exception only if it is an access violation, the faulting address is in the first 64 KiB (a compiler reading through a bad pointer), and a pipeline is being made on that thread. Anything else goes on to the default handler. 4. On a claim it writes the pipeline's name to a skip file, logs it, and never returns into the compiler: that thread parks for good. The process continues, and the draws and dispatches that need the lost pipeline are dropped. 5. The worker supervisor sees the worker gone, marks its pipeline unmade, and starts a replacement, so the rest of the work still gets done. 6. Pipelines are named by a hash of the translated shader code, the root signature and the state, so a name is stable: the next run never makes a name from the skip file. 7. A watchdog for compiles that never end notes them the same way and suspends their threads (a few programs also take GiBs while never finishing). 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.
This discussion has been locked. Commenting is limited to contributors.
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/Marvisak--VIctory#2124
No description provided.