D3D12.X: unpin retired split segments from alloc_pool and guard title_list::release ABA #1443

Closed
b3IKK wants to merge 1 commit from upstream-pr/1453 into main
b3IKK commented 2026-11-24 16:19:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-24T16:19:44Z.


Fixes two lifecycle bugs in title_list split segments and wrapper release:

  • 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 pinned in its backing allocator's users set indefinitely, preventing reuse of that backing allocator and leaking new PC ID3D12CommandAllocators on subsequent Resets.
  • In title_list::release, after f(pc) freed the primary PC command list, WRAPPER_OF.remove(&pc) and bind::forget(pc) ran unconditionally. If another thread created a new command list that reused the freed pc heap address in the window after f(pc), the old wrapper's cleanup detached the new wrapper and wiped the new list's bind state.

This calls 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, it only removes WRAPPER_OF entries still mapped to this and skips the redundant bind::forget(pc) when pc was adopted (already cleaned up inside real::cl_release).

What is in it

  • crates/xcl/src/hle/d3d12x/list_x.rs: call alloc_pool::forget_list(list) in clear_segment_state.
  • crates/xcl/src/hle/d3d12x/title_list.rs: guard WRAPPER_OF removal against address reuse, skip redundant bind::forget(pc) for adopted lists, forget spare segments from alloc_pool before release, and add unit tests reset_releases_retired_split_segment_from_alloc_pool and release_does_not_remove_reused_pc_from_wrapper_map (both verified failing before the fix).

