Repository navigation
Conversation
|
Tested the change at d827520 on Windows with an RX 7900 XT, on a downstream XCL stack that includes #1422 and a local direct texture upload change. Both split-segment tests and the existing in-flight allocator lifetime test passed individually. The release build passed. I ran one game comparison per build with the same saved Series X profile, separate copies of the same populated DXIL/PSO caches, two DXC workers, a 28 GiB whole-job limit, and the same scripted Player1 selection at 33 s.
With the patch, at 256 allocator replacements the runtime logged 197 created and 197 put aside. The warm control ended before that counter appeared. An earlier run with the control executable and different cache history reached 256 replacements with 184 put aside. These counts include in-flight work and do not isolate a leak. The later run still had a dark captured frame. I could not verify a visible world or player control. One run per variant does not establish a timing improvement. |
|
Independent Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB) test report for Tested
Regression run PR head ( Not tested: debug build, AI use: Antigravity ( |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
# Conflicts: # crates/xcl/src/hle/d3d12x/title_list.rs
…_list::release ABA Two bugs in title_list segment and wrapper lifecycle: - When a title_list split onto an extra PC segment and later returned that segment to `spares` via Reset or KickoffX, `alloc_pool::forget_list` was never called on the retired segment. The segment stayed in its backing allocator's `users` set indefinitely, preventing that backing allocator from being reused and leaking new PC allocators on every Reset. - In `title_list::release`, after `f(pc)` freed the primary PC list, `WRAPPER_OF.remove(&pc)` and `bind::forget(pc)` ran unconditionally. If another thread created a new command list that reused the freed `pc` address in the window after `f(pc)`, the old wrapper's cleanup detached the new wrapper and wiped the new list's bind state. Call `alloc_pool::forget_list(list)` inside `list_x::clear_segment_state` (covering both `title_list::reset` and `KickoffX`) and before releasing spare segments; in `title_list::release`, only remove `WRAPPER_OF` entries still mapped to `this` and skip redundant `bind::forget(pc)` when `pc` was adopted (already cleaned up inside `real::cl_release`). Assisted-by: OpenCode (Gemini 4 Neon)
d827520 to
0bfea00
Compare
Integrates split-segment alloc_pool unpin + title_list ABA guard (xcl-dev#1453), allocator-put-aside memory retention (xcl-dev#1422), and forget-PSO-before-free (xcl-dev#2422). Preserves UnadoptGuard in list_x reset paths and xcl-dev#2320 kickoff target switching. Assisted-by: Antigravity (Gemini 4 Neon)
|
Test report: #1453's diff (head That failure is the second bug this PR fixes. In a failing run on Tested
Not tested
AI use: Claude Code (Claude Opus 5.5) found the cause, ran the measurements and wrote this report. |
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
…ease `heap_release`, `mem_heap_release`, `q_release` and `alloc_release` called the driver's Release first and, when it returned 0, removed what XCL keeps by the object's address. Once the driver has freed the object, another thread can create a new one at the same address and record its own entries; the cleanup then removes those. For an ID3D12Heap that is worse than lost bookkeeping: `mem_heap_release` takes the new heap's `HEAP_UMA` entry and frees its block of unified memory while the new heap's buffers live in it. A descriptor heap loses its console slots, a queue or an allocator its list_x / alloc_pool entries. `release_taking_first` takes a reference first; when AddRef returns 2 the caller holds the last one, so the entries are removed while the address is still this object's, and what must outlive the object (the heap's memory block, a descriptor heap's slots and shadow) is freed after the last Release, as before. `console_heap::unregister` is split into `take` and `free` for that. The command list and pipeline releases have the same order; xcl-dev#2691, xcl-dev#1453 and xcl-dev#2422 change those (xcl-dev#2690). Assisted-by: Claude Code (Claude Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Test report: passes on NVIDIA merged onto current Tested
Not tested
Claude Code (Claude Opus 5.5) ran the tests and wrote this report. |
|
Source review of 1. The spare pool's in-flight check may lose its data. This PR adds 2. Our flake looks like yours. On an AMD iGPU (RDNA2, Ryzen 7 9800X3D), with the AI use: Gemini (Antigravity) found point 1 in a review; Claude Code (Claude Opus 5.5) checked it against |
…ease `heap_release`, `mem_heap_release`, `q_release` and `alloc_release` called the driver's Release first and, when it returned 0, removed what XCL keeps by the object's address. Once the driver has freed the object, another thread can create a new one at the same address and record its own entries; the cleanup then removes those. For an ID3D12Heap that is worse than lost bookkeeping: `mem_heap_release` takes the new heap's `HEAP_UMA` entry and frees its block of unified memory while the new heap's buffers live in it. A descriptor heap loses its console slots, a queue or an allocator its list_x / alloc_pool entries. `release_taking_first` takes a reference first; when AddRef returns 2 the caller holds the last one, so the entries are removed while the address is still this object's, and what must outlive the object (the heap's memory block, a descriptor heap's slots and shadow) is freed after the last Release, as before. Two last-but-one releases at once both miss `AddRef == 2`; the one whose Release ends at 0 then takes the entries after the object is gone, as before this change, so nothing is left behind. `console_heap::unregister` is split into `take` and `free`. The command list and pipeline releases have the same order; xcl-dev#2691, xcl-dev#1453 and xcl-dev#2422 change those (xcl-dev#2690). Assisted-by: Claude Code (Claude Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The repetition counts promised in 7186429674: this PR removes the flake on our AMD iGPU. AMD Radeon integrated graphics (RDNA2) of a Ryzen 7 9800X3D, Windows 11, debug,
Every failure was Point 1 of my earlier comment (the spare pool's Not tested: NVIDIA (never seen to fail there, 0 of 11 earlier runs); a title. AI use: Claude Code (Claude Opus 5.5) ran the arms and wrote this. |
Apply thehollowedone's patch and reference-count regression from xcl-dev#2622 comment 7187891221. A list whose Close failed cannot be reset, so release it rather than losing its owner on later spare reuse, and clear its dispatch-chain predecessor. Adjust the suggested initial-refusal Release call to use the adopted vtable too: cl_release must clean address-keyed state instead of bypassing it through orig_fn. This is the same lifecycle class discussed in xcl-dev#1453 and xcl-dev#2691. Assisted-by: Codex (GPT-6.1-Sol)
|
NVIDIA test report for
|
|
Focused follow-up on head I extended the existing On Windows 11 build 26300, RTX 3080 Ti / driver 621.35, Ryzen 7 9800X3D, rustc 1.99.1 MSVC, The production correction already exists in #1071, so I suggest coordinating that shared change rather than implementing it twice. The test below adds end-to-end coverage of Focused regression diff against #1453@@ -6677,6 +6677,11 @@
let (second, again) = submit();
assert_eq!(reset(w, a, 0, second[0]), 0);
let (third, again3) = submit();
+ let second_pending = super::super::alloc_pool::in_flight(second[0] as usize);
+ let recycled_while_pending = super::super::title_list::pop_spare(w);
+ if let Some(p) = recycled_while_pending {
+ super::super::title_list::put_spare(w, p);
+ }
gate.Signal(1).unwrap();
@@ -6689,6 +6694,8 @@
let how = if newer_layout { "Reset #139" } else { "Reset #10" };
assert_eq!(second.len(), 1);
+ assert!(second_pending, "a retired stand-in must remain in flight until its submission finishes");
+ assert!(recycled_while_pending.is_none(), "a pending stand-in must not be recycled from spares");AI use: Codex (GPT-6.2 Sol) inspected the paths, wrote and ran the regression, checked both outcomes, and drafted this comment. Codex (GPT-6.2 Astra) independently reviewed the lifecycle and located the overlapping #1071 fix. |
|
Independent desktop NVIDIA verification of PR #1453 at head Environment
Targeted release tests & build (
|
| Command | Result |
|---|---|
cargo test --release -p xcl --lib reset_releases_retired_split_segment_from_alloc_pool -- --nocapture |
1 passed; 0 failed; 0 ignored; 1223 filtered out (0.02s) |
cargo test --release -p xcl --lib release_does_not_remove_reused_pc_from_wrapper_map -- --nocapture |
1 passed; 0 failed; 0 ignored; 1223 filtered out (0.02s) |
cargo test --release -p xcl --lib hle::d3d12x::title_list:: -- --test-threads=4 (3 consecutive runs) |
5 passed; 0 failed; 0 ignored; 1219 filtered out × 3 (0.02s, 0.02s, 0.02s) |
cargo test --release -p xcl --lib hle::d3d12x::list_x:: -- --test-threads=1 (3 consecutive runs) |
34 passed; 0 failed; 0 ignored; 1190 filtered out × 3 (0.70s, 0.65s, 0.64s) |
cargo test --release -p xcl --lib hle::d3d12x::list_x:: -- --test-threads=4 (8 runs on 0bfea00e vs. 5 runs on unmodified exact parent 06c9f550) |
7/8 passed on 0bfea00e; 4/5 passed on unmodified exact parent 06c9f550 (same pre-existing parallel CreateCommandQueue failure, see note below) |
cargo build --release -p xcl --bin xcl |
Clean build (1m 06s, exit 0) |
Note on parallel list_x:: -- --test-threads=4 isolation: In 1/8 parallel runs on 0bfea00e, mid_list_write64_wait64_split_avoids_cycle_and_reuses_spares panicked at CreateCommandQueue (list_x.rs:6731) with HRESULT(0x8007000E) (E_OUTOFMEMORY), cascading HRESULT(0x887A0005) (DXGI_ERROR_DEVICE_REMOVED) to 3 concurrent GPU tests (rotating_queue_self_deadlock_and_non_monotonic_rescue_do_not_hang, timestamps_outside_unified_memory_land_after_the_queue, cross_queue_wait64_before_signal_does_not_deadlock_submit_thread). Rerunning the exact same command on unmodified parent 06c9f5505f63f10c5ec49ef932d75b2c28177324 reproduced the exact same 4-test CreateCommandQueue 0x887A0005 (DXGI_ERROR_DEVICE_REMOVED) failure in 1/5 runs (list_x.rs:6730 / 5882). Under --test-threads=1, list_x:: passed 3/3 (34/0/0). This confirms the parallel CreateCommandQueue contention is pre-existing on 06c9f550 and not a PR #1453 regression.
Paired quiet 60 s retail smoke (title: 29640639)
Exact parent & merge-base (06c9f5505f63f10c5ec49ef932d75b2c28177324, cached baseline on the same machine):
xcl-smoke v1
commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1588 (PresentX 1589)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14452 MB
PR #1453 (0bfea00ee34df738436dbf2d2f098b6c36f2ed1e):
xcl-smoke v1
commit: 0bfea00ee34df738436dbf2d2f098b6c36f2ed1e
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1578 (PresentX 1578)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14428 MB
Runtime log observations (xcl.log)
9205log lines,0[ERROR]/ device-removal / panic lines.- Final draw/memory telemetry in log:
19474 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample14427 MB committed by the process; video memory 6115 MB local, 4650 MB non-local; sparse pools 896 MB (838 MB mapped).
Limits of coverage
- Retired split-segment unpinning from
alloc_poolandtitle_list::releaseABA guarding passed via both targeted tests, 3×title_list:: -- --test-threads=4(5/0/0), 3×list_x:: -- --test-threads=1(34/0/0), and the paired 60 s retail smoke (title: 29640639). - No high-iteration concurrent pointer-reuse stress loop (e.g. 400×) was run, and the pre-existing
06c9f550parallelCreateCommandQueuecontention (1/8on PR,1/5on unmodified parent) prevented clean unbounded parallellist_x::stress on this older base.
AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
Fixes two lifecycle bugs in
title_listsplit segments and wrapper release:title_listsplit onto an extra PC segment and later returned that segment tosparesviaResetorKickoffX,alloc_pool::forget_listwas never called on the retired segment. The segment stayed pinned in its backing allocator'susersset indefinitely, preventing reuse of that backing allocator and leaking new PCID3D12CommandAllocators on subsequentResets.title_list::release, afterf(pc)freed the primary PC command list,WRAPPER_OF.remove(&pc)andbind::forget(pc)ran unconditionally. If another thread created a new command list that reused the freedpcheap address in the window afterf(pc), the old wrapper's cleanup detached the new wrapper and wiped the new list'sbindstate.This calls
alloc_pool::forget_list(list)insidelist_x::clear_segment_state(covering bothtitle_list::resetandKickoffX) and before releasing spare segments; intitle_list::release, it only removesWRAPPER_OFentries still mapped tothisand skips the redundantbind::forget(pc)whenpcwas adopted (already cleaned up insidereal::cl_release).What is in it
crates/xcl/src/hle/d3d12x/list_x.rs: callalloc_pool::forget_list(list)inclear_segment_state.crates/xcl/src/hle/d3d12x/title_list.rs: guardWRAPPER_OFremoval against address reuse, skip redundantbind::forget(pc)for adopted lists, forget spare segments fromalloc_poolbefore release, and add unit testsreset_releases_retired_split_segment_from_alloc_poolandrelease_does_not_remove_reused_pc_from_wrapper_map(both verified failing before the fix).Since the last push: rebased onto
main06c9f55. The conflicts were in the test module (main'snewer_layout_slot_139_resets_primary_and_reclaims_split_segmentsandslot_139_keeps_the_title_caller_for_the_backing_layout_guard, both kept) and inrelease's loop, wheremainiteratesextra_active,sparesandfirst: the PR's ABA guard now applies to all three.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): 1267 passed, 0 failed, 46 ignored (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses,no heap windows, andcannot disable the driver cache (Windows Developer Mode is required))cargo test -p xcl --lib title_list: 3 passed, 0 failed (both new tests failed before the fix)Regression run
main (
426a5a7, clean tree, no local changes):PR (
0bfea00, clean tree, no local changes):(The main block is
426a5a7, an ancestor of the currentmain, from the same machine and data folder.)Not tested
AI use
main06c9f55, resolved the conflicts, ran the suite and thescripts/smoke.ps1pair at the head above.