Repository navigation
Tests: the GPU-wait watchdog releases a bridged Wait64 whose producer was never submitted - #2443
tiagonleal wants to merge 2 commits into
Conversation
… was never submitted Part of xcl-dev#1452. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
|
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
One test-isolation issue: this fixture calls Could you install a small scope guard immediately after registration to run the existing cleanup on both normal return and unwind? This is especially useful for a test whose purpose is to catch a timeout/failure path. Read-only review of head |
…d assertion too The test registered its two fake command lists and the fence in the global sync graph, but released them only after its last assertion. A failed assertion left raw addresses of dropped COM objects in global state, so other tests in the same process could fail for unrelated reasons. A local guard created right after the registrations now runs the same cleanup (on_release for both lists, forget_fence_for_test, title_fences and cells entries) on normal return and on unwind, before the COM lists and the cell drop. It takes over poisoned locks instead of panicking. With a deliberate panic after the guard, only that test failed and the other 245 tests of hle::d3d12x passed in the same process. Test alone x5 and hle::d3d12x x3: pass. cargo test --workspace --no-fail-fast x2: 1353 passed, 5 failed, 46 ignored (fuzz_validate_and_gpu_0..3 and lower_dxil::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, which also fails without this change), 25 SKIPPED lines. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Focused RX 6800M report for exact PR head Tested
Not tested
AI use
|
|
Done in 84ee77d. The test now installs a guard right after the registrations, and its To check the failure path I forced a The suite counts and the two smoke blocks in the description are for the new head. |
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
Part of #1452.
A
Wait64BitValueXis bridged to a GPUqueue.Waitwhenever aWrite64BitValueXfor the same address has been recorded (try_gpu_wait). If that producer list is recorded but never submitted, the log showsprod=qNone ... wait-before-signalandrecorded=<v> submitted=0x0 completed=0x0, and the waiting queue stays blocked until the sync watchdog signals the fence on the CPU afterXCL_GPU_WAIT_TIMEOUT_MS(5 s by default). Nothing in the test suite arms a wait this way and waits for the realxcl-sync-watchdogthread: the only test of the expiry path,cpu_watchdog_signal_with_inflight_gpu_signal_completes_cleanly, signals the fence by hand.What is in it
#[cfg(test)]test incrates/xcl/src/hle/d3d12x/list_x.rs,unsubmitted_write64_producer_wait_is_released_by_the_watchdog(+82 lines, nothing outsidemod tests).Write64and a DIRECT list with the matchingWait64, arms the DIRECT list's wait on its queue throughexecute_with_waits_on(the COMPUTE list is never submitted), then signals a fence on that queue. It checks that the fence stays at 0 while the wait is armed (submitted_max == 0), that it reaches 1 after the watchdog timeout and not before, that the cell records the CPU release (no armed waits left,cpu_signaled_max == 0x677), and that the queue runs more work afterwards.OnceLockread from the environment, so the test uses whatever it resolved to (5 s by default, about 5.4 s of wall time) instead of setting a process-wide variable that could race with the other tests. Same GPU-or-WARP device setup as the neighbouring tests.It passes on main and only pins the current behaviour; no runtime code changes. It will also catch a change that stops expiring waits with no known producer, which is what #1046, #1045 and #1123 touch.
Tested
3f277701plus this commit. No game was running when the runs started.cargo test -p xcl --lib unsubmitted_write64_producer -- --nocapture: 1 passed; the log shows thebridged to GPU queue.Wait (... prod=qNone ...; wait-before-signal ...)line and thendid not complete within 5000 ms ... released on CPU. The same test binary run alone 5 times: 5/5 passed (5.3 s each).hle::d3d12xwith--test-threads=4, 3 runs: 246 passed, 0 failed, 2 ignored each time.cargo test --workspace -j 6 -- --test-threads=4, 3 runs: 1275 passed, 5 failed, 26 ignored each time; the new test passes in all 3. The 5 failures are the same on3f277701without this commit (1274 passed, 5 failed, 26 ignored):gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0to_3andgpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier. 24SKIPPEDlines per run on this adapter (no wave64and similar).Notes on the test
execute_with_waits_onstill arms thequeue.Wait):ExecuteCommandListsgoes through the queue hook, which would add the queue, blocked for 5 s, topresent::QUEUES, and the sparse tests (flush_parked...,a_tile_decommitted...) andreadback_routing_teststhen wait on it and fail when they run in that window. I found this because the first version executed the list and failed 3 other tests in a parallel run.ExecuteCommandListsalso re-entersexecute_with_waits_on, so a bridged wait can be armed twice for one list (seen with--test-threads=4); the assertions accept one or more armed waits for that reason. Observation only, not changed here.Update, second commit 84ee77d (review request)
Dropruns the cleanup on a normal return and on unwind:on_releasefor both lists, the fence, and the twoSYNC_GRAPHentries. +22/−7, still nothing outsidemod tests.panic!forced right after the guard:hle::d3d12xwith--test-threads=4gave 245 passed, 1 failed (the forced one), 2 ignored. The panic is not in the commit.hle::d3d12x3 runs, 246 passed, 0 failed each;cargo test --workspace --no-fail-fast -j 4 -- --test-threads=4twice, 1353 passed, 5 failed, 46 ignored each time (25SKIPPEDlines), the same 5 failures as above. These totals count every test binary of the workspace.Regression run
First block:
main3f277701; second: this PR's head84ee77d1; same title, built from clean trees, run again after the second commit.Not tested
XCL_GPU_WAIT_TIMEOUT_MSset to a non-default value (the value is read once per process).AI use
🤖 Generated with Claude Code