Repository navigation
Conversation
Three alloc_pool tests check that a call runs outside the allocator pool's STATE lock with one STATE.try_lock(). That fails whenever another test running beside it holds STATE at that moment, whatever the code under test does: submit_marking_calls_out_unlocked_and_revalidates_the_queue_marker failed 4 of 10 runs of 'cargo test -p xcl --lib -- submit_ --test-threads=4' on main 6bfb5c5 (RTX 5090). The check now retries for up to a second (as the transferred-owner test's release already did with 10,000 yields): held by the calling thread it never succeeds, so a call made inside STATE still fails the test. A test of the helper shows both cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review (head 975a558, diff read, not a merge-check; checks red):
Fine: test-only; a call made while the calling thread holds AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
|
Closing as a duplicate of #3190, which fixes the same four checks plus the late-release race this one leaves. Thanks @Foniass for catching it, and sorry @tiagonleal, our search missed #3190. In case it helps #3190: on an RTX 5090 the AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen. |
alloc_pool::tests::submit_marking_calls_out_unlocked_and_revalidates_the_queue_markerfails intermittently onmain. It, andcompletion_queries_run_outside_allocator_state, check that a call runs outside the allocator pool'sSTATElock with oneSTATE.try_lock(). That fails whenever another test running beside it holdsSTATEat that moment (otheralloc_pooltests, andlist_x/realtests that reach it through the runtime), whatever the code under test does.The check now retries for up to a second. Held by the calling thread,
try_locknever succeeds, so a call made insideSTATEstill fails the test; held for a moment by another test, the retry waits it out.transferred_owner_is_released_once_outside_state_after_logical_forgetin the same file already retried this way (10,000 yields), so it is left as it is.What is in it (one commit, test code only)
crates/xcl/src/hle/d3d12x/alloc_pool.rs,mod tests:outside(&Mutex)(the retrying check), used at the fourSTATE.try_lock().is_ok()sites of the two tests; a test of the helper: false while this thread holds the lock, true when it is free or held by another thread for 5 ms.Tested
cargo test -p xcl --lib -- submit_ --test-threads=4(it runs beside six otheralloc_pooltests and thelist_x/bindsubmit tests):main6bfb5c51: failed 4 of 10 runs.975a558d: failed 0 of 20 runs.cargo test -p xcl --lib -- alloc_pool --test-threads=4: 28 passed, 0 failed, 0 ignored.cargo test -p xcl --lib -- --test-threads=4, 4 runs: 2757 passed, 0 failed, 31 ignored each (main, 3 runs: 2756 passed, 0 failed, 31 ignored each; this PR adds one test).cargo test --workspace --no-fail-fast -- --test-threads=4: this PR 2901 passed, 4 failed, 51 ignored;main6bfb5c51on the same machine 2900 passed, 4 failed, 51 ignored. The same 4 fail on both (incomplete_discovered_corpus_blocks_headless_title_entry,test_title_draws_with_a_root_signature_under_the_debug_layer,test_title_runs_and_game_folder_is_untouched,test_title_runs_under_the_debug_layer_with_dred). SKIPPED on both: 22 GPU testsno wave64, 2no heap windows,pso_measurement_compiles_an_exact_synthetic_record(Developer Mode off).main's 3), so its cause is not known.Regression run
#[cfg(test)] mod testsinalloc_pool.rs); it asks for thetest-onlylabel.Not tested
AI use
🤖 Generated with Claude Code