Since the last push: rebased onto main 06c9f55. The conflicts were in the test module (main's newer_layout_slot_139_resets_primary_and_reclaims_split_segments and slot_139_keeps_the_title_caller_for_the_backing_layout_guard, both kept) and in release's loop, where main iterates extra_active, spares and first: the PR's ABA guard now applies to all three.

Tested

  • hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (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, and cannot 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):

xcl-smoke v1
commit: 426a5a745db4d5e4b037449ede0b70cb342f5192
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1642 (PresentX 1642)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15158 MB

PR (0bfea00, clean tree, no local changes):

xcl-smoke v1
commit: 0bfea00ee34df738436dbf2d2f098b6c36f2ed1e
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1638 (PresentX 1639)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16322 MB

(The main block is 426a5a7, an ancestor of the current main, from the same machine and data folder.)

Not tested

  • AMD GPUs and native wave64 hardware
  • other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine

AI use

  • OpenCode, Claude Fable 5.2: rebased onto main 06c9f55, resolved the conflicts, ran the suite and the scripts/smoke.ps1 pair at the head above.
<!-- greyfinch-sync:ivall/xcl:issue:5476032038 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-24T16:19:44Z. --- Fixes two lifecycle bugs in `title_list` split segments and wrapper release: - 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 pinned in its backing allocator's `users` set indefinitely, preventing reuse of that backing allocator and leaking new PC `ID3D12CommandAllocator`s on subsequent `Reset`s. - In `title_list::release`, after `f(pc)` freed the primary PC command list, `WRAPPER_OF.remove(&pc)` and `bind::forget(pc)` ran unconditionally. If another thread created a new command list that reused the freed `pc` heap address in the window after `f(pc)`, the old wrapper's cleanup detached the new wrapper and wiped the new list's `bind` state. This calls `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`, it only removes `WRAPPER_OF` entries still mapped to `this` and skips the redundant `bind::forget(pc)` when `pc` was adopted (already cleaned up inside `real::cl_release`). **What is in it** - `crates/xcl/src/hle/d3d12x/list_x.rs`: call `alloc_pool::forget_list(list)` in `clear_segment_state`. - `crates/xcl/src/hle/d3d12x/title_list.rs`: guard `WRAPPER_OF` removal against address reuse, skip redundant `bind::forget(pc)` for adopted lists, forget spare segments from `alloc_pool` before release, and add unit tests `reset_releases_retired_split_segment_from_alloc_pool` and `release_does_not_remove_reused_pc_from_wrapper_map` (both verified failing before the fix). **Since the last push**: rebased onto `main` `06c9f55`. The conflicts were in the test module (`main`'s `newer_layout_slot_139_resets_primary_and_reclaims_split_segments` and `slot_139_keeps_the_title_caller_for_the_backing_layout_guard`, both kept) and in `release`'s loop, where `main` iterates `extra_active`, `spares` and `first`: the PR's ABA guard now applies to all three. **Tested** - hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (`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`, and `cannot 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): ``` xcl-smoke v1 commit: 426a5a745db4d5e4b037449ede0b70cb342f5192 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1642 (PresentX 1642) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15158 MB ``` PR (`0bfea00`, clean tree, no local changes): ``` xcl-smoke v1 commit: 0bfea00ee34df738436dbf2d2f098b6c36f2ed1e gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1638 (PresentX 1639) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16322 MB ``` (The main block is `426a5a7`, an ancestor of the current `main`, from the same machine and data folder.) **Not tested** - AMD GPUs and native wave64 hardware - other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine **AI use** - OpenCode, Claude Fable 5.2: rebased onto `main` `06c9f55`, resolved the conflicts, ran the suite and the `scripts/smoke.ps1` pair at the head above.
crosettiremi commented 2026-11-24 17:06:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by crosettiremi on 2026-11-24T16:39:42Z.


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.

Last 2 s sample containing a present Terminal event
Without #1453 96.3 s Guest write to address zero at +0x23cf683
With #1453 238.2 s Guest breakpoint at +0x2474606 after 248 s; sampled process commit reached 28,052 MB

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.

<!-- greyfinch-sync:ivall/xcl:comment:7138012773 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1453#issuecomment-7138012773). Originally posted by [crosettiremi](https://github.com/crosettiremi) on 2026-11-24T16:39:42Z. --- 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. | | Last 2 s sample containing a present | Terminal event | |---|---:|---| | Without #1453 | 96.3 s | Guest write to address zero at +0x23cf683 | | With #1453 | 238.2 s | Guest breakpoint at +0x2474606 after 248 s; sampled process commit reached 28,052 MB | 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.
LocranKing commented 2026-11-24 17:06:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-24T16:55:26Z.


Independent Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB) test report for d827520e3d4741137e4b569fde77e415024cb186.

Tested

  • Commit: d827520e3d4741137e4b569fde77e415024cb186 (clean tree, merge-base b7aa9f3)
  • Hardware / software: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (8024 MiB VRAM, driver 32.0.16.2101), rustc 1.100.0 (x86_64-pc-windows-msvc, MSVC 14.44.35207), DXC 1.9.2602.17 (SDK 10.0.26100.0), --release
  • cargo build --release --workspace: ok (exit 0)
  • cargo test --workspace --release --no-fail-fast -- --test-threads=4: 772 passed, 0 failed, 41 ignored, exit 0
    • New tests passed: hle::d3d12x::title_list::tests::reset_releases_retired_split_segment_from_alloc_pool, hle::d3d12x::title_list::tests::release_does_not_remove_reused_pc_from_wrapper_map
    • SKIPPED (no wave64): gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware

Regression run
main baseline (b7aa9f3bd212088e0d927439284dc5ed325ce3c7):

xcl-smoke v1
commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1508 (PresentX 1508)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14730 MB

PR head (d827520e3d4741137e4b569fde77e415024cb186):

xcl-smoke v1
commit: d827520e3d4741137e4b569fde77e415024cb186
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1597 (PresentX 1597)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14706 MB

Not tested: debug build, XCL_SAMPLE_* tests on this branch, AMD / native wave64 hardware, extended gameplay sessions past 60 s.

AI use: Antigravity (Gemini 4 Hydrogen) ran the build, tests, and smoke runs and drafted this report from the command outputs.

<!-- greyfinch-sync:ivall/xcl:comment:7138415896 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1453#issuecomment-7138415896). Originally posted by [LocranKing](https://github.com/LocranKing) on 2026-11-24T16:55:26Z. --- Independent Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB) test report for `d827520e3d4741137e4b569fde77e415024cb186`. **Tested** - Commit: `d827520e3d4741137e4b569fde77e415024cb186` (clean tree, merge-base `b7aa9f3`) - Hardware / software: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (`8024 MiB VRAM`, driver `32.0.16.2101`), `rustc 1.100.0` (`x86_64-pc-windows-msvc`, MSVC `14.44.35207`), DXC `1.9.2602.17` (SDK `10.0.26100.0`), `--release` - `cargo build --release --workspace`: ok (`exit 0`) - `cargo test --workspace --release --no-fail-fast -- --test-threads=4`: **772 passed, 0 failed, 41 ignored**, exit `0` - New tests passed: `hle::d3d12x::title_list::tests::reset_releases_retired_split_segment_from_alloc_pool`, `hle::d3d12x::title_list::tests::release_does_not_remove_reused_pc_from_wrapper_map` - `SKIPPED` (`no wave64`): `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` **Regression run** `main` baseline (`b7aa9f3bd212088e0d927439284dc5ed325ce3c7`): ``` xcl-smoke v1 commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7 gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1508 (PresentX 1508) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14730 MB ``` PR head (`d827520e3d4741137e4b569fde77e415024cb186`): ``` xcl-smoke v1 commit: d827520e3d4741137e4b569fde77e415024cb186 gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1597 (PresentX 1597) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14706 MB ``` **Not tested:** debug build, `XCL_SAMPLE_*` tests on this branch, AMD / native wave64 hardware, extended gameplay sessions past 60 s. **AI use:** Antigravity (`Gemini 4 Hydrogen`) ran the build, tests, and smoke runs and drafted this report from the command outputs.
DavidM1911 commented 2026-11-24 19:07:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:52:48Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7141280472 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7141280472). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T18:52:48Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
SergeAx commented 2026-11-26 04:07:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SergeAx on 2026-11-26T03:11:24Z.


Test report: #1453's diff (head 0bfea00) applied onto main b49be183, measured on the parallel-only failure of list_x::tests::a_dispatch_with_a_pipeline_still_building_waits_at_the_submit reported in #42.

That failure is the second bug this PR fixes. In a failing run on main, an instrumented bind::forget removed the dispatch test's stand-in state (pso == 0x7E57_D001) on the thread of a_reset_while_the_last_submit_runs_records_on_another_pc_list, from title_list::release's bind::forget(pc). A split segment the dispatch test had just made had the address of the reset test's freed primary list. bind::dispatch then saw no pending pipeline and stopped splitting (273, 289, 301 or 5 segments instead of 421).

Tested

  • NVIDIA GeForce RTX 5080 (driver 621.14), AMD Ryzen 5 3500X, Windows 10 Pro 22H2 (19045.6466), D3D12 Agility SDK 1.620.2, Rust 1.100.0, debug
  • The xcl lib test binary run as --test-threads=4 hle::d3d12x::list_x, the builds alternating run by run: the dispatch test failed in 13 of 200 runs on main and in 0 of 400 with this PR.
  • Other failures: in 8 of the 400 runs with this PR, another list_x test could not create a queue or allocator (E_OUTOFMEMORY, 0x8007000E). The same error came on a build without this PR too (main plus another change); main itself had 1 other failure in 200 runs, output not kept.

Not tested

  • The full suite and a title with this PR; AMD and Intel GPUs; Windows 11

real::cl_release still forgets a list after the runtime frees it (the same order, with a shorter window); that is not this PR's to fix.

AI use: Claude Code (Claude Opus 5.5) found the cause, ran the measurements and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7181476062 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7181476062). Originally posted by [SergeAx](https://github.com/SergeAx) on 2026-11-26T03:11:24Z. --- Test report: #1453's diff (head `0bfea00`) applied onto `main` `b49be183`, measured on the parallel-only failure of `list_x::tests::a_dispatch_with_a_pipeline_still_building_waits_at_the_submit` reported in #42. That failure is the second bug this PR fixes. In a failing run on `main`, an instrumented `bind::forget` removed the dispatch test's stand-in state (`pso == 0x7E57_D001`) on the thread of `a_reset_while_the_last_submit_runs_records_on_another_pc_list`, from `title_list::release`'s `bind::forget(pc)`. A split segment the dispatch test had just made had the address of the reset test's freed primary list. `bind::dispatch` then saw no pending pipeline and stopped splitting (273, 289, 301 or 5 segments instead of 421). **Tested** - NVIDIA GeForce RTX 5080 (driver 621.14), AMD Ryzen 5 3500X, Windows 10 Pro 22H2 (19045.6466), D3D12 Agility SDK 1.620.2, Rust 1.100.0, debug - The xcl lib test binary run as `--test-threads=4 hle::d3d12x::list_x`, the builds alternating run by run: the dispatch test failed in 13 of 200 runs on `main` and in 0 of 400 with this PR. - Other failures: in 8 of the 400 runs with this PR, another `list_x` test could not create a queue or allocator (`E_OUTOFMEMORY`, `0x8007000E`). The same error came on a build without this PR too (`main` plus another change); `main` itself had 1 other failure in 200 runs, output not kept. **Not tested** - The full suite and a title with this PR; AMD and Intel GPUs; Windows 11 `real::cl_release` still forgets a list after the runtime frees it (the same order, with a shorter window); that is not this PR's to fix. AI use: Claude Code (Claude Opus 5.5) found the cause, ran the measurements and wrote this report.
DavidM1911 commented 2026-11-26 06:06:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:27:32Z.


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

<!-- greyfinch-sync:ivall/xcl:comment:7183502817 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7183502817). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T05:27:32Z. --- 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
sage-sage commented 2026-11-26 08:04:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by sage-sage on 2026-11-26T07:40:24Z.


Test report: passes on NVIDIA merged onto current main, and with #2691 the dispatch flake from #2690 did not show in 300 parallel runs. Head 0bfea00e merged locally onto main b49be18 (clean, merge 289952d).

Tested

  • RTX 4080 SUPER (driver 621.40), Ryzen 5 7600X, Windows 11 26H2 build 26300.10075, rustc 1.100.0 MSVC, DXC 1.9.2602.17 (Windows SDK 10.0.26100), debug build
  • cargo test --workspace -- --test-threads=4 on main + this PR: 1437 passed, 0 failed, 47 ignored; on main + #2691 + this PR: 1438 passed, 0 failed, 47 ignored
  • SKIPPED: 29 lines, the same as on main on this machine (wave64, debug layer, Developer Mode, heap windows)
  • main + #2691 + #1453 merged locally (fc8561d), the lib test binary with hle:: --test-threads=12, 300 runs: a_dispatch_with_a_pipeline_still_building_waits_at_the_submit failed 0 times. On main (with only a test-only acphal change, #2700) the same setting failed it 32 times in 300 runs. The other failures in the 300 were acphal::tests::xapu_connect_returns_oom_and_cleans_up_on_failure (5), a test-only flake #2700 fixes.

Not tested

  • This PR's head as it is (187 commits behind main); this PR without #2691 under the stress run; no game; AMD / Intel.

Claude Code (Claude Opus 5.5) ran the tests and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7185709794 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7185709794). Originally posted by [sage-sage](https://github.com/sage-sage) on 2026-11-26T07:40:24Z. --- **Test report: passes on NVIDIA merged onto current `main`, and with #2691 the dispatch flake from #2690 did not show in 300 parallel runs.** Head `0bfea00e` merged locally onto `main` `b49be18` (clean, merge `289952d`). **Tested** - RTX 4080 SUPER (driver 621.40), Ryzen 5 7600X, Windows 11 26H2 build 26300.10075, rustc 1.100.0 MSVC, DXC 1.9.2602.17 (Windows SDK 10.0.26100), debug build - `cargo test --workspace -- --test-threads=4` on `main` + this PR: 1437 passed, 0 failed, 47 ignored; on `main` + #2691 + this PR: 1438 passed, 0 failed, 47 ignored - SKIPPED: 29 lines, the same as on `main` on this machine (wave64, debug layer, Developer Mode, heap windows) - `main` + #2691 + #1453 merged locally (`fc8561d`), the lib test binary with `hle:: --test-threads=12`, 300 runs: `a_dispatch_with_a_pipeline_still_building_waits_at_the_submit` failed 0 times. On `main` (with only a test-only acphal change, #2700) the same setting failed it 32 times in 300 runs. The other failures in the 300 were `acphal::tests::xapu_connect_returns_oom_and_cleans_up_on_failure` (5), a test-only flake #2700 fixes. **Not tested** - This PR's head as it is (187 commits behind `main`); this PR without #2691 under the stress run; no game; AMD / Intel. Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
KDenKC commented 2026-11-26 09:07:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-26T08:18:07Z.


Source review of 0bfea00e, no run yet. Two things:

1. The spare pool's in-flight check may lose its data. This PR adds alloc_pool::forget_list(list) to list_x::clear_segment_state (list_x.rs:857). title_list::reset calls that for every segment it has just moved to b.spares (title_list.rs:~185-196). forget_list removes the segment's last_submit (alloc_pool.rs:92), and with it its recordings and its entry in the backing's users. But a title may reset a list while its last submission still runs, and pop_spare decides reuse with alloc_pool::in_flight(p) (title_list.rs:285), which reads that same last_submit. So a retired segment still on the GPU now looks idle and can be taken and reset at once. That is the case the check is there for. Keeping last_submit (and the recordings) until the segment is really released or done, and clearing only the list's own state here, would keep the guard working.

2. Our flake looks like yours. On an AMD iGPU (RDNA2, Ryzen 7 9800X3D), with the list_x fixtures pointed at it, a_dispatch_with_a_pipeline_still_building_waits_at_the_submit failed once in 6 parallel runs. The skipped dispatches showed pipeline 0x0 instead of the stand-in, and it gave 317 segments instead of 421. The standalone and serial runs passed. That matches what you describe (273/289/301 instead of 421). We'll run main, #2691, this PR, and both together, 50 times each on that iGPU, and post the counts here.

AI use: Gemini (Antigravity) found point 1 in a review; Claude Code (Claude Opus 5.5) checked it against 0bfea00e and main and wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7186429674 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7186429674). Originally posted by [KDenKC](https://github.com/KDenKC) on 2026-11-26T08:18:07Z. --- Source review of `0bfea00e`, no run yet. Two things: **1. The spare pool's in-flight check may lose its data.** This PR adds `alloc_pool::forget_list(list)` to `list_x::clear_segment_state` (`list_x.rs:857`). `title_list::reset` calls that for every segment it has just moved to `b.spares` (`title_list.rs:~185-196`). `forget_list` removes the segment's `last_submit` (`alloc_pool.rs:92`), and with it its `recordings` and its entry in the backing's `users`. But a title may reset a list while its last submission still runs, and `pop_spare` decides reuse with `alloc_pool::in_flight(p)` (`title_list.rs:285`), which reads that same `last_submit`. So a retired segment still on the GPU now looks idle and can be taken and reset at once. That is the case the check is there for. Keeping `last_submit` (and the recordings) until the segment is really released or done, and clearing only the list's own state here, would keep the guard working. **2. Our flake looks like yours.** On an AMD iGPU (RDNA2, Ryzen 7 9800X3D), with the `list_x` fixtures pointed at it, `a_dispatch_with_a_pipeline_still_building_waits_at_the_submit` failed once in 6 parallel runs. The skipped dispatches showed pipeline `0x0` instead of the stand-in, and it gave 317 segments instead of 421. The standalone and serial runs passed. That matches what you describe (273/289/301 instead of 421). We'll run `main`, #2691, this PR, and both together, 50 times each on that iGPU, and post the counts here. AI use: Gemini (Antigravity) found point 1 in a review; Claude Code (Claude Opus 5.5) checked it against `0bfea00e` and `main` and wrote this.
KDenKC commented 2026-11-26 10:06:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-26T09:12:07Z.


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, XCL_ADAPTER=amd with a test-only fixture change so the list_x devices honour it (the fixture printed the AMD adapter on every run), cargo test -p xcl --lib list_x -- --test-threads=4. Up to 50 runs per arm; an arm stopped at its third failure.

arm runs failed segments in the failures (421 expected)
main b49be18 5 3 337, 75, 55
+ #2691 (008fc961) 11 3 51, 77, 81
+ this PR (0bfea00e) 50 0
+ both 50 0

Every failure was a_dispatch_with_a_pipeline_still_building_waits_at_the_submit, with Dispatch with a pipeline that has no translated console shader (0x0) skipped: the stand-in's state was gone, as you describe. The two PRs merge cleanly together.

Point 1 of my earlier comment (the spare pool's last_submit) still stands. These tests don't reach it.

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.

<!-- greyfinch-sync:ivall/xcl:comment:7187584120 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7187584120). Originally posted by [KDenKC](https://github.com/KDenKC) on 2026-11-26T09:12:07Z. --- **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, `XCL_ADAPTER=amd` with a test-only fixture change so the `list_x` devices honour it (the fixture printed the AMD adapter on every run), `cargo test -p xcl --lib list_x -- --test-threads=4`. Up to 50 runs per arm; an arm stopped at its third failure. | arm | runs | failed | segments in the failures (421 expected) | |---|---:|---:|---| | `main` `b49be18` | 5 | 3 | 337, 75, 55 | | + #2691 (`008fc961`) | 11 | 3 | 51, 77, 81 | | + this PR (`0bfea00e`) | 50 | 0 | | | + both | 50 | 0 | | Every failure was `a_dispatch_with_a_pipeline_still_building_waits_at_the_submit`, with `Dispatch with a pipeline that has no translated console shader (0x0) skipped`: the stand-in's state was gone, as you describe. The two PRs merge cleanly together. Point 1 of my earlier comment (the spare pool's `last_submit`) still stands. These tests don't reach it. 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.
thehollowedone commented 2026-11-26 16:03:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-26T16:03:49Z.


Focused follow-up on head 0bfea00e: I reproduced the retired-stand-in fence issue from the earlier review through the actual wrapper spare path.

I extended the existing a_reset_while_the_last_submit_runs_records_on_another_pc_list test. While the queue was held behind its fence, the second stand-in had been moved to spares. At that point in_flight(second[0]) was false and pop_spare(w) returned a pending list. The test restores that pointer before releasing the gate, so it never resubmits a busy list. With #1071's release_recording behavior substituted locally for clear_segment_state's forget_list, the same test passed. That helper removes the backing pin while retaining the submit record used by the spare check.

On Windows 11 build 26300, RTX 3080 Ti / driver 621.35, Ryzen 7 9800X3D, rustc 1.99.1 MSVC, cargo test --offline --locked -p xcl --lib a_reset_while_the_last_submit_runs_records_on_another_pc_list -- --test-threads=1: 0 passed, 1 failed with only the added assertions on #1453; 1 passed, 0 failed with the retirement change and #1071's small helper. No skips in either run. No full suite or retail run on this combined, uncommitted experiment.

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 title_list::reset → spare selection for both wrapper layouts; #1071's current test checks release_recording directly.

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.

<!-- greyfinch-sync:ivall/xcl:comment:7197129609 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7197129609). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-26T16:03:49Z. --- Focused follow-up on [head `0bfea00e`](https://github.com/xcl-dev/xcl/commit/0bfea00ee34df738436dbf2d2f098b6c36f2ed1e): I reproduced the retired-stand-in fence issue from [the earlier review](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7186429674) through the actual wrapper spare path. I extended the existing `a_reset_while_the_last_submit_runs_records_on_another_pc_list` test. While the queue was held behind its fence, the second stand-in had been moved to `spares`. At that point `in_flight(second[0])` was false and `pop_spare(w)` returned a pending list. The test restores that pointer before releasing the gate, so it never resubmits a busy list. With [#1071's `release_recording` behavior](https://github.com/xcl-dev/xcl/pull/1071) substituted locally for `clear_segment_state`'s `forget_list`, the same test passed. That helper removes the backing pin while retaining the submit record used by the spare check. On Windows 11 build 26300, RTX 3080 Ti / driver 621.35, Ryzen 7 9800X3D, rustc 1.99.1 MSVC, `cargo test --offline --locked -p xcl --lib a_reset_while_the_last_submit_runs_records_on_another_pc_list -- --test-threads=1`: **0 passed, 1 failed** with only the added assertions on #1453; **1 passed, 0 failed** with the retirement change and #1071's small helper. No skips in either run. No full suite or retail run on this combined, uncommitted experiment. 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 `title_list::reset` → spare selection for both wrapper layouts; #1071's current test checks `release_recording` directly. <details><summary>Focused regression diff against #1453</summary> ```diff @@ -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"); ``` </details> 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.
upipibi commented 2026-11-26 16:06:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-26T15:57:56Z.


NVIDIA test report for 0bfea00: 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 on the head as it is (on 06c9f55, not merged with main): 1189 passed, 0 failed, 26 ignored; all 5 title_list and 34 list_x tests ok. 25 SKIPPED: 21 no wave64, 3 wave32 per-lane forms the translator refuses (#1426), 1 pso_measurement_compiles_an_exact_synthetic_record without Developer Mode. None is in this PR's files.
  • reset_releases_retired_split_segment_from_alloc_pool and release_does_not_remove_reused_pc_from_wrapper_map, --exact --test-threads=1 --nocapture, 3 runs each: 6/6 passed, 0 SKIPPED.
    Lib tests only; no title run. Not tested: the spare-pool last_submit case from KDenKC's review.
    AI-assisted (Claude Code, Claude Opus 5.5).
<!-- greyfinch-sync:ivall/xcl:comment:7196993961 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7196993961). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-26T15:57:56Z. --- NVIDIA test report for `0bfea00`: 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` on the head as it is (on `06c9f55`, not merged with `main`): 1189 passed, 0 failed, 26 ignored; all 5 `title_list` and 34 `list_x` tests ok. 25 SKIPPED: 21 `no wave64`, 3 wave32 per-lane forms the translator refuses (#1426), 1 `pso_measurement_compiles_an_exact_synthetic_record` without Developer Mode. None is in this PR's files. - `reset_releases_retired_split_segment_from_alloc_pool` and `release_does_not_remove_reused_pc_from_wrapper_map`, `--exact --test-threads=1 --nocapture`, 3 runs each: 6/6 passed, 0 SKIPPED. Lib tests only; no title run. Not tested: the spare-pool `last_submit` case from KDenKC's review. AI-assisted (Claude Code, Claude Opus 5.5).
Decodere commented 2026-11-26 23:44:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T23:44:12Z.


Independent desktop NVIDIA verification of PR #1453 at head 0bfea00ee34df738436dbf2d2f098b6c36f2ed1e (1 commit; exact parent & merge-base: 06c9f5505f63f10c5ec49ef932d75b2c28177324, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (0bfea00e)

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)

  • 9205 log 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 sample 14427 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_pool and title_list::release ABA 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 06c9f550 parallel CreateCommandQueue contention (1/8 on PR, 1/5 on unmodified parent) prevented clean unbounded parallel list_x:: stress on this older base.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7205808162 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7205808162). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-26T23:44:12Z. --- Independent desktop NVIDIA verification of **PR #1453** at head `0bfea00ee34df738436dbf2d2f098b6c36f2ed1e` (`1` commit; exact parent & merge-base: `06c9f5505f63f10c5ec49ef932d75b2c28177324`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted release tests & build (`0bfea00e`) | 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`) - `9205` log 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 sample `14427 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_pool` and `title_list::release` ABA 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 `06c9f550` parallel `CreateCommandQueue` contention (`1/8` on PR, `1/5` on unmodified parent) prevented clean unbounded parallel `list_x::` stress on this older base. *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
