D3D12.X: preserve replaced driver blobs after stale rejection #2614

Open
github-bot wants to merge 2 commits from github-bot/gh-2614 into main AGit
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 02:03 UTC · original
luckyteagirl:codex/pso-blob-reject-race → main · +146 −27 · 2 files · 2 commits · open

Fixes #2601. A driver can reject a cached blob after another process replaces the same path. A pathname delete then removes the replacement, even if both generations have identical bytes. Keep the handle that supplied the old blob through PSO creation and invalidate that file object on refusal.

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs: retain the exact opened file generation and dispose that handle on runtime refusal; a cross-process regression directly replaces a still-open blob with identical bytes.
  • crates/xcl/src/shaders.rs: retain and invalidate the same file generation for an offline over-cap refusal.

Tested

  • Windows, AMD Ryzen 9 5980HX, AMD Radeon RX 6800M (driver 30.0.13002.13003), Rust 1.99.0, debug build.
  • cargo build --locked --workspace -j 1: passed.
  • Failing-first on the previous draft head 943947c: a new identical-byte replacement regression failed 0 passed, 1 failed, showing that the replacement was deleted. This draft revision uses the exact file handle instead.
  • cargo test --locked -p xcl --lib -j 1 hle::d3d12x::real::driver_cache::tests -- --test-threads=1 --show-output: 6 passed, 0 failed, 0 ignored, 1332 filtered. The direct cross-process, identical-byte replacement test passed separately (1 passed, 0 failed).
  • cargo test --locked -p xcl --test gpu_compute_e2e -j 1 -- --test-threads=1 --show-output: 7 passed, 0 failed, 0 ignored; one test reported SKIPPED for unavailable heap windows.
  • XCL_ADAPTER=nomatch with cargo test --locked --workspace --no-fail-fast -j 1 -- --test-threads=1 --show-output: 37 target summaries, 1437 passed, 0 failed, 47 ignored. The log contains 138 standalone SKIPPED notices, many repeated subcases, and more inline skip notices; adapter-dependent GPU cases are not coverage. No complete RX 6800M suite is claimed.
  • On the earlier clean revised head cbc165f, which has the same source tree as the current head cd7be10, XCL_ADAPTER=6800M XCL_REQUIRE_GPU=1 with the same workspace command stopped in the library test process at gpu::dxil::core_tests::raw_loads_in_root_windows_respect_exec_and_bounds with 0xc0000005 (STATUS_ACCESS_VIOLATION), before a library summary. The --no-fail-fast integration targets continued, including gpu_compute_e2e at 7 passed / 0 failed. A prior clean-main control on this RX 6800M crashed in the same focused raw-load test; I have not rerun that control on b49be18.
  • Independently, @⁠futurepro62 ran the exact head cd7be10 on an RTX 5070 Ti and an AMD Ryzen 7 9800X3D iGPU. With explicitly listed exclusions for tests that also fail on main on those systems, the NVIDIA workspace run reported 1,425 passed, 0 failed, 45 ignored; the AMD iGPU run reported 1,436 passed, 0 failed, 47 ignored. The new blob-replacement tests passed. These were debug test runs, not game runs. Independent report with hardware, exclusions and SKIPPED notices.
  • A second independent RTX 3060 report on this exact clean head ran the unfiltered cargo test --workspace --no-fail-fast -- --test-threads=4: 1,437 passed, 0 failed, 47 ignored, 25 explicit GPU skips (native wave64 and refused per-lane forms). All six driver_cache tests passed, and the six-test group passed 30 of 30 parallel reruns at eight test threads. These are the independent reporter's results, not runs on our RX 6800M.

Regression run
Guarded 30-second debug builds on the owned title, same RX 6800M and fresh per-run cache/data. The revised head showed 315/385 frames (81.8% of main) and 8267/8284 MB peak commit (99.8% of main). Both exited normally with no device removal or crash.

main:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: AMD Radeon RX 6800M
title: 2ef5fd64
seconds: 30
exit: 0x0
frames shown: 385 (PresentX 385)
presents per 2 s (last 3): 51 53 51
device removals: 0
crashes: 0
peak commit: 8284 MB

PR:

xcl-smoke v1
commit: cd7be10ff02b0b8bdda1a859ef0575cf6af034e7
gpu: AMD Radeon RX 6800M
title: 2ef5fd64
seconds: 30
exit: 0x0
frames shown: 315 (PresentX 315)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 8267 MB

Not tested

  • A completed GPU workspace suite on our RX 6800M, a real-title stale-blob refusal, and behavior on Windows older than 10 version 1709 or filesystems that reject POSIX disposition. The latter case leaves a rejected entry in place rather than deleting a possibly replaced path. The independent RTX 3060 suite skipped 25 GPU tests.

AI use

  • The retained-handle design and initial test came from mokkamokacaffe's GPL-2.0-only XCL reference commit, offered in this PR's review. Git history now preserves that author in commit bb54f23; my follow-up commit cd7be10 strengthens the child-process replacement test. OpenAI Codex (GPT-6; exact serving variant unavailable), with Luna subagents, adapted that test, reviewed the code, ran the stated checks, and prepared this description.
  • OpenAI Codex (GPT-6.2 Astra) verified the additional independent exact-head report and added its linked results to this description.
