Tests: two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs fails on an AMD RDNA2 iGPU since #2959: one two-pass state outlives its PSOs #3441

Open
opened 2026-11-29 17:23:59 +00:00 by futurepro62 · 2 comments
futurepro62 commented 2026-11-29 17:23:59 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-29T17:23:59Z.


On main bc2cbb72, tests/gpu_two_pass_cache_e2e.rs fails on the Radeon iGPU of a Ryzen 7 9800X3D. It passes on an RTX 5070 Ti in the same machine. The parent test's message (gpu_two_pass_cache_e2e.rs:472) shows only disabled: and the child's stdout; the real failure is in the child's stderr, in its first case (disabled: XCL_PSO_DISK_CACHE=0, XCL_ASYNC_PSO=1, XCL_PSO_PRELOAD=0, XCL_D3D12_DEBUG=1):

thread 'two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs' panicked at crates\xcl\tests\gpu_two_pass_cache_e2e.rs:584:5:
assertion `left == right` failed: releasing the title PSOs releases their two-pass state
  left: 1
 right: 0

So after drop((ms1, ms2, gs)) and the test's 5 s wait for late release, one of the three two-pass states is still counted by real::two_pass_count(). The child's log before that is normal: the two MS pipelines and the GS pipeline are built in two passes, and the draws read back the expected values (those asserts come before line 584). The debug layer's live-object list follows at process exit.

This is not the failure #2770 fixed. That one was left: 3 on NVIDIA right after the drop, from the late release added in eb49926b, and it passed with XCL_LATE_RELEASE=0 (#42 comment). Here it is left: 1 after the 5 s wait, on AMD only, and XCL_LATE_RELEASE=0 does not help.

Reproduce

XCL_ADAPTER=radeon cargo test -p xcl --test gpu_two_pass_cache_e2e -- --test-threads=1
  • Fails 2 of 2 runs solo on the Radeon. It fails the same way with XCL_LATE_RELEASE=0 (release in the call, no late release), so it is not the 5 s wait being too short.
  • Passes on the RTX 5070 Ti (same command without XCL_ADAPTER): 1 passed, 6.1 s.
  • In the full suite (XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4) it is the only failure.

When it started

  • Passes on the Radeon at main 6089122a (2026-11-27, our batch baseline), where the test checked the count right after release.
  • git bisect start --first-parent bc2cbb72 6089122a, then git bisect run with a step that builds (cargo build -p xcl --tests; a build failure is a skip) and runs XCL_LATE_RELEASE=0 XCL_ADAPTER=radeon cargo test -p xcl --test gpu_two_pass_cache_e2e -- --test-threads=1. Good means 1 passed, bad means the panic above, anything else is a skip. XCL_LATE_RELEASE=0 makes the older form of the test, which checks right after release, comparable. The first bad merge is b0b041fd, #2959 (bmjask, "Tests: compare benchmark regression thresholds"), and its first parent 4577f09c passes. #2959 brings in a stack of 324 commits (48k lines).
  • Inside the stack, the same step on git bisect start 23c06c9f 409cf071: the last commit I found passing is 21e225e4 (commit 79 of the 324), and f0384e0a (commit 323, "Shaders: separate legacy and OS-backed build claims") fails. I could not narrow it further: in 20 minutes the bisect hit 151 commits that do not build on their own and reached only those two.

Not tested / limits

  • Not run on a discrete AMD GPU or another iGPU, so I can't say whether it is RDNA2, the iGPU's small dedicated memory (485 MiB reported) or the AMD driver path (the log says "driver-blob disk cache off on AMD").
  • No root cause: I did not instrument which of the three states stays, or why.
  • Several commits inside #2959's stack do not build on their own (for example 711ff3ef: cannot find function name_for in module driver_cache), which limited the bisect.

