Repository navigation
Description
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
main6089122a(2026-11-27, our batch baseline), where the test checked the count right after release. git bisect start --first-parent bc2cbb72 6089122a, thengit bisect runwith a step that builds (cargo build -p xcl --tests; a build failure is a skip) and runsXCL_LATE_RELEASE=0 XCL_ADAPTER=radeon cargo test -p xcl --test gpu_two_pass_cache_e2e -- --test-threads=1. Good means1 passed, bad means the panic above, anything else is a skip.XCL_LATE_RELEASE=0makes the older form of the test, which checks right after release, comparable. The first bad merge isb0b041fd, Tests: compare benchmark regression thresholds #2959 (bmjask, "Tests: compare benchmark regression thresholds"), and its first parent4577f09cpasses. Tests: compare benchmark regression thresholds #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 is21e225e4(commit 79 of the 324), andf0384e0a(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 Tests: compare benchmark regression thresholds #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.
Activity
futurepro62 commentedon Nov 30, 2026
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 (
mainbc2cbb72,XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4), thexcllib test binary stopped itself partway with exit code0x80004005, after the log linesparse 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 countedFAILEDlines, and a binary that stops itself prints none.What still stands:
two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobsis 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 withoutXCL_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 commentedon Nov 30, 2026
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:main9dfbe3eleft: 1,right: 0at line 584)0cd75eae) merged, no conflictsmainit also failed 4 of 4 withXCL_LATE_RELEASE=0and 4 of 4 withXCL_GPU_AWAKE=0. With D3D12.X: sweep completed PSO generation pins when nothing new is pinned #3185 andXCL_LATE_RELEASE=0it passed 4 of 4.sweep_native_generations()call inreleased()passed 6 of 6.Full suite:
cargo test --workspace --no-fail-fast -- --test-threads=4, one run each:main9dfbe3eThis 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
mainthe lib binary ran to the end with 4 threads and with--test-threads=1(2,732 passed, 6 failed, 31 ignored).Not tested / limits
main(ff0c364b). The 8 commits in between don't touchpso_async.rs,list_x.rs,late_release.rsor this test.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.
D3D12.X: sweep completed PSO generation pins when nothing new is pinned