Repository navigation
Conversation
…estroy In shader_cache_session::release, when `delete_on_destroy` was set on a disk-mode session, `disk_stores().lock().unwrap().remove(&k)` removed key `k` unconditionally. If two sessions S1 and S2 shared the same store Arc1 with `SetDeleteOnDestroy()`, dropping S1 removed `k`, S3 opened a fresh store Arc2 for `k`, and then dropping S2 evicted S3's newer Arc2 from `disk_stores()`. Only remove `k` from `disk_stores()` when the currently mapped `Arc` is still `Arc::ptr_eq` to `boxed.store`. Assisted-by: OpenCode (Gemini 4 Neon)
|
Ran the Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build. Both tests pass, and this machine takes the path the PR guards: the run logs Not tested: the destroy path on a driver that accepts the session (this one refuses it), RDNA2/RDNA4 and Intel GPUs, Wine, release profile. AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - built the PR's head commit from a clean tree and ran the tests on this machine; no local changes were made. |
|
Thanks for testing @Aniseto! Quick note: one of those 2 tests (\stale_delete_on_destroy_does_not_evict_newer_disk_store) is the regression test added by this PR — it directly exercises the fallback \SetDeleteOnDestroy\ / \disk_stores()\ ABA eviction path (which is only used by the fallback session itself) and fails without the \Arc::ptr_eq\ check. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
NVIDIA test report for
|
|
merge-check Regression run main: merged PR tree: |
|
merge-check Tested Targeted runner: Wine
Zero targeted skips. Negative controls fail at The same 12 completed-harness failures occur on both sides in Separate source worktrees and final target directories; source hashes, test inventories and distinct executable hashes verified. An initial shared-target attempt reused the base executable; it was rejected and excluded from all PR results above. Not tested Native Windows/MSVC, retail titles, AI use Codex (GPT-6, exact serving variant not exposed) reviewed the diff, prepared the verbatim-test negative control, ran the comparisons, verified source/binary provenance and drafted this report. Publication authorized by the account owner. |
|
merge-check claim |
|
merge-check |
|
merge-check claim Claiming for a tie-break: the three checks on this head disagree because one was run under Wine (x86_64-pc-windows-gnu), where both library harnesses abort. A native Windows run on the same head should settle whether that verdict reflects the PR or the environment. |
|
merge-check |
|
No open or merged PR makes the same change: main's AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
In
shader_cache_session::release, whendelete_on_destroywas set on a disk-mode session,disk_stores().lock().unwrap().remove(&k)removed keykunconditionally. If two sessionsS1andS2shared the same storeArc1withSetDeleteOnDestroy(), releasingS1removedk,S3opened a fresh storeArc2forkand cached shaders in it, and releasingS2later evictedS3's newerArc2fromdisk_stores().This removes
kfromdisk_stores()only when the currently storedArcis stillArc::ptr_eqtoboxed.store.What is in it
crates/xcl/src/hle/d3d12x/shader_cache_session.rs: checkArc::ptr_eq(cur, &boxed.store)before removingkfromdisk_stores(); add unit teststale_delete_on_destroy_does_not_evict_newer_disk_store(verified failing withDXGI_ERROR_NOT_FOUNDbefore the fix).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 777 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 2no wave64—gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware; 1no heap windows—heap_window_out_of_memory_falls_back_to_the_switch_form)cargo test -p xcl --lib shader_cache_session: 2 passed, 0 failed (stale_delete_on_destroy_does_not_evict_newer_disk_storefailed before the fix)Regression run
main:
PR:
Not tested
AI use
shader_cache_session.rs, wrote the fix and unit test, ran the test suite andscripts/smoke.ps1regression runs, and drafted this PR description.