Tested on

  • AMD Radeon(TM) Graphics (RDNA2 iGPU of the Ryzen 7 9800X3D, XCL_ADAPTER=radeon), driver 32.0.21036.18.
  • NVIDIA GeForce RTX 5070 Ti 16 GB, driver 621.40 (32.0.16.2140).
  • Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC 1.9.2602.17; debug builds, clean detached checkouts.

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and the bisect and wrote this issue. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:issue:6681780638 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/3441). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-29T17:23:59Z. --- On `main` `bc2cbb72`, `tests/gpu_two_pass_cache_e2e.rs` fails on the Radeon iGPU of a Ryzen 7 9800X3D. It passes on an RTX 5070 Ti in the same machine. The parent test's message (`gpu_two_pass_cache_e2e.rs:472`) shows only `disabled:` and the child's stdout; the real failure is in the child's stderr, in its first case (`disabled`: `XCL_PSO_DISK_CACHE=0`, `XCL_ASYNC_PSO=1`, `XCL_PSO_PRELOAD=0`, `XCL_D3D12_DEBUG=1`): ``` thread 'two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs' panicked at crates\xcl\tests\gpu_two_pass_cache_e2e.rs:584:5: assertion `left == right` failed: releasing the title PSOs releases their two-pass state left: 1 right: 0 ``` So after `drop((ms1, ms2, gs))` and the test's 5 s wait for late release, one of the three two-pass states is still counted by `real::two_pass_count()`. The child's log before that is normal: the two MS pipelines and the GS pipeline are built in two passes, and the draws read back the expected values (those asserts come before line 584). The debug layer's live-object list follows at process exit. This is not the failure #2770 fixed. That one was `left: 3` on NVIDIA right after the drop, from the late release added in `eb49926b`, and it passed with `XCL_LATE_RELEASE=0` ([#42 comment](https://github.com/xcl-dev/xcl/issues/42#issuecomment-7194939815)). Here it is `left: 1` after the 5 s wait, on AMD only, and `XCL_LATE_RELEASE=0` does not help. **Reproduce** ``` XCL_ADAPTER=radeon cargo test -p xcl --test gpu_two_pass_cache_e2e -- --test-threads=1 ``` - Fails 2 of 2 runs solo on the Radeon. It fails the same way with `XCL_LATE_RELEASE=0` (release in the call, no late release), so it is not the 5 s wait being too short. - Passes on the RTX 5070 Ti (same command without `XCL_ADAPTER`): 1 passed, 6.1 s. - In the full suite (`XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4`) it is the only failure. **When it started** - Passes on the Radeon at `main` `6089122a` (2026-11-27, our batch baseline), where the test checked the count right after release. - `git bisect start --first-parent bc2cbb72 6089122a`, then `git bisect run` with a step that builds (`cargo build -p xcl --tests`; a build failure is a skip) and runs `XCL_LATE_RELEASE=0 XCL_ADAPTER=radeon cargo test -p xcl --test gpu_two_pass_cache_e2e -- --test-threads=1`. Good means `1 passed`, bad means the panic above, anything else is a skip. `XCL_LATE_RELEASE=0` makes the older form of the test, which checks right after release, comparable. The first bad merge is `b0b041fd`, **#2959** (bmjask, "Tests: compare benchmark regression thresholds"), and its first parent `4577f09c` passes. #2959 brings in a stack of 324 commits (48k lines). - Inside the stack, the same step on `git bisect start 23c06c9f 409cf071`: the last commit I found passing is `21e225e4` (commit 79 of the 324), and `f0384e0a` (commit 323, "Shaders: separate legacy and OS-backed build claims") fails. I could not narrow it further: in 20 minutes the bisect hit 151 commits that do not build on their own and reached only those two. **Not tested / limits** - Not run on a discrete AMD GPU or another iGPU, so I can't say whether it is RDNA2, the iGPU's small dedicated memory (485 MiB reported) or the AMD driver path (the log says "driver-blob disk cache off on AMD"). - No root cause: I did not instrument which of the three states stays, or why. - Several commits inside #2959's stack do not build on their own (for example `711ff3ef`: `cannot find function name_for in module driver_cache`), which limited the bisect. **Tested on** - AMD Radeon(TM) Graphics (RDNA2 iGPU of the Ryzen 7 9800X3D, `XCL_ADAPTER=radeon`), driver 32.0.21036.18. - NVIDIA GeForce RTX 5070 Ti 16 GB, driver 621.40 (32.0.16.2140). - Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC 1.9.2602.17; debug builds, clean detached checkouts. **AI use** - Claude Code (Claude Opus 5.5) ran the tests and the bisect and wrote this issue. I checked it before posting.
futurepro62 commented 2026-11-30 01:23:50 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-30T01:23:50Z.