**@⁠luckyteagirl** on GitHub · 2026-11-26 02:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/2614) `luckyteagirl:codex/pso-blob-reject-race` → `main` · +146 −27 · 2 files · 2 commits · open Fixes #2601. A driver can reject a cached blob after another process replaces the same path. A pathname delete then removes the replacement, even if both generations have identical bytes. Keep the handle that supplied the old blob through PSO creation and invalidate that file object on refusal. **What is in it** - `crates/xcl/src/hle/d3d12x/real.rs`: retain the exact opened file generation and dispose that handle on runtime refusal; a cross-process regression directly replaces a still-open blob with identical bytes. - `crates/xcl/src/shaders.rs`: retain and invalidate the same file generation for an offline over-cap refusal. **Tested** - Windows, AMD Ryzen 9 5980HX, AMD Radeon RX 6800M (driver 30.0.13002.13003), Rust 1.99.0, debug build. - `cargo build --locked --workspace -j 1`: passed. - Failing-first on the previous draft head `943947c`: a new identical-byte replacement regression failed **0 passed, 1 failed**, showing that the replacement was deleted. This draft revision uses the exact file handle instead. - `cargo test --locked -p xcl --lib -j 1 hle::d3d12x::real::driver_cache::tests -- --test-threads=1 --show-output`: 6 passed, 0 failed, 0 ignored, 1332 filtered. The direct cross-process, identical-byte replacement test passed separately (1 passed, 0 failed). - `cargo test --locked -p xcl --test gpu_compute_e2e -j 1 -- --test-threads=1 --show-output`: 7 passed, 0 failed, 0 ignored; one test reported `SKIPPED` for unavailable heap windows. - `XCL_ADAPTER=nomatch` with `cargo test --locked --workspace --no-fail-fast -j 1 -- --test-threads=1 --show-output`: 37 target summaries, **1437 passed, 0 failed, 47 ignored**. The log contains 138 standalone `SKIPPED` notices, many repeated subcases, and more inline skip notices; adapter-dependent GPU cases are not coverage. No complete RX 6800M suite is claimed. - On the earlier clean revised head `cbc165f`, which has the same source tree as the current head `cd7be10`, `XCL_ADAPTER=6800M XCL_REQUIRE_GPU=1` with the same workspace command stopped in the library test process at `gpu::dxil::core_tests::raw_loads_in_root_windows_respect_exec_and_bounds` with `0xc0000005` (`STATUS_ACCESS_VIOLATION`), before a library summary. The `--no-fail-fast` integration targets continued, including `gpu_compute_e2e` at 7 passed / 0 failed. A [prior clean-main control on this RX 6800M](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2368) crashed in the same focused raw-load test; I have not rerun that control on `b49be18`. - Independently, @⁠futurepro62 ran the exact head `cd7be10` on an RTX 5070 Ti and an AMD Ryzen 7 9800X3D iGPU. With explicitly listed exclusions for tests that also fail on main on those systems, the NVIDIA workspace run reported **1,425 passed, 0 failed, 45 ignored**; the AMD iGPU run reported **1,436 passed, 0 failed, 47 ignored**. The new blob-replacement tests passed. These were debug test runs, not game runs. [Independent report with hardware, exclusions and SKIPPED notices](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2614). - A second independent [RTX 3060 report on this exact clean head](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2614) ran the unfiltered `cargo test --workspace --no-fail-fast -- --test-threads=4`: **1,437 passed, 0 failed, 47 ignored**, 25 explicit GPU skips (native wave64 and refused per-lane forms). All six `driver_cache` tests passed, and the six-test group passed 30 of 30 parallel reruns at eight test threads. These are the independent reporter's results, not runs on our RX 6800M. **Regression run** Guarded 30-second debug builds on the owned title, same RX 6800M and fresh per-run cache/data. The revised head showed 315/385 frames (81.8% of main) and 8267/8284 MB peak commit (99.8% of main). Both exited normally with no device removal or crash. main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: AMD Radeon RX 6800M title: 2ef5fd64 seconds: 30 exit: 0x0 frames shown: 385 (PresentX 385) presents per 2 s (last 3): 51 53 51 device removals: 0 crashes: 0 peak commit: 8284 MB ``` PR: ``` xcl-smoke v1 commit: cd7be10ff02b0b8bdda1a859ef0575cf6af034e7 gpu: AMD Radeon RX 6800M title: 2ef5fd64 seconds: 30 exit: 0x0 frames shown: 315 (PresentX 315) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 8267 MB ``` **Not tested** - A completed GPU workspace suite on our RX 6800M, a real-title stale-blob refusal, and behavior on Windows older than 10 version 1709 or filesystems that reject POSIX disposition. The latter case leaves a rejected entry in place rather than deleting a possibly replaced path. The independent RTX 3060 suite skipped 25 GPU tests. **AI use** - The retained-handle design and initial test came from [mokkamokacaffe's GPL-2.0-only XCL reference commit](https://github.com/mokkamokacaffe/xcl/commit/06d08685e60b37a38728c6caf9b1f103995bf468), offered in this PR's review. Git history now preserves that author in commit `bb54f23`; my follow-up commit `cd7be10` strengthens the child-process replacement test. OpenAI Codex (GPT-6; exact serving variant unavailable), with Luna subagents, adapted that test, reviewed the code, ran the stated checks, and prepared this description. - OpenAI Codex (GPT-6.2 Astra) verified the additional independent exact-head report and added its linked results to this description.
Keep the handle that supplied each on-disk PSO blob through the native creation call. A refusal now disposes that exact file object, so an older reader cannot remove a replacement published at the same path.

Fixes #2601

Assisted-by: OpenAI Codex (GPT-6.2 Astra, Ultra reasoning)
Exercise the cross-process case with a direct publication over the old file generation, including byte-identical payloads. This tightens the regression from mokkamokacaffe/xcl@06d08685e6.

Assisted-by: OpenAI Codex (GPT-6; exact serving variant unavailable)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:34:53 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 02:32 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 26 ignored.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 02:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/2614#issuecomment-7180890845) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 26 ignored. Thanks! — Devin
Author
Owner

@⁠mokkamokacaffe on GitHub · 2026-11-26 02:38 UTC · original

I independently prepared a fix for #2601 before noticing this PR had opened concurrently, so I will not open a competing PR.

One generation-identity edge remains in invalidate_if_unchanged: byte equality does not prove that the pathname still names the generation that was read. If replacement B is byte-for-byte identical to A, rejection of A still deletes B. The protection also depends on every writer using the new .lock protocol, which mixed XCL versions do not guarantee.