throny commented 2026-11-27 06:08:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T06:08:33Z.


Two contributors checked independently and found that #1071 #2707 #2936 solves the same problem in a different way: #1607, group D147. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

<!-- greyfinch-sync:ivall/xcl:comment:7211253745 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7211253745). Originally posted by [throny](https://github.com/throny) on 2026-11-27T06:08:33Z. --- <!-- xcl-1607-hint:D147 --> Two contributors checked independently and found that #1071 #2707 #2936 solves the same problem in a different way: #1607, group D147. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
throny commented 2026-11-28 03:16:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T03:16:36Z.


merge-check claim
head: 0bfea00ee3

<!-- greyfinch-sync:ivall/xcl:comment:7232941492 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7232941492). Originally posted by [throny](https://github.com/throny) on 2026-11-28T03:16:36Z. --- merge-check claim head: 0bfea00ee34df738436dbf2d2f098b6c36f2ed1e
throny commented 2026-11-28 03:30:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T03:30:29Z.


merge-check
base: 753e8b1a
head: 0bfea00ee3
merge: clean on 753e8b1a; conflicting on the current main
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1514 passed, 0 failed, 47 ignored (on 753e8b1a; GitHub now shows the PR as conflicting with the current main) (26 SKIPPED lines); base alone: 1512 passed, 0 failed, 47 ignored
review: blocking, read in the code and not reproduced: the PR adds alloc_pool::forget_list(list) to list_x::clear_segment_state. On main forget_list also removes the list's last_submit entry, and title_list::pop_spare picks a spare by !alloc_pool::in_flight(p), which reads last_submit. kickoff_x calls clear_segment_state on segments it has just submitted, so once their last_submit is gone pop_spare can hand such a segment out at once and it is recorded and submitted again while the GPU still runs it. #2936 does the same unpin with a function that keeps last_submit, so this PR's first part duplicates #2936 in the unsafe form. The other hunks look right: the wrapper guard against address reuse, and skipping bind::forget for adopted lists. Open from the thread and unexplained: commit grew in a tester's run and in the PR's own smoke pair.
performance: none.
verdict: not yet: drop the clear_segment_state hunk in favour of #2936's park (or merge #2936 first), rebase (it conflicts now); the release hunks could go in alone.
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7233128720 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7233128720). Originally posted by [throny](https://github.com/throny) on 2026-11-28T03:30:29Z. --- merge-check base: 753e8b1a head: 0bfea00ee34df738436dbf2d2f098b6c36f2ed1e merge: clean on 753e8b1a; conflicting on the current main build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1514 passed, 0 failed, 47 ignored (on 753e8b1a; GitHub now shows the PR as conflicting with the current main) (26 SKIPPED lines); base alone: 1512 passed, 0 failed, 47 ignored review: blocking, read in the code and not reproduced: the PR adds alloc_pool::forget_list(list) to list_x::clear_segment_state. On main forget_list also removes the list's last_submit entry, and title_list::pop_spare picks a spare by !alloc_pool::in_flight(p), which reads last_submit. kickoff_x calls clear_segment_state on segments it has just submitted, so once their last_submit is gone pop_spare can hand such a segment out at once and it is recorded and submitted again while the GPU still runs it. #2936 does the same unpin with a function that keeps last_submit, so this PR's first part duplicates #2936 in the unsafe form. The other hunks look right: the wrapper guard against address reuse, and skipping bind::forget for adopted lists. Open from the thread and unexplained: commit grew in a tester's run and in the PR's own smoke pair. performance: none. verdict: not yet: drop the clear_segment_state hunk in favour of #2936's park (or merge #2936 first), rebase (it conflicts now); the release hunks could go in alone. hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
thehollowedone commented 2026-11-28 08:36:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-28T08:36:49Z.


The primary wrapper-map guard already in #1453 head 0bfea00e is still needed on current main e429936c. This is rebase guidance for the existing PR, not a new fix: main has changed around the other hunks, and GitHub currently reports a merge conflict.

I copied this PR's release_does_not_remove_reused_pc_from_wrapper_map fixture into a local test-only overlay on clean main. It failed 0/1: native Release registered a new wrapper at the same PC address, then the old wrapper's cleanup removed that new mapping. Applying only the existing ownership guard to main passed the same test 1/1; cargo test --offline --locked -j 4 -p xcl --lib hle::d3d12x::title_list::tests -- --test-threads=1 passed 9/9, zero skips. git diff --check passed. Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, rustc 1.99.1 MSVC. This is a synthetic wrapper-lifetime test; it does not exercise the GPU.

Minimal guard on current main
@@ release(this) in crates/xcl/src/hle/d3d12x/title_list.rs
-                m.remove(&(pc as usize));
+                // Native Release may already have returned this address to the allocator.
+                if m.get(&(pc as usize)) == Some(&(this as usize)) {
+                    m.remove(&(pc as usize));
+                }

The PR's original regression can be retained on rebase. Its old spare-retirement and bind hunks should be reconciled against current main and the separate pending-submission review, rather than applied wholesale. No full workspace suite or title smoke was run on this uncommitted main-based overlay. AI use: Codex (GPT-6.2 Sol) reproduced the issue, tested the scoped guard, and wrote this note.

<!-- greyfinch-sync:ivall/xcl:comment:7236695936 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7236695936). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-28T08:36:49Z. --- The primary wrapper-map guard already in [#1453 head `0bfea00e`](https://github.com/xcl-dev/xcl/commit/0bfea00ee34df738436dbf2d2f098b6c36f2ed1e) is still needed on current [`main` `e429936c`](https://github.com/xcl-dev/xcl/commit/e429936c10a5b8aa09470ff99dfc8c8d3d8c56fd). This is rebase guidance for the existing PR, not a new fix: main has changed around the other hunks, and GitHub currently reports a merge conflict. I copied this PR's `release_does_not_remove_reused_pc_from_wrapper_map` fixture into a local test-only overlay on clean main. It failed **0/1**: native Release registered a new wrapper at the same PC address, then the old wrapper's cleanup removed that new mapping. Applying only the existing ownership guard to main passed the same test **1/1**; `cargo test --offline --locked -j 4 -p xcl --lib hle::d3d12x::title_list::tests -- --test-threads=1` passed **9/9**, zero skips. `git diff --check` passed. Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, rustc 1.99.1 MSVC. This is a synthetic wrapper-lifetime test; it does not exercise the GPU. <details><summary>Minimal guard on current main</summary> ```diff @@ release(this) in crates/xcl/src/hle/d3d12x/title_list.rs - m.remove(&(pc as usize)); + // Native Release may already have returned this address to the allocator. + if m.get(&(pc as usize)) == Some(&(this as usize)) { + m.remove(&(pc as usize)); + } ``` </details> The PR's original regression can be retained on rebase. Its old spare-retirement and bind hunks should be reconciled against current main and the [separate pending-submission review](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7197129609), rather than applied wholesale. No full workspace suite or title smoke was run on this uncommitted main-based overlay. AI use: Codex (GPT-6.2 Sol) reproduced the issue, tested the scoped guard, and wrote this note.
thehollowedone commented 2026-11-28 22:43:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-28T22:43:34Z.


Correction to my earlier main-based review: current main at 7db2f391 already has the WRAPPER_OF ownership check from 04a1768c, including guarded segment removals. The related bind cleanup and recording-retirement paths have also changed. Please treat my suggested diff as superseded and reassess #1453 against current main before applying it.

AI use: Codex (GPT-6.2 Sol) checked the current source and drafted this correction.

<!-- greyfinch-sync:ivall/xcl:comment:7246937169 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7246937169). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-28T22:43:34Z. --- Correction to my [earlier main-based review](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7236695936): current [`main` at `7db2f391`](https://github.com/xcl-dev/xcl/commit/7db2f391cefd748d47c7de63d50dd43ebb852185) already has the `WRAPPER_OF` ownership check from [`04a1768c`](https://github.com/xcl-dev/xcl/commit/04a1768c22b5cbcc555275f16628305dfbbb4585), including guarded segment removals. The related bind cleanup and recording-retirement paths have also changed. Please treat my suggested diff as superseded and reassess #1453 against current main before applying it. AI use: Codex (GPT-6.2 Sol) checked the current source and drafted this correction.
Foniass commented 2026-12-01 05:49:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:49:17Z.


Triage (#1607) – head 0bfea00

This change is already on main as commit 04a1768 (same subject, same +83/-3 in list_x.rs and title_list.rs, and both tests reset_releases_retired_split_segment_from_alloc_pool and release_does_not_remove_reused_pc_from_wrapper_map are in main's title_list.rs). Main has since moved the segment unpinning from clear_segment_state to alloc_pool::retire_recording (aa3bc6b4), which the test still covers.
Recommendation: close (superseded by main commit 04a1768).

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7302173483 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7302173483). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:49:17Z. --- **Triage (#1607)** – head 0bfea00 This change is already on main as commit 04a1768 (same subject, same +83/-3 in `list_x.rs` and `title_list.rs`, and both tests `reset_releases_retired_split_segment_from_alloc_pool` and `release_does_not_remove_reused_pc_from_wrapper_map` are in main's `title_list.rs`). Main has since moved the segment unpinning from `clear_segment_state` to `alloc_pool::retire_recording` (aa3bc6b4), which the test still covers. Recommendation: close (superseded by main commit 04a1768). AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
throny commented 2026-12-01 12:46:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:46:19Z.


Closing as superseded: this change is already on main (04a1768). added/removed lines of the PR diff are byte-identical to those of main commit 04a1768 (list_x.rs +1, title_list.rs +85/-3)

Two independent checks found this: Foniass's close list on #1607 and ours against current main. If something here is still missing on main, say so and reopen it, or ask and I will.

AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

<!-- greyfinch-sync:ivall/xcl:comment:7311622978 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1453#issuecomment-7311622978). Originally posted by [throny](https://github.com/throny) on 2026-12-01T12:46:19Z. --- Closing as superseded: this change is already on `main` (04a1768). added/removed lines of the PR diff are byte-identical to those of main commit 04a1768 (list_x.rs +1, title_list.rs +85/-3) Two independent checks found this: Foniass's close list on #1607 and ours against current `main`. If something here is still missing on `main`, say so and reopen it, or ask and I will. AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

Pull request closed

Sign in to join this conversation.
No reviewers
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!1443
No description provided.