Correction to "Reproduce" above: I wrote that in the full Radeon suite this test "is the only failure". That overstates it. In that same full-suite run (main bc2cbb72, XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4), the xcl lib test binary stopped itself partway with exit code 0x80004005, after the log line sparse upload preparation still failed after bounded retries – the title is stopped before its GPU submission. About a quarter of the lib tests never ran on the Radeon, so "only failure" holds only for the test binaries that finished. I missed it because I counted FAILED lines, and a binary that stops itself prints none.

What still stands: two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs is in its own integration test binary (tests/gpu_two_pass_cache_e2e.rs), which ran to the end in that run. It fails the same way solo (2 of 2), with and without XCL_LATE_RELEASE=0, and the bisect to #2959 used that solo command.

The lib binary's stop is a separate problem, which I've reported on its own: #3488. By a first-parent check it also starts at #2959.

Written with Claude Code (Claude Opus 5.5); I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7266101147 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/3441#issuecomment-7266101147). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-30T01:23:50Z. --- **Correction to "Reproduce" above:** I wrote that in the full Radeon suite this test "is the only failure". That overstates it. In that same full-suite run (`main` `bc2cbb72`, `XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4`), the `xcl` lib test binary stopped itself partway with exit code `0x80004005`, after the log line `sparse upload preparation still failed after bounded retries – the title is stopped before its GPU submission`. About a quarter of the lib tests never ran on the Radeon, so "only failure" holds only for the test binaries that finished. I missed it because I counted `FAILED` lines, and a binary that stops itself prints none. What still stands: `two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` is in its own integration test binary (`tests/gpu_two_pass_cache_e2e.rs`), which ran to the end in that run. It fails the same way solo (2 of 2), with and without `XCL_LATE_RELEASE=0`, and the bisect to #2959 used that solo command. The lib binary's stop is a separate problem, which I've reported on its own: #3488. By a first-parent check it also starts at #2959. Written with Claude Code (Claude Opus 5.5); I checked it before posting.
YousefElghanam commented 2026-11-30 20:47:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by YousefElghanam on 2026-11-30T20:47:04Z.


Confirmed on a discrete AMD card, and #3185 fixes it there. So it isn't specific to RDNA2 or to an iGPU's small memory.

Test alone: cargo test -p xcl --test gpu_two_pass_cache_e2e -- --test-threads=1, alternating between the trees:

Tree Passed
main 9dfbe3ea 0 of 6 (each time left: 1, right: 0 at line 584)
9dfbe3ea with #3185 (0cd75eae) merged, no conflicts 6 of 6
  • On main it also failed 4 of 4 with XCL_LATE_RELEASE=0 and 4 of 4 with XCL_GPU_AWAKE=0. With #3185 and XCL_LATE_RELEASE=0 it passed 4 of 4.
  • #3185 reports about 30 % failures on an RTX 3090. On this card every run failed, so it is a reliable reproducer.
  • The release-time sweep is enough on its own for this test: 9dfbe3ea with only a sweep_native_generations() call in released() passed 6 of 6.

Full suite: cargo test --workspace --no-fail-fast -- --test-threads=4, one run each:

Tree Passed Failed Ignored
main 9dfbe3ea 2,879 7 51
with #3185 2,882 6 51

This test is the only difference in failures. The same 6 fail on both: gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form, fuzz_validate_and_gpu_1, gpu_direct_image_get_resinfo_d16, f32_programs_on_the_gpu, gpu_f32_compares_with_nan, gpu_float_compares_random.