An alternative is to retain the exact file handle used to read A through PSO creation, opened with delete access and FILE_SHARE_DELETE, then invalidate that file object with FileDispositionInfoEx and POSIX delete semantics. This remains correct for identical replacements and non-cooperating writers and does not add persistent lock files.

I have an unsubmitted reference implementation and an identical-byte cross-process regression here: github.com/mokkamokacaffe/xcl@06d08685e6

That branch has only passed Windows-target compilation from Linux, whereas this PR has real Windows/AMD execution, so I am offering it as a design/test contribution rather than claiming it is better validated.

AI-assisted review: OpenAI Codex (GPT-6.2 Astra, Ultra reasoning).

**@⁠mokkamokacaffe** on GitHub · 2026-11-26 02:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/2614#issuecomment-7180985302) I independently prepared a fix for #2601 before noticing this PR had opened concurrently, so I will not open a competing PR. One generation-identity edge remains in `invalidate_if_unchanged`: byte equality does not prove that the pathname still names the generation that was read. If replacement B is byte-for-byte identical to A, rejection of A still deletes B. The protection also depends on every writer using the new `.lock` protocol, which mixed XCL versions do not guarantee. An alternative is to retain the exact file handle used to read A through PSO creation, opened with delete access and `FILE_SHARE_DELETE`, then invalidate that file object with `FileDispositionInfoEx` and POSIX delete semantics. This remains correct for identical replacements and non-cooperating writers and does not add persistent lock files. I have an unsubmitted reference implementation and an identical-byte cross-process regression here: https://github.com/mokkamokacaffe/xcl/commit/06d08685e60b37a38728c6caf9b1f103995bf468 That branch has only passed Windows-target compilation from Linux, whereas this PR has real Windows/AMD execution, so I am offering it as a design/test contribution rather than claiming it is better validated. AI-assisted review: OpenAI Codex (GPT-6.2 Astra, Ultra reasoning).
Author
Owner

@⁠mokkamokacaffe on GitHub · 2026-11-26 03:01 UTC · original

Interesting

