main tip: jumps_to_outer_loop_heads_are_structured kills the whole lib test binary on Wine + RDNA3 (exit status 5), bisected to b8b1f49 #1246

Open
opened 2026-11-26 04:48:16 +00:00 by github-bot · 9 comments
Owner

@⁠SlopTart on GitHub · 2026-11-24 13:41 UTC · original

What

Since b8b1f49 ("Recompiler: jumps to outer loop heads and into loops are structured", direct on main), the test gpu::recomp::tests::jumps_to_outer_loop_heads_are_structured kills the entire lib test process on Wine + RADV/RDNA3 instead of passing or failing. The whole --lib suite dies at that test; everything scheduled after it simply never runs.

Bisect (plain main, no PR merges)

  • 9a272d4 (grandparent): full lib suite completes, 700 passed / 4 failed (the 4 are my rig's standing Wine-lane set, unrelated).
  • b8b1f49: process aborts. Reproduced 5+ times across three unrelated PR lanes merged onto this main, plus 2/2 with --no-capture, plus 3/3 running the test completely solo:
test gpu::recomp::tests::jumps_to_outer_loop_heads_are_structured ... warn: CreateDXGIFactory2: Ignoring flags
  process didn't exit successfully: .../xcl-b123399dd1a4eca3.exe 'gpu::recomp::tests::jumps_to_outer_loop_heads_are_structured' --test-threads=1 (exit status: 5)

No panic, no assertion, no backtrace - the Wine process exits with status 5. In full-suite logs the death lands right after this shader compiles: cs 77fbcdd16f57bc1f: 6272 B, format dxil (last of five CS compiles in that test; the four before it also appear: 1ee4b7c7a64bfb8c, 2d257fd6ea9d5cf5, 4fd221ff6e98208e, 822ffe8b5dba8c1b).

gpu::tiling and every test before it in list order are exonerated: solo tiling module passes 3/3 on b8b1f49, and the solo repro above is minimal.

Machine / environment

RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1 (ignore_shared_fence), Rust cross x86_64-pc-windows-gnu, release profile, XCL_NETWORK=0, DXC pinned via XCL_DXC_DIR. Counts only, no game data. My Linux rows: #42 / #718.

Note

Native Windows/NVIDIA behavior of this commit is not measured by me. But on the Wine + RDNA3 axis this head is a hard stop for the whole test suite, and since CI runs only the description-template check, nothing upstream notices.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

**@⁠SlopTart** on GitHub · 2026-11-24 13:41 UTC · [original](https://github.com/xcl-dev/xcl/issues/1246) ## What Since `b8b1f49` ("Recompiler: jumps to outer loop heads and into loops are structured", direct on main), the test `gpu::recomp::tests::jumps_to_outer_loop_heads_are_structured` kills the entire lib test process on Wine + RADV/RDNA3 instead of passing or failing. The whole `--lib` suite dies at that test; everything scheduled after it simply never runs. ## Bisect (plain main, no PR merges) - `9a272d4` (grandparent): full lib suite completes, 700 passed / 4 failed (the 4 are my rig's standing Wine-lane set, unrelated). - `b8b1f49`: process aborts. Reproduced 5+ times across three unrelated PR lanes merged onto this main, plus 2/2 with `--no-capture`, plus 3/3 running the test completely solo: ``` test gpu::recomp::tests::jumps_to_outer_loop_heads_are_structured ... warn: CreateDXGIFactory2: Ignoring flags process didn't exit successfully: .../xcl-b123399dd1a4eca3.exe 'gpu::recomp::tests::jumps_to_outer_loop_heads_are_structured' --test-threads=1 (exit status: 5) ``` No panic, no assertion, no backtrace - the Wine process exits with status 5. In full-suite logs the death lands right after this shader compiles: `cs 77fbcdd16f57bc1f: 6272 B, format dxil` (last of five CS compiles in that test; the four before it also appear: `1ee4b7c7a64bfb8c`, `2d257fd6ea9d5cf5`, `4fd221ff6e98208e`, `822ffe8b5dba8c1b`). `gpu::tiling` and every test before it in list order are exonerated: solo tiling module passes 3/3 on `b8b1f49`, and the solo repro above is minimal. ## Machine / environment RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1 (`ignore_shared_fence`), Rust cross `x86_64-pc-windows-gnu`, release profile, `XCL_NETWORK=0`, DXC pinned via `XCL_DXC_DIR`. Counts only, no game data. My Linux rows: #42 / #718. ## Note Native Windows/NVIDIA behavior of this commit is not measured by me. But on the Wine + RDNA3 axis this head is a hard stop for the whole test suite, and since CI runs only the description-template check, nothing upstream notices. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:48:16 +00:00
Author
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-24 13:50 UTC · original

I checked the translation side on the CPU, without a GPU. Conclusion: the HLSL this test emits computes the right result and ends quickly, so the abort is more likely in the host (vkd3d-proton / RADV) than in the structurer.

How: I built gpu::rdna2 + gpu::recomp from main 930e8b4 on their own (macOS; DXC, D3D12 and the runner stubbed out). I ran the test's program generator with the same xorshift seed, drawing the four initial SGPRs per round as a GPU run does. For every round I translated both forms. I compiled the body of each main() as C++, one lane, with select / lanebit / io.Load / res.Store shimmed, and ran it on the round's initial state with s20 = 60 and exec all ones. Separately, a small interpreter ran the round's RDNA2 binary directly from the GFX10 encodings.

Results for all 120 rounds:

  • 120 / 120 structured, with 70 jumps into a loop, as the test counts them.
  • Structured and dispatcher forms: identical final s0–s23, scc, v1–v3 in all 120.
  • Both match the reference run of the binary in 118 rounds. In the other 2, the only difference is s20. Those programs have no loop, so they never touch s20 and it is not stored (an artifact of my harness, not a test failure).
  • Every loop in the 120 main() bodies (855 of them) starts with the xcl_budget check. The most any round used was 91 of the 65 536 iterations.

If the log's compile order holds (two compiles per round, structured first), the 5th CS is round 2's structured form. Its body nests 7 deep, with 2 skip flags and 1 continue. Its result matches the dispatcher and the reference too. So a test that skipped this one program would only hide whatever makes vkd3d-proton / ACO bring the process down on it. An ACO or vkd3d log for that pipeline (e.g. RADV_DEBUG=hang or VKD3D_DEBUG=trace on the solo run) would show which.

Written with Claude Code (Claude Opus 5.5). It built the harness and ran the checks above.

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-24 13:50 UTC · [original](https://github.com/xcl-dev/xcl/issues/1246#issuecomment-7133410300) I checked the translation side on the CPU, without a GPU. Conclusion: the HLSL this test emits computes the right result and ends quickly, so the abort is more likely in the host (vkd3d-proton / RADV) than in the structurer. **How:** I built `gpu::rdna2` + `gpu::recomp` from main `930e8b4` on their own (macOS; DXC, D3D12 and the runner stubbed out). I ran the test's program generator with the same xorshift seed, drawing the four initial SGPRs per round as a GPU run does. For every round I translated both forms. I compiled the body of each `main()` as C++, one lane, with `select` / `lanebit` / `io.Load` / `res.Store` shimmed, and ran it on the round's initial state with `s20 = 60` and exec all ones. Separately, a small interpreter ran the round's RDNA2 binary directly from the GFX10 encodings. **Results for all 120 rounds:** - 120 / 120 structured, with 70 jumps into a loop, as the test counts them. - Structured and dispatcher forms: identical final `s0`–`s23`, `scc`, `v1`–`v3` in all 120. - Both match the reference run of the binary in 118 rounds. In the other 2, the only difference is `s20`. Those programs have no loop, so they never touch `s20` and it is not stored (an artifact of my harness, not a test failure). - Every loop in the 120 `main()` bodies (855 of them) starts with the `xcl_budget` check. The most any round used was 91 of the 65 536 iterations. If the log's compile order holds (two compiles per round, structured first), the 5th CS is round 2's structured form. Its body nests 7 deep, with 2 skip flags and 1 `continue`. Its result matches the dispatcher and the reference too. So a test that skipped this one program would only hide whatever makes vkd3d-proton / ACO bring the process down on it. An ACO or vkd3d log for that pipeline (e.g. `RADV_DEBUG=hang` or `VKD3D_DEBUG=trace` on the solo run) would show which. Written with Claude Code (Claude Opus 5.5). It built the harness and ran the checks above.
Author
Owner

@⁠Diskuss on GitHub · 2026-11-24 13:51 UTC · original

Native Windows data point: AMD Radeon RX 9070 XT (RDNA4), Adrenalin driver 32.0.32015.7029; Ryzen 7 5700X3D; 32 GB RAM; Windows 11 Pro build 26300.9974; Rust 1.100.0 x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug build.

Tested origin/main at 930e8b49c1c2ec683d22c724a398b39111cd0e56 (b8b1f49 is an ancestor).

  • cargo test -p xcl --lib jumps_to_outer_loop_heads_are_structured -- --test-threads=1, run 10 times: 10/10 passed (1 passed, 0 failed each), exit code 0 every time.
  • cargo test -p xcl --lib --no-fail-fast -- --test-threads=4, run once: 707 passed, 0 failed, 21 ignored, exit code 0. No panic, abort or abnormal exit code (no 0xc0000005, no stack overflow).

The crash does not reproduce on native Windows with AMD Adrenalin. That points to Wine/RADV (or the Wine-specific stack) rather than the recompiler change itself. I did not test Wine or Linux.

AI use: Report written by Claude Code (Claude Sonnet 5.5) from a real run on this machine.

**@⁠Diskuss** on GitHub · 2026-11-24 13:51 UTC · [original](https://github.com/xcl-dev/xcl/issues/1246#issuecomment-7133445092) Native Windows data point: AMD Radeon RX 9070 XT (RDNA4), Adrenalin driver 32.0.32015.7029; Ryzen 7 5700X3D; 32 GB RAM; Windows 11 Pro build 26300.9974; Rust 1.100.0 x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug build. Tested origin/main at `930e8b49c1c2ec683d22c724a398b39111cd0e56` (`b8b1f49` is an ancestor). - `cargo test -p xcl --lib jumps_to_outer_loop_heads_are_structured -- --test-threads=1`, run 10 times: 10/10 passed (1 passed, 0 failed each), exit code 0 every time. - `cargo test -p xcl --lib --no-fail-fast -- --test-threads=4`, run once: 707 passed, 0 failed, 21 ignored, exit code 0. No panic, abort or abnormal exit code (no 0xc0000005, no stack overflow). The crash does not reproduce on native Windows with AMD Adrenalin. That points to Wine/RADV (or the Wine-specific stack) rather than the recompiler change itself. I did not test Wine or Linux. AI use: Report written by Claude Code (Claude Sonnet 5.5) from a real run on this machine.
Author
Owner

@⁠SlopTart on GitHub · 2026-11-24 14:09 UTC · original

Follow-up from the RDNA3/Wine rig: the traces requested are in, and they name the layer.

RADV_DEBUG=hang (solo run): no GPU hang, no context reset, nothing from the hang detector. The driver side stays clean - the process just dies.

WINEDEBUG=err+all,seh+all: the exit-status-5 is a swallowed segfault:

Unhandled exception: page fault on read access to 0x0000000000000118 in 64-bit code (0x006ffffca2b325).
0x006ffffca2b325 d3d12core+0x1ab325: movq 0x118(%rdi), %rsi   (rdi = NULL)

Symbolized backtrace (DWARF from our own vkd3d-proton v3.1 build; the installed d3d12core.dll sha256-matches that build, d403458d...):

d3d12_device_CreateComputePipelineState
  d3d12_pipeline_state_create
    vkd3d_compile_shader_stage
      vkd3d_shader_compile_dxil
        dxil_spv_converter_run
          CFGStructurizer::run
            CFGStructurizer::rewrite_invalid_real_loop_breaks
              CFGStructurizer::recompute_cfg
                CFGNode::recompute_immediate_post_dominator
                  CFGNode::find_common_post_dominator   <- null deref

So the fault is inside the embedded dxil-spirv (vkd3d-proton v3.1's DXIL-to-SPIRV translator), in the CFG structurizer's post-dominator recomputation, on the pipeline-creation path. Not RADV, not ACO, not Wine's SEH plumbing, and consistent with the interpreter analysis above: the structured program's semantics are fine, it is the CFG shape that dxil-spirv's rewrite_invalid_real_loop_breaks path mishandles on a null CFGNode.

That fits Diskuss's 10/10 clean native runs too: native Windows uses the real d3d12 runtime, no dxil-spirv involvement.

Caveats stated honestly: our vkd3d-proton is v3.1 with XCL's local patches (shared-fence config work), so one open question is whether a newer vendored dxil-spirv already handles this CFG shape. On this rig the crash is deterministic (3/3 solo), so a vkd3d-proton/dxil-spirv bump is easy to A/B against the same test.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, release profile. Counts only, no game data.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

**@⁠SlopTart** on GitHub · 2026-11-24 14:09 UTC · [original](https://github.com/xcl-dev/xcl/issues/1246#issuecomment-7133924257) Follow-up from the RDNA3/Wine rig: the traces requested are in, and they name the layer. **RADV_DEBUG=hang (solo run):** no GPU hang, no context reset, nothing from the hang detector. The driver side stays clean - the process just dies. **WINEDEBUG=err+all,seh+all:** the exit-status-5 is a swallowed segfault: ``` Unhandled exception: page fault on read access to 0x0000000000000118 in 64-bit code (0x006ffffca2b325). 0x006ffffca2b325 d3d12core+0x1ab325: movq 0x118(%rdi), %rsi (rdi = NULL) ``` **Symbolized backtrace** (DWARF from our own vkd3d-proton v3.1 build; the installed `d3d12core.dll` sha256-matches that build, `d403458d...`): ``` d3d12_device_CreateComputePipelineState d3d12_pipeline_state_create vkd3d_compile_shader_stage vkd3d_shader_compile_dxil dxil_spv_converter_run CFGStructurizer::run CFGStructurizer::rewrite_invalid_real_loop_breaks CFGStructurizer::recompute_cfg CFGNode::recompute_immediate_post_dominator CFGNode::find_common_post_dominator <- null deref ``` So the fault is inside the embedded **dxil-spirv** (vkd3d-proton v3.1's DXIL-to-SPIRV translator), in the CFG structurizer's post-dominator recomputation, on the pipeline-creation path. Not RADV, not ACO, not Wine's SEH plumbing, and consistent with the interpreter analysis above: the structured program's semantics are fine, it is the CFG shape that dxil-spirv's `rewrite_invalid_real_loop_breaks` path mishandles on a null CFGNode. That fits Diskuss's 10/10 clean native runs too: native Windows uses the real d3d12 runtime, no dxil-spirv involvement. Caveats stated honestly: our vkd3d-proton is v3.1 with XCL's local patches (shared-fence config work), so one open question is whether a newer vendored dxil-spirv already handles this CFG shape. On this rig the crash is deterministic (3/3 solo), so a vkd3d-proton/dxil-spirv bump is easy to A/B against the same test. Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, release profile. Counts only, no game data. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 14:17 UTC · original

Data point from native Windows (not Wine): jumps_to_outer_loop_heads_are_structured passes solo and the full --lib d3d12x/recomp filters are clean on main 930e8b4, RTX 3060 Ti, DXC 1.8.2502.11. So the exit-status-5 death looks specific to the Wine/RADV lane rather than the shader itself — consistent with your bisect pointing at b8b1f49 only under Wine.

**@⁠DavidM1911** on GitHub · 2026-11-24 14:17 UTC · [original](https://github.com/xcl-dev/xcl/issues/1246#issuecomment-7134147840) Data point from native Windows (not Wine): `jumps_to_outer_loop_heads_are_structured` passes solo and the full `--lib d3d12x`/`recomp` filters are clean on `main` `930e8b4`, RTX 3060 Ti, DXC 1.8.2502.11. So the exit-status-5 death looks specific to the Wine/RADV lane rather than the shader itself — consistent with your bisect pointing at `b8b1f49` only under Wine.
Author
Owner

@⁠SlopTart on GitHub · 2026-11-24 14:36 UTC · original

Fix-recipe datapoint: the crash disappears when only the vkd3d-proton build changes.

A/B on the same b8b1f49 checkout, same rig, same DXC, nothing else touched:

  • vkd3d-proton v3.1 (XCL-patched, d3d12core.dll sha256 d403458d...): solo gpu::recomp::tests::jumps_to_outer_loop_heads_are_structured 3/3 exit status 5 (the original repro above).
  • vkd3d-proton master ec207194 (whose tip commit is literally "dxil-spirv: Update submodule"; cross-built with build-win64.txt and -Db_ndebug=true, same XCL patch, only d3d12.dll + d3d12core.dll swapped into the prefix): same solo test 3/3 ok (7.15s / 4.34s / 4.31s).
  • Control: swapping the v3.1 DLL pair back onto the same test binary brings back exit status 5, 2/2.

So the null deref in CFGNode::find_common_post_dominator from our symbolized trace is already fixed by the newer vendored dxil-spirv on vkd3d-proton master, and anyone hitting this under Wine can dodge it by building current vkd3d-proton master with the XCL vtable patch. No driver, Mesa, or xcl change needed to dodge it.

If useful I can bisect the dxil-spirv submodule between v3.1's pinned commit and 199cb207 to name the exact upstream fix, or verify a future pinned bump on this rig.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile. My Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

**@⁠SlopTart** on GitHub · 2026-11-24 14:36 UTC · [original](https://github.com/xcl-dev/xcl/issues/1246#issuecomment-7134662363) Fix-recipe datapoint: the crash disappears when only the vkd3d-proton build changes. A/B on the same `b8b1f49` checkout, same rig, same DXC, nothing else touched: - vkd3d-proton v3.1 (XCL-patched, `d3d12core.dll` sha256 `d403458d...`): solo `gpu::recomp::tests::jumps_to_outer_loop_heads_are_structured` 3/3 exit status 5 (the original repro above). - vkd3d-proton master `ec207194` (whose tip commit is literally "dxil-spirv: Update submodule"; cross-built with `build-win64.txt` and `-Db_ndebug=true`, same XCL patch, only `d3d12.dll` + `d3d12core.dll` swapped into the prefix): same solo test **3/3 ok** (7.15s / 4.34s / 4.31s). - Control: swapping the v3.1 DLL pair back onto the same test binary brings back exit status 5, 2/2. So the null deref in `CFGNode::find_common_post_dominator` from our symbolized trace is already fixed by the newer vendored dxil-spirv on vkd3d-proton master, and anyone hitting this under Wine can dodge it by building current vkd3d-proton master with the XCL vtable patch. No driver, Mesa, or xcl change needed to dodge it. If useful I can bisect the dxil-spirv submodule between v3.1's pinned commit and `199cb207` to name the exact upstream fix, or verify a future pinned bump on this rig. Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), Rust cross `x86_64-pc-windows-gnu`, `XCL_NETWORK=0`, release profile. My Linux rows: #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Author
Owner

@⁠SlopTart on GitHub · 2026-11-24 15:39 UTC · original

Bisected the crash to an exact upstream dxil-spirv commit, and hit a repro pitfall worth sharing.

Bisect result. Held vkd3d-proton at v3.1 + the XCL patch and swapped only the vendored subprojects/dxil-spirv between the v3.1 pin (8b48f0e0) and master's current pin (7c048638), 104 commits. Per commit: ninja rebuild, DLL swap, solo run of gpu::recomp::tests::jumps_to_outer_loop_heads_are_structured, cache cleared before every run.

  • Last bad: 2d0df0ce "Add a way to exercise running the resulting SPIR-V through e.g. Mesa." - exit 5, 3/3
  • First good: 71967a38 "Rewrite the structurizer from scratch." (Hans-Kristian Arntzen, 2026-10-13) - pass, 3/3

The fix is only 5 commits past the v3.1 pin. That matches my earlier symbolized stack exactly: the fault was CFGStructurizer::rewrite_invalid_real_loop_breaks -> CFGNode::find_common_post_dominator reading null+0x118, and the rewrite replaces that machinery wholesale. Any vendored dxil-spirv at or after 71967a38 should clear this crash on Wine; a pinned bump is the cleanest remedy for affected builds.

The pitfall. vkd3d-proton's pipeline disk cache is vkd3d-proton.cache, opened relative to the test's cwd (with cargo, that is the crate dir, not the workspace root). One successful compile of the crashing pipeline writes it; every later run then hits the cache and skips dxil-spirv entirely, so an A/B DLL swap looks green no matter which build is installed. The tell is timing: cache-hit runs finished in a flat 4.1-4.3 s, real compiles took 6.1-7.0 s, and crashing runs never write the entry. This produced a convincing fake "the crash vanished" for about two hours on this rig until I started deleting the cache file between trials. Cold-cache re-measurement after the fact: v3.1 pin exit 5 four times (original DLL and fresh rebuilds alike), master pin pass twice.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, XCL_NETWORK=0, release profile. Counts only, no game data. See my Linux rows in #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

**@⁠SlopTart** on GitHub · 2026-11-24 15:39 UTC · [original](https://github.com/xcl-dev/xcl/issues/1246#issuecomment-7136399831) Bisected the crash to an exact upstream dxil-spirv commit, and hit a repro pitfall worth sharing. **Bisect result.** Held vkd3d-proton at v3.1 + the XCL patch and swapped only the vendored `subprojects/dxil-spirv` between the v3.1 pin (`8b48f0e0`) and master's current pin (`7c048638`), 104 commits. Per commit: ninja rebuild, DLL swap, solo run of `gpu::recomp::tests::jumps_to_outer_loop_heads_are_structured`, cache cleared before every run. - Last bad: `2d0df0ce` "Add a way to exercise running the resulting SPIR-V through e.g. Mesa." - exit 5, 3/3 - First good: `71967a38` **"Rewrite the structurizer from scratch."** (Hans-Kristian Arntzen, 2026-10-13) - pass, 3/3 The fix is only 5 commits past the v3.1 pin. That matches my earlier symbolized stack exactly: the fault was `CFGStructurizer::rewrite_invalid_real_loop_breaks` -> `CFGNode::find_common_post_dominator` reading `null+0x118`, and the rewrite replaces that machinery wholesale. Any vendored dxil-spirv at or after `71967a38` should clear this crash on Wine; a pinned bump is the cleanest remedy for affected builds. **The pitfall.** vkd3d-proton's pipeline disk cache is `vkd3d-proton.cache`, opened relative to the test's cwd (with cargo, that is the crate dir, not the workspace root). One successful compile of the crashing pipeline writes it; every later run then hits the cache and skips dxil-spirv entirely, so an A/B DLL swap looks green no matter which build is installed. The tell is timing: cache-hit runs finished in a flat 4.1-4.3 s, real compiles took 6.1-7.0 s, and crashing runs never write the entry. This produced a convincing fake "the crash vanished" for about two hours on this rig until I started deleting the cache file between trials. Cold-cache re-measurement after the fact: v3.1 pin exit 5 four times (original DLL and fresh rebuilds alike), master pin pass twice. Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, `XCL_NETWORK=0`, release profile. Counts only, no game data. See my Linux rows in #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Author
Owner

@⁠crastinator on GitHub · 2026-11-24 14:04 UTC · original · edited 2026-11-24 19:20 UTC

Where it dies: inside vkd3d-proton's DXIL → SPIR-V conversion, in dxil-spirv's CFG structurizer. vkd3d-proton v3.1's own dxil-spirv reproduces it, and the dxil-spirv pinned by #775 does not.

Tested on main 930e8b4

  • AMD Radeon RX 6700 XT (RDNA2, RADV NAVI22, Mesa 26.3.1), Ryzen 7 5700X, Linux 7.3.5 (CachyOS). Proton Experimental 11.0-20261112's Wine, DXVK v3.1.1-209 dxgi, DXC 1.9.2609.5, VKD3D_CONFIG=ignore_shared_fence. Cross-built for x86_64-pc-windows-msvc (clang-cl / lld-link, xwin SDK), Rust 1.99.1, debug.
  • vkd3d-proton v3.1 + #257's patch, built with -Db_ndebug=true (llvm-mingw 20261117):
    • v3.1's dxil-spirv (8b48f0e): the test alone fails 3/3, exit status 5, the same as yours. WINEDEBUG=+seh shows an access violation in d3d12core.dll. The DLL keeps its symbols, and the stack is:
      dxil_spv::CFGNode::find_common_post_dominator      d3d12core.dll+0x1fb4e2
      dxil_spv::CFGNode::recompute_immediate_post_dominator
      dxil_spv::CFGStructurizer::recompute_cfg
      dxil_spv::CFGStructurizer::rewrite_invalid_real_loop_breaks
      dxil_spv::CFGStructurizer::run
      dxil_spv_converter_run
      vkd3d_shader_compile_dxil
      vkd3d_compile_shader_stage
      d3d12_pipeline_state_create
      
      That is the rewrite_invalid_real_loop_breaks loop #775 describes for #611, now reached by the programs this test generates. It also fits @⁠tiagonogueiraa-bit's finding that the HLSL itself is fine, and with Windows passing.
    • dxil-spirv at 53aac418 (#775's build-vkd3d-proton.sh): the test alone passes 3/3 (about 7–9 s each). --lib --test-threads=1: 702 passed, 5 failed, 21 ignored. The 5 are the Wine-lane ones with open PRs: #530 ×2, #676, #890 ×2.
  • One thing #775 does not fix: in a parallel run (--lib --test-threads=4, 2/2 runs) this test fails with kernel dispatch: D3D12 device removed (0x80004005). 7 D3D12.X tests running next to it then fail (0x887A0005 / PoisonError): 3 in sparse, 3 in title_textures, and vram::d32s8_targets…. With --skip jumps_to_outer_loop_heads_are_structured, one parallel run had 7/7 of them passing. In the other, 3 failed (placed_title_textures_share_vram_and_preserve_pixels, transitions_apply_when_their_list_is_submitted, d32s8_targets…), which looks like the #718 flake. The kernel log has no amdgpu reset or timeout for these runs.

Not tested

  • Windows, NVIDIA. Which generated program trips the structurizer.

AI use

  • Claude Code (Claude Opus 5.5) ran the builds, tests and symbolization and wrote this; I checked it.

Update: the parallel device removal comes from another test. It isn't caused by this test itself.

  • The partner is hle::d3d12x::list_x::tests::write_buffer_immediate_on_open_existing_heap_visible_to_cpu. Running just those two tests together (--test-threads=2 --exact <both>) fails 3/3: this test gets kernel dispatch: D3D12 device removed after about 0.15 s. Pairing this test with every other list_x test, and with sparse, vram, real, bind, gpu::texture and gpu::uma, passes. Each of the two passes alone.

  • The trigger is the VirtualFree(mem, 0, MEM_RELEASE) at the end of write_buffer_immediate_…. That frees the memory it opened with OpenExistingHeapFromAddress, while this test's GPU work on the same device (vkd3d-proton hands back the one device per adapter) is still running. Local experiments, 3 runs each:

    • free removed: 3/3 pass
    • every D3D12 object the test made (lists, allocators, queues, fence, buffers, heap) dropped before the free: still 3/3 fail
    • a 500 ms sleep before the free: still 3/3 fail
    • the memory allocated without MEM_WRITE_WATCH: still 3/3 fail

    So it isn't a release that has not happened yet, and it isn't the write watch. Unmapping host memory that was imported (VK_EXT_external_memory_host, an amdgpu userptr on RADV) breaks work in flight on that device, even after the heap over it is gone. The kernel log shows no amdgpu reset. The device is not lost for good either: in a --test-threads=1 run, the D3D12.X tests after it pass.

  • With --skip write_buffer_immediate_on_open_existing_heap_visible_to_cpu, the full --lib --test-threads=4 run (4 runs) no longer shows the device removal or the 7-test cascade. Every run has the 5 known Wine-lane failures, and 2 of the 4 had one more failure I did not capture.

  • XCL's own UMA windows stay mapped for the life of the process, so this looks like a test-suite problem only. I have not checked the retail title.

A test-side fix would be to keep that test's 64 KiB mapped under Wine (util::under_wine(), as in 8fde77a), or for the whole process. I can open that as a test-only PR if that's the direction you want. The underlying behaviour is a Wine / vkd3d-proton / RADV matter.


Correction (2026-11-24, later): the parallel device removal above is a resource leak in the test itself, not a release that happened later than it should. #1520 (@⁠wileyGray) found it: the test's four transition barriers held clones of the resource inside ManuallyDrop, so the imported heap was never released when the test freed its memory. That's why dropping everything I could see did not help. With #1520 the pair passes 3/3 here and the 7-test cascade is gone (details on #1520). So the test-side workaround I offered above isn't needed.

**@⁠crastinator** on GitHub · 2026-11-24 14:04 UTC · [original](https://github.com/xcl-dev/xcl/issues/1246#issuecomment-7133793260) · edited 2026-11-24 19:20 UTC Where it dies: inside vkd3d-proton's DXIL → SPIR-V conversion, in dxil-spirv's CFG structurizer. vkd3d-proton v3.1's own dxil-spirv reproduces it, and the dxil-spirv pinned by #775 does not. **Tested** on `main` `930e8b4` - AMD Radeon RX 6700 XT (RDNA2, RADV NAVI22, Mesa 26.3.1), Ryzen 7 5700X, Linux 7.3.5 (CachyOS). Proton Experimental 11.0-20261112's Wine, DXVK v3.1.1-209 `dxgi`, DXC 1.9.2609.5, `VKD3D_CONFIG=ignore_shared_fence`. Cross-built for `x86_64-pc-windows-msvc` (clang-cl / lld-link, xwin SDK), Rust 1.99.1, debug. - vkd3d-proton v3.1 + #257's patch, built with `-Db_ndebug=true` (llvm-mingw 20261117): - **v3.1's dxil-spirv (`8b48f0e`):** the test alone fails 3/3, exit status 5, the same as yours. `WINEDEBUG=+seh` shows an access violation in `d3d12core.dll`. The DLL keeps its symbols, and the stack is: ``` dxil_spv::CFGNode::find_common_post_dominator d3d12core.dll+0x1fb4e2 dxil_spv::CFGNode::recompute_immediate_post_dominator dxil_spv::CFGStructurizer::recompute_cfg dxil_spv::CFGStructurizer::rewrite_invalid_real_loop_breaks dxil_spv::CFGStructurizer::run dxil_spv_converter_run vkd3d_shader_compile_dxil vkd3d_compile_shader_stage d3d12_pipeline_state_create ``` That is the `rewrite_invalid_real_loop_breaks` loop #775 describes for #611, now reached by the programs this test generates. It also fits @⁠tiagonogueiraa-bit's finding that the HLSL itself is fine, and with Windows passing. - **dxil-spirv at `53aac418` (#775's `build-vkd3d-proton.sh`):** the test alone passes 3/3 (about 7–9 s each). `--lib --test-threads=1`: 702 passed, 5 failed, 21 ignored. The 5 are the Wine-lane ones with open PRs: #530 ×2, #676, #890 ×2. - One thing #775 does not fix: in a parallel run (`--lib --test-threads=4`, 2/2 runs) this test fails with `kernel dispatch: D3D12 device removed (0x80004005)`. 7 D3D12.X tests running next to it then fail (`0x887A0005` / `PoisonError`): 3 in `sparse`, 3 in `title_textures`, and `vram::d32s8_targets…`. With `--skip jumps_to_outer_loop_heads_are_structured`, one parallel run had 7/7 of them passing. In the other, 3 failed (`placed_title_textures_share_vram_and_preserve_pixels`, `transitions_apply_when_their_list_is_submitted`, `d32s8_targets…`), which looks like the #718 flake. The kernel log has no amdgpu reset or timeout for these runs. **Not tested** - Windows, NVIDIA. Which generated program trips the structurizer. **AI use** - Claude Code (Claude Opus 5.5) ran the builds, tests and symbolization and wrote this; I checked it. --- **Update: the parallel device removal comes from another test.** It isn't caused by this test itself. - The partner is `hle::d3d12x::list_x::tests::write_buffer_immediate_on_open_existing_heap_visible_to_cpu`. Running just those two tests together (`--test-threads=2 --exact <both>`) fails 3/3: this test gets `kernel dispatch: D3D12 device removed` after about 0.15 s. Pairing this test with every other `list_x` test, and with `sparse`, `vram`, `real`, `bind`, `gpu::texture` and `gpu::uma`, passes. Each of the two passes alone. - The trigger is the `VirtualFree(mem, 0, MEM_RELEASE)` at the end of `write_buffer_immediate_…`. That frees the memory it opened with `OpenExistingHeapFromAddress`, while this test's GPU work on the same device (vkd3d-proton hands back the one device per adapter) is still running. Local experiments, 3 runs each: - free removed: **3/3 pass** - every D3D12 object the test made (lists, allocators, queues, fence, buffers, heap) dropped before the free: still 3/3 fail - a 500 ms sleep before the free: still 3/3 fail - the memory allocated without `MEM_WRITE_WATCH`: still 3/3 fail So it isn't a release that has not happened yet, and it isn't the write watch. Unmapping host memory that was imported (`VK_EXT_external_memory_host`, an amdgpu userptr on RADV) breaks work in flight on that device, even after the heap over it is gone. The kernel log shows no amdgpu reset. The device is not lost for good either: in a `--test-threads=1` run, the D3D12.X tests after it pass. - With `--skip write_buffer_immediate_on_open_existing_heap_visible_to_cpu`, the full `--lib --test-threads=4` run (4 runs) no longer shows the device removal or the 7-test cascade. Every run has the 5 known Wine-lane failures, and 2 of the 4 had one more failure I did not capture. - XCL's own UMA windows stay mapped for the life of the process, so this looks like a test-suite problem only. I have not checked the retail title. A test-side fix would be to keep that test's 64 KiB mapped under Wine (`util::under_wine()`, as in 8fde77a), or for the whole process. I can open that as a test-only PR if that's the direction you want. The underlying behaviour is a Wine / vkd3d-proton / RADV matter. --- **Correction (2026-11-24, later):** the parallel device removal above is a resource leak in the test itself, not a release that happened later than it should. #1520 (@⁠wileyGray) found it: the test's four transition barriers held clones of the resource inside `ManuallyDrop`, so the imported heap was never released when the test freed its memory. That's why dropping everything I could see did not help. With #1520 the pair passes 3/3 here and the 7-test cascade is gone (details on #1520). So the test-side workaround I offered above isn't needed.
Author
Owner

@⁠pablogonz12 on GitHub · 2026-11-25 19:57 UTC · original

Same class of abort on RDNA4 (this report is RDNA3), and it is at least nine tests, not one — each abort takes the whole lib test binary down, so the Wine lane cannot run the suite at all. Prepared with AI assistance: DeepSeek V4.1 Flash in OpenCode; the runs below were done by it.

Setup: CachyOS, kernel 7.3.6, Mesa 26.3.1-5 (RADV GFX1201), RX 9070 XT, GE-Proton11-14 wine (Wine 11.0), scratch prefix, release msvc static build, main 2898511 (and the same with several open PR heads merged on top — identical).

Build and run:

RUSTFLAGS="-C target-feature=+crt-static" cargo xwin test -p xcl --lib --release \
    --target x86_64-pc-windows-msvc --no-run
WINEPREFIX=<scratch> WINEDEBUG=-all wine <target>/x86_64-pc-windows-msvc/release/build/xcl/*/out/xcl-*.exe \
    --test-threads=1

The first abort (exit status 5), as in the report:

test gpu::dxil::module::split::tests::dispatch_chain_divergent_forward_edges_3d ...   (no result, rc=5)

With that one passed to --skip, the next run stops at the next member of the same group, and so on; seven in total, all exit status 5:

gpu::dxil::module::split::tests::dispatch_chain_oversized_loop_matches_whole
gpu::dxil::module::split::tests::dispatch_chain_payload_skips_middle_piece
gpu::dxil::module::split::tests::dispatch_chain_payload_survives_reused_edge_slot
gpu::dxil::module::split::tests::dispatch_chain_wave32_live_loops
gpu::dxil::module::split::tests::dispatch_chain_wave64_live_loops_and_exchange

and after those, a different exit status — 3 instead of 5 — at

gpu::dxil::ops_tests::integer_ops_match_cpu
gpu::dxil::ops_tests::uaddc_and_usubb_match_cpu

jumps_to_outer_loop_heads_are_structured (the test this report bisected to b8b1f49) also aborts with exit status 5, and the two ops_tests ones abort even before any dispatch_chain test runs when they are the ones selected. Everything that does run before the abort passes on this box except the three known gpu::recomp failures (f32_programs_on_the_gpu, f64_programs_on_the_gpu, gpu_nonfused_mad_and_mac_prevent_fma_contraction, the last one #472).

I could not tell whether these share the bisected cause or whether the split/dispatch_chain group is a second, separate abort: skipping one test moves the crash to the next in the same group, which points at something those tests share. f32/f64_programs_on_the_gpu being red here too may be the same thing, since they compile large programs.

Not tested: Windows, RDNA3, other Wine versions (GE-Proton11-14 only); no game run. No workaround is proposed here.

**@⁠pablogonz12** on GitHub · 2026-11-25 19:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/1246#issuecomment-7172987244) Same class of abort on RDNA4 (this report is RDNA3), and it is at least nine tests, not one — each abort takes the whole lib test binary down, so the Wine lane cannot run the suite at all. Prepared with AI assistance: DeepSeek V4.1 Flash in OpenCode; the runs below were done by it. **Setup:** CachyOS, kernel 7.3.6, Mesa 26.3.1-5 (`RADV GFX1201`), RX 9070 XT, GE-Proton11-14 wine (Wine 11.0), scratch prefix, release msvc static build, `main` `2898511` (and the same with several open PR heads merged on top — identical). Build and run: ``` RUSTFLAGS="-C target-feature=+crt-static" cargo xwin test -p xcl --lib --release \ --target x86_64-pc-windows-msvc --no-run WINEPREFIX=<scratch> WINEDEBUG=-all wine <target>/x86_64-pc-windows-msvc/release/build/xcl/*/out/xcl-*.exe \ --test-threads=1 ``` The first abort (exit status 5), as in the report: ``` test gpu::dxil::module::split::tests::dispatch_chain_divergent_forward_edges_3d ... (no result, rc=5) ``` With that one passed to `--skip`, the next run stops at the next member of the same group, and so on; seven in total, all exit status 5: ``` gpu::dxil::module::split::tests::dispatch_chain_oversized_loop_matches_whole gpu::dxil::module::split::tests::dispatch_chain_payload_skips_middle_piece gpu::dxil::module::split::tests::dispatch_chain_payload_survives_reused_edge_slot gpu::dxil::module::split::tests::dispatch_chain_wave32_live_loops gpu::dxil::module::split::tests::dispatch_chain_wave64_live_loops_and_exchange ``` and after those, a different exit status — 3 instead of 5 — at ``` gpu::dxil::ops_tests::integer_ops_match_cpu gpu::dxil::ops_tests::uaddc_and_usubb_match_cpu ``` `jumps_to_outer_loop_heads_are_structured` (the test this report bisected to `b8b1f49`) also aborts with exit status 5, and the two `ops_tests` ones abort even before any `dispatch_chain` test runs when they are the ones selected. Everything that does run before the abort passes on this box except the three known `gpu::recomp` failures (`f32_programs_on_the_gpu`, `f64_programs_on_the_gpu`, `gpu_nonfused_mad_and_mac_prevent_fma_contraction`, the last one #472). I could not tell whether these share the bisected cause or whether the split/`dispatch_chain` group is a second, separate abort: skipping one test moves the crash to the next in the same group, which points at something those tests share. `f32`/`f64_programs_on_the_gpu` being red here too may be the same thing, since they compile large programs. **Not tested:** Windows, RDNA3, other Wine versions (GE-Proton11-14 only); no game run. No workaround is proposed here.
Author
Owner

@⁠pablogonz12 on GitHub · 2026-11-25 21:36 UTC · original

More from the same RDNA4 + Wine lane (Wine 11.0 staging under GE-Proton11-14 with vkd3d-proton 3.2.0, Mesa 26.3.1-arch3.5 RADV GFX1201, RX 9070 XT): the abort is not limited to the lib test binary.

On main 6d12f58, clean checkout, no PR applied:

  • lib binary, filter gpu::dxil::module::split::tests::dispatch_chain --test-threads=1: exit 5, no test result line (as before).
  • gpu_compute_e2e (integration): 5 passed, 1 failed, 1 skipped (no heap windows). The failure is offline_split_compute_pipeline_is_reused_by_a_second_process, panicking at crates/xcl/tests/gpu_compute_e2e.rs:195 with precompiling 1 shaders into C:\users\steamuser\AppData\Local\Temp\xcl-offline-split-pso-....
  • The two new integration tests in #2487 (direct_compute_dispatch_split_matches_unsplit_across_wave32_and_wave64, console_split_compute_pso_dispatches_through_d3d12x_hook_and_reuses_scratch) also exit 5 right at the first GPU dispatch; the details are on that PR.

Other GPU paths do run on this lane: 64-bit typed IMAGE_ATOMIC_* operations pass 3/3 with no SKIPPED on the same prefix and driver (reported on #2488), so this reads as specific to the split/dispatch-chain compute path.

Prepared with AI assistance: DeepSeek V4.1 Flash (OpenCode) ran the commands above and wrote this; no code was written.

**@⁠pablogonz12** on GitHub · 2026-11-25 21:36 UTC · [original](https://github.com/xcl-dev/xcl/issues/1246#issuecomment-7175295071) More from the same RDNA4 + Wine lane (Wine 11.0 staging under GE-Proton11-14 with vkd3d-proton 3.2.0, Mesa 26.3.1-arch3.5 `RADV GFX1201`, RX 9070 XT): the abort is not limited to the lib test binary. On `main` `6d12f58`, clean checkout, no PR applied: - lib binary, filter `gpu::dxil::module::split::tests::dispatch_chain --test-threads=1`: **exit 5, no `test result` line** (as before). - `gpu_compute_e2e` (integration): **5 passed, 1 failed**, 1 skipped (`no heap windows`). The failure is `offline_split_compute_pipeline_is_reused_by_a_second_process`, panicking at `crates/xcl/tests/gpu_compute_e2e.rs:195` with `precompiling 1 shaders into C:\users\steamuser\AppData\Local\Temp\xcl-offline-split-pso-...`. - The two new integration tests in #2487 (`direct_compute_dispatch_split_matches_unsplit_across_wave32_and_wave64`, `console_split_compute_pso_dispatches_through_d3d12x_hook_and_reuses_scratch`) also exit 5 right at the first GPU dispatch; the details are on that PR. Other GPU paths do run on this lane: 64-bit typed `IMAGE_ATOMIC_*` operations pass 3/3 with no `SKIPPED` on the same prefix and driver (reported on #2488), so this reads as specific to the split/dispatch-chain compute path. Prepared with AI assistance: DeepSeek V4.1 Flash (OpenCode) ran the commands above and wrote this; no code was written.
This discussion has been locked. Commenting is limited to contributors.
No description provided.