Repository navigation
Conversation
Four transition barriers retained clones inside ManuallyDrop, so the test freed its backing allocation while resource references remained. Borrow the resource through the existing fence waits and add a CPU-only reference-count regression. Part of xcl-dev#1487; the specific leak was also reported in xcl-dev#175. This does not establish the cause of every parallel access violation. Assisted-by: Codex (GPT-6; exact variant unavailable)
GonZiin
left a comment
There was a problem hiding this comment.
Independent full-suite run on AMD RDNA4. Both the reference-count regression and the imported-heap GPU test passed. I checked the diff and all changed Rust lines are inside the test module.
Tested
- Head
6159773d93e826b4c328ad7174334c7a12c75541, clean checkout. Windows 11 Pro build 26300, Ryzen 7 7800X3D, Radeon RX 9070 XT (driver 32.0.32029.2010), Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug. .\scripts\test.ps1exited 0. Workspace totals were 771 passed, 0 failed, 41 ignored and 0 reported GPU skips. The bundled title end-to-end test passed.- The PR description job is asking for retail smoke blocks because the tests live inside
list_x.rs. A maintainer can apply the documentedtest-onlylabel after checking this revision.
Not tested
Retail smoke and the opt-in sample data tests.
AI use
Codex (gpt-6.2-sol) inspected the diff, ran the Windows tests, and wrote this review.
|
Test report for head Tested
Cause (same as #1590) Check Suggestion let start = std::time::Instant::now();
let mut freed = VirtualFree(mem, 0, MEM_RELEASE);
while freed == 0 && start.elapsed() < std::time::Duration::from_secs(10) {
std::thread::sleep(std::time::Duration::from_millis(5));
freed = VirtualFree(mem, 0, MEM_RELEASE);
}
assert_ne!(freed, 0, "the heap's pages were not let go within 10 s");Not tested
AI use: Claude Code with Claude Opus 5.5 ran the tests, found the cause and wrote this report. I checked each point. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
crastinator
left a comment
There was a problem hiding this comment.
Tested on RDNA2 under Wine (RADV). This also fixes the parallel device removal I traced in #1246: the VirtualFree of this test's imported memory while another test's GPU work ran on the shared device.
Tested (head 6159773, merged onto main c160d86: no conflicts)
- AMD Radeon RX 6700 XT (RDNA2, gfx1031, RADV NAVI22, Mesa 26.3.1), Ryzen 7 5700X, Linux 7.3.5. Proton Experimental 11.0-20261112's Wine, vkd3d-proton v3.1 + #257's patch (
-Db_ndebug=true, dxil-spirv53aac418), DXVK v3.1.1-209dxgi, DXC 1.9.2609.5. Cross-built forx86_64-pc-windows-msvc, Rust 1.99.1, debug. - The #1246 pair,
--test-threads=2 --exact gpu::recomp::tests::jumps_to_outer_loop_heads_are_structured hle::d3d12x::list_x::tests::write_buffer_immediate_on_open_existing_heap_visible_to_cpu:mainfails 3/3 (kernel dispatch: D3D12 device removedafter ~0.15 s). With this PR it passes 3/3. cargo test -p xcl --lib -- --test-threads=4, 2 runs: 801 / 9 / 22 and 804 / 6 / 22 (passed / failed / ignored), no device removal. The 6 are the Wine-lane set: #530 ×2, #676, #890 ×2,gpu_depth_buffer_created_for_unordered_access_is_placed(#1475). Run 1 also had the #718 trio.mainin the same setup: 795 / 14 / 22, with 5 device-removed lines (the #1246 cascade throughsparse,title_texturesandvram).- This also explains what I couldn't in #1246. Dropping every object the test made before the
VirtualFreedidn't help there, because the fourManuallyDropbarrier clones still held the resource, so the imported heap never went away.
Not tested
- Windows. A retail title (test-only change).
- Anything that needs game files: no
XCL_SAMPLE_*set.
AI use
- Claude Code (Claude Opus 5.5) ran the tests and wrote this report; I checked the results.
|
Regression run of Against the limits in CONTRIBUTING.md: 101 % of AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, AI use: Claude Code (Claude Opus 5.5) built both trees and ran |
Part of #1487. Four transition barriers in the imported-heap GPU test cloned a resource into
ManuallyDropand never released it. The test then freed the backing allocation with four resource references outstanding. This fixes that specific lifetime bug, also identified in the #175 investigation; it does not establish the cause of every intermittent access violation in #1487.What is in it
crates/xcl/src/hle/d3d12x/list_x.rs: borrow the resource in the four test barriers while its owner remains alive through the existing fence waits, checkVirtualFree, and add a CPU-only reference-count regression. All 75 changed lines are inside#[cfg(test)] mod tests.Tested
6159773d93e826b4c328ad7174334c7a12c75541, based on mainb7aa9f3; Windows 11 Home build 26300, i9-14900K, RTX 4080 SUPER, driver 32.0.16.2114, Rust 1.93.0, DXC 1.9.2609.5, debug,XCL_ADAPTER=NVIDIA. AllXCL_SAMPLE_*unset.scripts/test.ps1(workspace build and tests with four threads): 771 passed, 0 failed, 41 ignored. Includes four GPU/debug skips (two native-wave64 tests, two missing-debug-layer tests) and 33 sample-gated early returns; these are not executed coverage. Synthetic console-title e2e passed.(5, 4)after four barriers / dropping the owner, versus expected(1, 0). With the fix: 1 passed, 0 failed. Reproduce:cargo test -p xcl --lib imported_heap_test_barriers_do_not_retain_the_resource -- --nocapture.real::readback_routing_tests::coherent_buffer_sanitizes_console_flags_and_statewith two threads: 20 passed, 0 failed, 0 skipped, no access violations or stalls (0.27-0.36 seconds per pair).git diff --checkpassed.Paired-test reproduction and exact GPU/debug skips
Build with
cargo test -p xcl --lib --no-run. Run the emitted library test executable ten times, one process at a time, with these arguments (each run must report exactly two passes and no skips):Full-suite GPU/debug skips:
gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no native wave64);uploads_start_from_each_subresources_stateandtest_title_draws_with_a_root_signature_under_the_debug_layer(debug layer unavailable).Regression run
test-onlylabel under CONTRIBUTING.md. The path-based description check otherwise requests retail smoke blocks. No runtime behavior changes.Not tested
AI use