**@⁠mokkamokacaffe** on GitHub · 2026-11-26 03:01 UTC · [original](https://github.com/xcl-dev/xcl/pull/2614#issuecomment-7181324473) Interesting
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 03:03 UTC · original

Thanks for catching the generation-identity gap and offering the reference implementation. I reproduced the identical-byte failure on the previous 943947c head: the replacement was deleted (0 passed, 1 failed in the focused regression). I adapted your retained-handle approach on draft head cbc165f, credited your commit in the commit message and PR description, and changed the cross-process test so the child publishes B directly over the still-open A before the delayed parent invalidates A.

On Windows, the new cross-process test passes; all six driver_cache::tests pass, gpu_compute_e2e passes 7/7 on the RX 6800M, and the full workspace run with adapter selection disabled reports 1,437 passed / 0 failed / 47 ignored. Windows no-GPU CI is green. The full GPU run still stops at the same raw-load access violation previously observed on clean main; the revised head's paired title smoke is pending. This response was prepared with OpenAI Codex (GPT-6; exact serving variant unavailable).

**@⁠luckyteagirl** on GitHub · 2026-11-26 03:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/2614#issuecomment-7181359105) Thanks for catching the generation-identity gap and offering the reference implementation. I reproduced the identical-byte failure on the previous `943947c` head: the replacement was deleted (0 passed, 1 failed in the focused regression). I adapted your retained-handle approach on draft head `cbc165f`, credited your commit in the commit message and PR description, and changed the cross-process test so the child publishes B directly over the still-open A before the delayed parent invalidates A. On Windows, the new cross-process test passes; all six `driver_cache::tests` pass, `gpu_compute_e2e` passes 7/7 on the RX 6800M, and the full workspace run with adapter selection disabled reports 1,437 passed / 0 failed / 47 ignored. Windows no-GPU CI is green. The full GPU run still stops at the same raw-load access violation previously observed on clean main; the revised head's paired title smoke is pending. This response was prepared with OpenAI Codex (GPT-6; exact serving variant unavailable).
Author
Owner

@⁠mokkamokacaffe on GitHub · 2026-11-26 03:06 UTC · original

Thanks for catching the generation-identity gap and offering the reference implementation. I reproduced the identical-byte failure on the previous 943947c head: the replacement was deleted (0 passed, 1 failed in the focused regression). I adapted your retained-handle approach on draft head cbc165f, credited your commit in the commit message and PR description, and changed the cross-process test so the child publishes B directly over the still-open A before the delayed parent invalidates A.

On Windows, the new cross-process test passes; all six driver_cache::tests pass, gpu_compute_e2e passes 7/7 on the RX 6800M, and the full workspace run with adapter selection disabled reports 1,437 passed / 0 failed / 47 ignored. Windows no-GPU CI is green. The full GPU run still stops at the same raw-load access violation previously observed on clean main; the revised head's paired title smoke is pending. This response was prepared with OpenAI Codex (GPT-6; exact serving variant unavailable).

Thanks for the clear provenance, the failing-first reproduction, and the Windows/AMD validation.

I compared revised head cbc165f with my reference commit 06d08685e60b37a38728c6caf9b1f103995bf468; the resulting trees differ only in the three-line strengthening of the child-process regression. Since the retained-handle implementation and the rest of the tests were adopted substantially intact, could the Git history preserve authorship as well?

Either approach would work:

  1. cherry-pick 06d08685e60b37a38728c6caf9b1f103995bf468 and put the direct-replacement test adjustment in a follow-up commit; or
  2. add this trailer to the revised commit:

Co-authored-by: mokkamokacaffe <[email protected]>

The existing commit-message and PR-body attribution is appreciated; this request is only so the authorship survives in Git/GitHub history.

AI-assisted comment: OpenAI Codex (GPT-6.2 Astra, Ultra reasoning).

**@⁠mokkamokacaffe** on GitHub · 2026-11-26 03:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/2614#issuecomment-7181404282) > Thanks for catching the generation-identity gap and offering the reference implementation. I reproduced the identical-byte failure on the previous `943947c` head: the replacement was deleted (0 passed, 1 failed in the focused regression). I adapted your retained-handle approach on draft head `cbc165f`, credited your commit in the commit message and PR description, and changed the cross-process test so the child publishes B directly over the still-open A before the delayed parent invalidates A. > > On Windows, the new cross-process test passes; all six `driver_cache::tests` pass, `gpu_compute_e2e` passes 7/7 on the RX 6800M, and the full workspace run with adapter selection disabled reports 1,437 passed / 0 failed / 47 ignored. Windows no-GPU CI is green. The full GPU run still stops at the same raw-load access violation previously observed on clean main; the revised head's paired title smoke is pending. This response was prepared with OpenAI Codex (GPT-6; exact serving variant unavailable). Thanks for the clear provenance, the failing-first reproduction, and the Windows/AMD validation. I compared revised head `cbc165f` with my reference commit `06d08685e60b37a38728c6caf9b1f103995bf468`; the resulting trees differ only in the three-line strengthening of the child-process regression. Since the retained-handle implementation and the rest of the tests were adopted substantially intact, could the Git history preserve authorship as well? Either approach would work: 1. cherry-pick `06d08685e60b37a38728c6caf9b1f103995bf468` and put the direct-replacement test adjustment in a follow-up commit; or 2. add this trailer to the revised commit: `Co-authored-by: mokkamokacaffe <329663686+[email protected]>` The existing commit-message and PR-body attribution is appreciated; this request is only so the authorship survives in Git/GitHub history. AI-assisted comment: OpenAI Codex (GPT-6.2 Astra, Ultra reasoning).
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 03:10 UTC · original

Done. I rewrote the draft PR as two commits: bb54f23 is a cherry-pick of your 06d0868, retaining you as the Git author, and cd7be10 is my three-line test adjustment. I verified the final source tree is identical to the previously tested cbc165f tree. Thanks for asking for the durable credit; the PR commit list now shows your authorship directly.

The paired title smoke remains pending. This reply was prepared with OpenAI Codex (GPT-6; exact serving variant unavailable).

**@⁠luckyteagirl** on GitHub · 2026-11-26 03:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/2614#issuecomment-7181469788) Done. I rewrote the draft PR as two commits: `bb54f23` is a cherry-pick of your `06d0868`, retaining you as the Git author, and `cd7be10` is my three-line test adjustment. I verified the final source tree is identical to the previously tested `cbc165f` tree. Thanks for asking for the durable credit; the PR commit list now shows your authorship directly. The paired title smoke remains pending. This reply was prepared with OpenAI Codex (GPT-6; exact serving variant unavailable).
Author
Owner

@⁠mokkamokacaffe on GitHub · 2026-11-26 03:15 UTC · original

Thank you, @⁠luckyteagirl — I really appreciate you restructuring the history to preserve my original Git authorship and keeping your test adjustment as a separate commit.

I verified the resulting tree matches the revision that was already tested, so I’ll close #2616 as superseded and delete its branch. Thanks again for handling this so thoughtfully.

AI-assisted comment: OpenAI Codex (GPT-6.2 Astra, Ultra reasoning).

**@⁠mokkamokacaffe** on GitHub · 2026-11-26 03:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/2614#issuecomment-7181545624) Thank you, @⁠luckyteagirl — I really appreciate you restructuring the history to preserve my original Git authorship and keeping your test adjustment as a separate commit. I verified the resulting tree matches the revision that was already tested, so I’ll close #2616 as superseded and delete its branch. Thanks again for handling this so thoughtfully. AI-assisted comment: OpenAI Codex (GPT-6.2 Astra, Ultra reasoning).
Author
Owner

@⁠fromthemoonx on GitHub · 2026-11-26 03:25 UTC · original

A complete GPU workspace suite on NVIDIA (both listed under Not tested): passes, and the driver_cache tests are stable in parallel.

Tested: cd7be10 (its base is current main b49be18, so head = merged). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300 (NTFS), Rust 1.100.0 MSVC, debug.

result
cargo test --workspace --no-fail-fast -- --test-threads=4 1437 passed, 0 failed, 47 ignored; 25 SKIPPED lines (no wave64, refused per-lane forms); all 6 driver_cache::tests ran and passed, including an_older_process_cannot_remove_a_replacement_blob and a_cache_symlink_never_disposes_its_target
hle::d3d12x::real::driver_cache::tests:: (6 tests), --test-threads=8, 30 runs 30 of 30

The library process ran to the end here (no 0xc0000005), so this is the full GPU run the RX 6800M log could not give.

Not tested: a refusal in a real title (no stale blob was produced), a release build, AMD (covered above).

AI use: Claude Code (Claude Opus 5.5) ran the suite and the repeats, and wrote this report.

**@⁠fromthemoonx** on GitHub · 2026-11-26 03:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/2614#issuecomment-7181708491) **A complete GPU workspace suite on NVIDIA (both listed under Not tested): passes, and the `driver_cache` tests are stable in parallel.** **Tested:** `cd7be10` (its base is current `main` `b49be18`, so head = merged). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300 (NTFS), Rust 1.100.0 MSVC, debug. | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4` | 1437 passed, 0 failed, 47 ignored; 25 `SKIPPED` lines (`no wave64`, refused per-lane forms); all 6 `driver_cache::tests` ran and passed, including `an_older_process_cannot_remove_a_replacement_blob` and `a_cache_symlink_never_disposes_its_target` | | `hle::d3d12x::real::driver_cache::tests::` (6 tests), `--test-threads=8`, 30 runs | 30 of 30 | The library process ran to the end here (no `0xc0000005`), so this is the full GPU run the RX 6800M log could not give. **Not tested:** a refusal in a real title (no stale blob was produced), a release build, AMD (covered above). **AI use:** Claude Code (Claude Opus 5.5) ran the suite and the repeats, and wrote this report.
Author
Owner

@⁠upipibi on GitHub · 2026-11-26 05:30 UTC · original

NVIDIA test report for cd7be10: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug.

  • cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4 (the hle::xaudio2 tests hang on this machine, on main too):
  • this PR: 1302 passed, 0 failed, 27 ignored; 25 SKIPPED lines (21 no wave64, three refused per-lane forms, the driver-cache measurement that needs Developer Mode).
  • The two new driver_cache tests (an_older_process_cannot_remove_a_replacement_blob, a_cache_symlink_never_disposes_its_target) ran in it and passed.

Lib tests only; no title run.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠upipibi** on GitHub · 2026-11-26 05:30 UTC · [original](https://github.com/xcl-dev/xcl/pull/2614#issuecomment-7183548135) NVIDIA test report for `cd7be10`: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug. - `cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4` (the `hle::xaudio2` tests hang on this machine, on `main` too): - this PR: 1302 passed, 0 failed, 27 ignored; 25 SKIPPED lines (21 no wave64, three refused per-lane forms, the driver-cache measurement that needs Developer Mode). - The two new `driver_cache` tests (`an_older_process_cannot_remove_a_replacement_blob`, `a_cache_symlink_never_disposes_its_target`) ran in it and passed. Lib tests only; no title run. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-26 05:34 UTC · original

NVIDIA and AMD full-suite run, to go with the reports above by fromthemoonx, upipibi, since none of them covers AMD. Tested exact head cd7be10f (on its base b49be18).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1425 passed, 0 failed, 45 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, dispatch_chain_native_wave64_builds_whole, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • The new tests ran and passed: an_older_process_cannot_remove_a_replacement_blob, a_cache_symlink_never_disposes_its_target.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1436 passed, 0 failed, 47 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main b49be183 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-26 05:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/2614#issuecomment-7183607572) NVIDIA and AMD full-suite run, to go with the reports above by fromthemoonx, upipibi, since none of them covers AMD. Tested exact head `cd7be10f` (on its base `b49be18`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests`: **1425 passed, 0 failed, 45 ignored**. SKIPPED (no wave64): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `dispatch_chain_native_wave64_builds_whole`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - The new tests ran and passed: `an_older_process_cannot_remove_a_replacement_blob`, `a_cache_symlink_never_disposes_its_target`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **1436 passed, 0 failed, 47 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `--skip` leaves out tests that fail on main `b49be183` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651), the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` and `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://git.gtahub.st/github/xcl-dev--xcl/issues/1651)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 08:29 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 08:29 UTC · [original](https://github.com/xcl-dev/xcl/pull/2614#issuecomment-7186653801) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
Author
Owner

@⁠KOLESNiii on GitHub · 2026-11-26 11:45 UTC · original

Wine/Proton concern with the open LoadedBlob handle (checked against cd7be10f).

Under Wine, renaming over a file that has any open handle fails. In server/fd.c, set_fd_name returns STATUS_ACCESS_DENIED when the destination inode has open fds ("can't replace an opened file"). It does not look at share modes, and it ignores FILE_RENAME_POSIX_SEMANTICS. This happens on ext4 or any other Linux filesystem. FileDispositionInfoEx with POSIX semantics is accepted, and the file is unlinked when its handle closes, so invalidate() itself works.

Where it breaks: the refused, not-over-cap branch of Pipelines in crates/xcl/src/shaders.rs. loaded is still open when the uncached compile finishes and driver_cache::write(path, ..) renames the new blob over the same path. Under Wine that rename always fails, and the stale file is not invalidated in this branch. Every later --pipelines pass loads the same stale blob, gets it refused, compiles again and fails to save. Before this PR, remove_file cleared the stale file. On NTFS the POSIX rename succeeds, so this only shows up under Wine (and on Windows volumes without POSIX rename).

Suggested change: once the driver has refused the blob, invalidate it (which closes the handle) before the uncached compile, as the over-cap branch above already does:

        } else {
            if let Some(loaded) = loaded.take() {
                let _ = loaded.invalidate();
            }
            desc.CachedPSO = D3D12_CACHED_PIPELINE_STATE::default();
            let pso = unsafe { self.dev.CreateComputePipelineState::<ID3D12PipelineState>(&desc) };

The runtime call sites in real.rs already call note(false, loaded.take()) before the retry and keep, so they don't hit this within one process. They do keep the handle open through the first driver compile, though. While a cache file is open there, a second XCL process sharing the cache dir cannot keep a replacement for it under Wine. Dropping the handle earlier would avoid that, for example by keeping the bytes and reopening for deletion only on refusal, at the cost of the generation check. That is a smaller issue.

Not tested: this comes from reading Wine master's source on the GitHub mirror. The server/fd.c behaviour was read in the source itself; the ntdll and kernelbase handling is from a summary of those files. Nothing was run under Wine or Proton. The same lifetime affects an_older_process_cannot_remove_a_replacement_blob: its child's write over a file the parent still has open would be refused under Wine.

AI use: found and written with Claude Code (Claude Opus 5.5) and checked by me.

**@⁠KOLESNiii** on GitHub · 2026-11-26 11:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/2614#issuecomment-7191133015) Wine/Proton concern with the open `LoadedBlob` handle (checked against `cd7be10f`). Under Wine, renaming over a file that has any open handle fails. In `server/fd.c`, `set_fd_name` returns `STATUS_ACCESS_DENIED` when the destination inode has open fds ("can't replace an opened file"). It does not look at share modes, and it ignores `FILE_RENAME_POSIX_SEMANTICS`. This happens on ext4 or any other Linux filesystem. `FileDispositionInfoEx` with POSIX semantics is accepted, and the file is unlinked when its handle closes, so `invalidate()` itself works. **Where it breaks:** the refused, not-over-cap branch of `Pipelines` in `crates/xcl/src/shaders.rs`. `loaded` is still open when the uncached compile finishes and `driver_cache::write(path, ..)` renames the new blob over the same path. Under Wine that rename always fails, and the stale file is not invalidated in this branch. Every later `--pipelines` pass loads the same stale blob, gets it refused, compiles again and fails to save. Before this PR, `remove_file` cleared the stale file. On NTFS the POSIX rename succeeds, so this only shows up under Wine (and on Windows volumes without POSIX rename). **Suggested change:** once the driver has refused the blob, invalidate it (which closes the handle) before the uncached compile, as the over-cap branch above already does: ```rust } else { if let Some(loaded) = loaded.take() { let _ = loaded.invalidate(); } desc.CachedPSO = D3D12_CACHED_PIPELINE_STATE::default(); let pso = unsafe { self.dev.CreateComputePipelineState::<ID3D12PipelineState>(&desc) }; ``` The runtime call sites in `real.rs` already call `note(false, loaded.take())` before the retry and `keep`, so they don't hit this within one process. They do keep the handle open through the first driver compile, though. While a cache file is open there, a second XCL process sharing the cache dir cannot `keep` a replacement for it under Wine. Dropping the handle earlier would avoid that, for example by keeping the bytes and reopening for deletion only on refusal, at the cost of the generation check. That is a smaller issue. **Not tested:** this comes from reading Wine master's source on the GitHub mirror. The `server/fd.c` behaviour was read in the source itself; the ntdll and kernelbase handling is from a summary of those files. Nothing was run under Wine or Proton. The same lifetime affects `an_older_process_cannot_remove_a_replacement_blob`: its child's `write` over a file the parent still has open would be refused under Wine. AI use: found and written with Claude Code (Claude Opus 5.5) and checked by me.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2614/head:github-bot/gh-2614'
git switch 'github-bot/gh-2614'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2614'
git switch 'github-bot/gh-2614'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2614'
git switch 'github-bot/gh-2614'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2614'
git switch 'main'
git merge --squash 'github-bot/gh-2614'
git switch 'main'
git merge --ff-only 'github-bot/gh-2614'
git switch 'main'
git merge 'github-bot/gh-2614'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.