#3488's stop did not reproduce: on unmodified main the lib binary ran to the end with 4 threads and with --test-threads=1 (2,732 passed, 6 failed, 31 ignored).

Not tested / limits

  • Merged onto 9dfbe3ea, not current main (ff0c364b). The 8 commits in between don't touch pso_async.rs, list_x.rs, late_release.rs or this test.
  • No D3D12 debug layer here, so this test's debug-message assertions did not run. SKIPPED in the full suite: 6 notices (3 debug layer, 2 heap windows, 1 Developer Mode).
  • No retail title, so no smoke run. The ordering described in the latest comment on #3185 (released while the receipt is still pending) was not tested.
  • One card and one driver.

Tested on: AMD Radeon RX 7700 XT 12 GB (RDNA3), driver 32.0.32029.2010; Ryzen 5 5600X; Windows 11 Pro 26200.9974; Rust 1.100.1 MSVC; DXC 1.8.2502.11; debug builds, GPU otherwise idle.

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7291464562 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/3441#issuecomment-7291464562). Originally posted by [YousefElghanam](https://github.com/YousefElghanam) on 2026-11-30T20:47:04Z. --- **Confirmed on a discrete AMD card, and #3185 fixes it there.** So it isn't specific to RDNA2 or to an iGPU's small memory. **Test alone:** `cargo test -p xcl --test gpu_two_pass_cache_e2e -- --test-threads=1`, alternating between the trees: | Tree | Passed | |---|---| | `main` 9dfbe3ea | 0 of 6 (each time `left: 1`, `right: 0` at line 584) | | 9dfbe3ea with #3185 (`0cd75eae`) merged, no conflicts | 6 of 6 | - On `main` it also failed 4 of 4 with `XCL_LATE_RELEASE=0` and 4 of 4 with `XCL_GPU_AWAKE=0`. With #3185 and `XCL_LATE_RELEASE=0` it passed 4 of 4. - #3185 reports about 30 % failures on an RTX 3090. On this card every run failed, so it is a reliable reproducer. - The release-time sweep is enough on its own for this test: 9dfbe3ea with only a `sweep_native_generations()` call in `released()` passed 6 of 6. **Full suite:** `cargo test --workspace --no-fail-fast -- --test-threads=4`, one run each: | Tree | Passed | Failed | Ignored | |---|---|---|---| | `main` 9dfbe3ea | 2,879 | 7 | 51 | | with #3185 | 2,882 | 6 | 51 | This test is the only difference in failures. The same 6 fail on both: `gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form`, `fuzz_validate_and_gpu_1`, `gpu_direct_image_get_resinfo_d16`, `f32_programs_on_the_gpu`, `gpu_f32_compares_with_nan`, `gpu_float_compares_random`. #3488's stop did not reproduce: on unmodified `main` the lib binary ran to the end with 4 threads and with `--test-threads=1` (2,732 passed, 6 failed, 31 ignored). **Not tested / limits** - Merged onto 9dfbe3ea, not current `main` (`ff0c364b`). The 8 commits in between don't touch `pso_async.rs`, `list_x.rs`, `late_release.rs` or this test. - No D3D12 debug layer here, so this test's debug-message assertions did not run. SKIPPED in the full suite: 6 notices (3 debug layer, 2 heap windows, 1 Developer Mode). - No retail title, so no smoke run. The ordering described in the latest comment on #3185 (released while the receipt is still pending) was not tested. - One card and one driver. **Tested on:** AMD Radeon RX 7700 XT 12 GB (RDNA3), driver 32.0.32029.2010; Ryzen 5 5600X; Windows 11 Pro 26200.9974; Rust 1.100.1 MSVC; DXC 1.8.2502.11; debug builds, GPU otherwise idle. **AI use:** Claude Code (Claude Opus 5.5) ran the tests and wrote this comment.
Sign in to join this conversation.
No labels
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.

Reference
xcl-dev/xcl#3441
No description provided.