Repository navigation
Conversation
queue_slot_18_before_the_layout_is_known_writes_8_bytes passed a bare number (0x5EED_0000) as the title's fence to a Signal at queue xcl-dev#14. That Signal goes on to the title-fence bookkeeping: list_x's sync graph and fence_x keep the fence, and later queue calls from other threads ask it for its completed value (prune_title_fence -> GetCompletedValue). In a parallel run, a list_x test that checks for cycles after this test called through 0x5EED_0000 and the test process ended with STATUS_ACCESS_VIOLATION (xcl-dev#1487). One thread at a time it never showed: list_x's tests run before real's. The test now uses a static fence object whose GetCompletedValue answers u64::MAX, so the bookkeeping drops its signal the first time it looks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GonZiin
left a comment
There was a problem hiding this comment.
I independently reproduced the access violation and verified the fix on an AMD RX 9070 XT.
Tested
- Windows 11 Pro build 26300, Ryzen 7 7800X3D, Radeon RX 9070 XT (driver 32.0.32029.2010), Rust 1.100.0 MSVC, debug.
- Used
cargo test -p xcl --lib -- --exact --test-threads=32 <queue test> <list test>with the queue slot 18 test and each ofcross_queue_cycle_and_same_queue_fifo_do_not_deadlockandcross_queue_wait64_before_signal_does_not_deadlock_submit_thread. Four executions per pair. Baseb7aa9f3bd212088e0d927439284dc5ed325ce3c7ended with0xC0000005in all eight executions. Head1362129345ac91609bf8048361472f3f6bd6652epassed both tests in all eight executions. cargo test -p xcl --lib -- --test-threads=32at the PR head reported 722 passed, 0 failed, 21 ignored and 0 reported GPU skips.- The current PR description job asks for smoke blocks because the test lives inside
real.rs. I ran the description checker with the current body on Linux. It reports two smoke-block errors by default and zero errors with test-only approval. A maintainer can apply thetest-onlylabel after checking the diff.
Not tested
Workspace-wide and retail smoke runs for this revision.
AI use
Codex (gpt-6.2-sol) ran the tests and wrote this report.
|
Test report on an RTX 5070 (Blackwell, 32-lane waves): with this PR the parallel lib runs stop crashing. #1456 was applied too, see below. Tested
Not tested
AI use: Claude Code (Claude Opus 5.5) ran the builds and runs, read the dump and drafted this report. |
|
NVIDIA test report for head Tested
Not tested
Other
AI use: Claude Code with Claude Opus 5.5 ran the tests and wrote this report. I checked the results. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
The Otherwise, a smoke pair ( |
|
Regression pair for Tested
this PR, Not tested
AI use: Claude Code (Claude Opus 5.5) ran the pair on this machine and wrote this; no person read the logs. |
|
Thanks, Kalmarv: the pair is in the description under Regression run, with credit. |
|
Tested
cargo test -p xcl --lib --locked --no-run
$slot = 'hle::d3d12x::real::queue_tests::queue_slot_18_before_the_layout_is_known_writes_8_bytes'
$cycle = 'hle::d3d12x::list_x::tests::cross_queue_cycle_and_same_queue_fifo_do_not_deadlock'
$wait64 = 'hle::d3d12x::list_x::tests::cross_queue_wait64_before_signal_does_not_deadlock_submit_thread'
cargo test -p xcl --lib --locked -- --exact --nocapture --test-threads=1 $slot
cargo test -p xcl --lib --locked -- --exact --nocapture --test-threads=32 $slot $cycle
cargo test -p xcl --lib --locked -- --exact --nocapture --test-threads=32 $slot $wait64
Not tested Old baseline, full lib or workspace suite, retail smoke, release build, and other adapters. AI use Codex in T3 Code ( |
Refs #1487: the
0xC0000005part. The test-thread count doesn't matter; the order the tests happen to run in does.hle::d3d12x::real::queue_tests::queue_slot_18_before_the_layout_is_known_writes_8_bytesregisters a bare number,0x5EED_0000, as one of the title's fences and sends a Signal of it through queue slot #14. That Signal goes on to the title-fence bookkeeping:list_x::note_title_queue_signalputs the fence into the sync graph'stitle_fences, andfence_x::note_queue_signalinto its map. Nothing takes it out again. The nextlist_xcall that looks for cycles (break_cycles_before_title_signaland the check before a Wait64 signal) walkstitle_fencesand callsprune_title_fence. That callsGetCompletedValue()through0x5EED_0000, and the process ends withSTATUS_ACCESS_VIOLATION. With one test thread it never shows, becauselist_x's tests run beforereal's.Test-only.
What is in it
crates/xcl/src/hle/d3d12x/real.rs,queue_tests: the test's fence is a static object that lives as long as the process. ItsGetCompletedValueanswersu64::MAX, so the bookkeeping drops its signal at the first look. Its other methods returnE_NOTIMPL. The test's own checks are unchanged.Tested
NVIDIA GeForce RTX 3070, driver 616.56; Windows 11 Pro 26100; Rust 1.100.0 MSVC; debug;
mainb7aa9f3.main,cargo test -p xcl --lib -- --test-threads=32: 2 of 2 runs ended with0xc0000005. Narrowed down by running subsets: justhle::d3d12x::real::andhle::d3d12x::list_x::together crash 4 of 4 runs, and each alone passes. The smallest set is this test plus one oflist_x::tests::cross_queue_cycle_and_same_queue_fifo_do_not_deadlock/cross_queue_wait64_before_signal_does_not_deadlock_submit_thread(--exact, 32 threads): 4 of 4 crash on each pair.This head: both pairs 4 of 4 pass;
real::+list_x::4 of 4 pass. Whole library suite: 3 runs at 32 threads, 2 at 16 and 2 at the default count, with no access violation.--test-threads=1: 721 passed, 1 failed (the XAudio2 test below, while another process ran the XAudio2 tests), 21 ignored.Checked independently on AMD by GonZiin (Tests: the queue slot 18 test signals a fence object that is complete (#1487) #1523 (review)), thanks: RX 9070 XT, driver 32.0.32029.2010. The two pairs crashed in 8 of 8 runs on
b7aa9f3and passed 8 of 8 on this head;cargo test -p xcl --lib -- --test-threads=32at this head gave 722 passed, 0 failed, 21 ignored.Also on an RTX 5070 by marquezinii (Tests: the queue slot 18 test signals a fence object that is complete (#1487) #1523 (comment)), thanks: with
--test-threads=32,main9e3831ehad the access violation in 9 of 10 runs, and with Tests: the sparse VRAM test's scalar loads take no s0 offset #1456 and this PR in 0 of 10. Their procdump of a crashed run stops inlist_x::prune_title_fence→ID3D12Fence::GetCompletedValue, reading0x5eed0000, called fromcross_queue_cycle_and_same_queue_fifo_do_not_deadlock: the path described above.RTX 5090 by Bullet18x (Tests: the queue slot 18 test signals a fence object that is complete (#1487) #1523 (comment)), thanks:
--test-threads=32, 10 runs on this head with no access violation.main9e3831ehad 1 in 10, Tests: stop leaking imported heap resource references #1520's head 3 in 10.main+ Tests: stop leaking imported heap resource references #1520 + Tests: the queue slot 18 test signals a fence object that is complete (#1487) #1523 + Tests: wait for the late release before freeing the coherent buffer test's heap (#1487) #1590, 25 runs: none. Device removals (0x887A0006) in 5 of 45 runs on every branch, this one included, look unrelated.Still flaky after this (not fixed here)
hle::xaudio2::tests::opus_source_voice_decodes_and_manages_lifetime/xma2_source_voice_decodes_and_manages_lifetime: one of the two failed in each of the 32- and 16-thread runs above. The failing assert isSTARTED == CTX1 + CTX2: no buffer started within the test's 3 s. On this PC that is the machine, not XCL. Opening the default audio output here takes 1 to 2.5 minutes: a run ofclamped_and_silenced_buffers_accepted_by_windows_xaudio2alone passed in 151 s, against 57 ms forengine_from_the_system_dll, which opens no device. The PC has many virtual and Bluetooth outputs. Theopus_…/xma2_…tests give the voice 3 s, so they fail here even one at a time. Whether that is also what Intermittent access violations during parallel library tests on Windows 11 #1487's machine saw, I can't tell.readback_routing_tests::coherent_buffer_sanitizes_console_flags_and_statefailed once (16 threads) atassert_ne!(VirtualFree(mem, 0, MEM_RELEASE), 0), theleft != rightassert from Intermittent access violations during parallel library tests on Windows 11 #1487: fixed in Tests: wait for the late release before freeing the coherent buffer test's heap (#1487) #1590.Regression run
The change is test-only (all inside
real.rs's#[cfg(test)] mod queue_tests), so the release build is unchanged. The pair below is by Kalmarv (comment), thanks: RTX 5070 Ti 16 GB, driver 610.74,scripts/smoke.ps1, 60 s each,mainat this PR's merge-baseb7aa9f3, then this head. No device removal or crash in either run. Not checked in these runs: whether the fake-fence path was taken.main:
PR:
Not tested
AI use
🤖 Generated with Claude Code