Tests: one submission at a time across the suite (no_write_is_lost_with_port_7 failed beside refreshed_ranges_hold_title_memory) #382
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!382
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-382"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@felicerosella on GitHub · 2026-11-26 22:58 UTC · original
felicerosella:fix/one-submission-in-tests→a-publier· +14 −3 · 2 files · 1 commits · openwatch::port7_tests::no_write_is_lost_with_port_7fails now and then in the parallelvictory-gpusuite, withround N, page P: X is not after Xfrom its submission thread. It is another test's doing, not port 7's.Cause.
ask_onceends whatever asking stands, as it should with the runtime's one submission thread. The tests that play the submission each kept to that in their own way, or not at all:host::refresh_tests::submission: a mutex of its own (static ONE)host::refresh_tests::unchanged_ranges_are_known: a retry "if a submission of another test ended it"watch::tests::the_rest_of_the_one_asking_has_a_number_of_its_own: nothingSo
refreshed_ranges_hold_title_memory'sask_onceended the port-7 test's asking mid-round, and that test then read a page's write with a number it had already seen.Fix (test code only).
watch::submission_in_test()is one lock for all of them:unchanged_ranges_are_known'slookandthe_rest_of_the_one_asking_has_a_number_of_its_ownhold it;I left
unchanged_ranges_are_known's retry loop in place to keep the change small.Results on
a-publierat4eb6cfd, RTX 4070 SUPER, Ryzen 7 7800X3D, Windows 11 26200:no_write_is_lost_with_port_7+refreshed_ranges_hold_title_memory(--exact), 20 runscargo test -p victory-gpu --lib, 10 runsIn the full suite it only shows up now and then. It came up once in 4 full runs on this machine while I was testing something else.
cargo clippy -p victory-gpu --all-targets -- -D warningsis clean.AI-assisted: yes (Claude Code)
ask_once ends whatever asking stands, as the runtime's one submission thread may. Tests that play the submission each had their own way of keeping to that: host::refresh_tests::submission a mutex of its own, unchanged_ranges_are_known a retry "if a submission of another test ended it", the port-7 test and the_rest_of_the_one_asking_has_a_number_of_its_own nothing. Run together, one test's ask_once ended another's asking in the middle, and the port-7 test read a page's write with the number it had already seen ("round N, page P: X is not after X"). watch::submission_in_test is one lock for all of them: the host helper's mutex becomes it, unchanged_ranges_are_known's look and the_rest_of_the_one_asking_has_a_number_of_its_own hold it, and the port-7 test's submission thread holds it for each round (its other threads still ask and write meanwhile). Test code only. Co-Authored-By: Claude Opus 5.5 <[email protected]>@MamaLeVrai on GitHub · 2026-11-27 00:22 UTC · original
Tested on an RX 6950 XT 16 GB (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release, at
3ed1953:cargo test --release -p victory-gpu --lib396 passed, 0 failed, 34 ignored.AI-assisted (Claude Code); no game data.
@lvndrpup on GitHub · 2026-11-27 03:31 UTC · original · reviewed
Tested on an RTX 3060 Ti 8 GB, Ryzen 5 5600X, 32 GB, Windows 11 build 26300, Rust 1.98.1, debug. On
4eb6cfd,no_write_is_lost_with_port_7besiderefreshed_ranges_hold_title_memoryfailed in 10 of 10 runs; with3ed1953, in 0 of 10. It merges cleanly with #446 and #450, andcargo test -p victory-gpu --lib -- watch:: host::refresh_testsfailed in 0 of 30 runs with #450, and in 0 of 30 with #446 and #450.One more caller:
host::card_steps::tests::the_card_copies_what_is_recordedis not ignored and submits throughhost.execute(card_steps.rs:1202).HostQueue::submitthen callswatch::ask_once(host.rs:5840) andask_once_end(host.rs:5898) withoutsubmission_in_test(), so it can still end the asking of a test that holds the guard. A throwawayeprintln!inask_onceshowed one call per run on this card. I have not seen a failure from it, since the window is one call a run. Taking the guard at the top of that test (let _one = crate::watch::submission_in_test();) would close it.submitnever takes the guard, so this cannot deadlock. I tried that one line on top of this PR, #446 and #450, andcargo test -p victory-gpu --lib -- host::card_steps watch::port7_tests host::refresh_testspassed in 5 of 5 runs (17 tests each).@lvndrpup on GitHub · 2026-11-27 04:14 UTC · original
More data, from the whole
victory-gpulib test binary run directly with default test threads, which is where these failures show. RTX 3060 Ti 8 GB, Windows 11 build 26300, Rust 1.98.1, debug, 30 runs each, alternating:a-publier4eb6cfdhost::refresh_tests::unchanged_ranges_are_known(3),watch::port7_tests::no_write_is_lost_with_port_7(3), both in one run4eb6cfd+ this PR + #446 + #450So with this PR,
unchanged_ranges_are_knownis covered too. #446 lists it as still failing now and then: itslookclosure is one of the places that now takessubmission_in_test().descriptor::host::tests::views_off_their_elements_get_a_copy_of_their_bytes, the other one #446 names, did not fail in any of these 60 runs.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.