Tests that stand a submission's asking take one shared lock (#534) #539
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!539
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-539"
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?
@jptorres96 on GitHub · 2026-11-27 10:30 UTC · original
jptorres96:fix-standing-asking-tests→a-publier· +14 −3 · 2 files · 1 commits · openFixes #534.
The journal's standing asking (
ask_once…ask_once_end) is process-wide. Only one thread submits in the runtime, butcargo testruns tests side by side, so one test'sask_once_endcould end another's asking mid-round.watch::STANDING_IN_TEST(test-only) is now taken byno_write_is_lost_with_port_7,the_rest_of_the_one_asking_has_a_number_of_its_own,unchanged_ranges_are_known, and the refresh tests'submission()helper, which had a lock of its own that only it took. No runtime code changes.cargo test -p victory-gpu --lib, RTX 4080 SUPER / Ryzen 5 5600X:no_write_is_lost_with_port_7,unchanged_ranges_are_known)Separate, not addressed here: in those 40 runs, two view/guard tests failed once each:
a_block_just_written_rests(watch.rs:4812) anda_write_told_at_one_view_is_reported_at_the_others(watch.rs:4735). They look like another shared-state interaction, around mappings and views. I can open an issue for them.@lvndrpup on GitHub · 2026-11-27 11:17 UTC · original · reviewed
Tested on an RTX 3060 Ti (Windows 11, debug build), base
4eb6cfdagainst head355608b.Each run put the tests that take the lock beside the tests in the GPU modules that submit work, to see whether the ones left unlocked get in the way (filter
host::refresh_tests port7_tests the_rest_of_the_one_asking resource::tests indirect::tests texture::ahead pipeline::host host::card_steps, 55 tests run):4eb6cfdno_write_is_lost_with_port_7(watch.rs:5917, "… is not after …", as in #534)355608bSo it fixes what #534 reports on this card as well.
Three things to know before merging:
refresh_tests::submission,unchanged_ranges_are_known, the port 7 test,the_rest_of_the_one_asking_has_a_number_of_its_own). This PR conflicts with #382 inhost.rsandwatch.rsand with #462 inhost.rs, so only one of the three can go in as it is. It merges cleanly with #450. One difference: here the lock is held for the whole port 7 test, askers included, where #382 and #462 hold it only around the submission thread's asking. Both work, since nothing inside takes it again.Host::submitstill takes no lock. It callsask_once(host.rs:5840, on by default) andask_once_end(host.rs:5898), and every test that callshost.executegoes through it: the ones inresource,indirect,pipeline::host,texture::aheadandhost::card_steps. #534 suggests taking the lock there undercfg(test); none of the three PRs does. Those tests ran in the same process in all 80 runs above and caused no failure, so I can only say the path is open, not that it matters. (On #462 I named only thecard_stepstest; it is all of these.)a_write_told_at_one_view_is_reported_at_the_othersis one of the tests #450 lists: an address freed during a change of mapping goes to another test's view. One full--librun on this head failed here inother_memory_at_a_guarded_address_keeps_its_protection, which MamaLeVrai traced to the same cause on #450, and ina_block_guarded_before_we_were_told_of_its_view_can_be_written. I don't know abouta_block_just_written_restsor that last one. It may be worth checking against #450 before opening an issue (#450 is mine).@MamaLeVrai on GitHub · 2026-11-27 15:56 UTC · original
Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At
355608b:victory-gpu396 passed, 0 failed, 34 ignored.AI-assisted (Claude Code); no game data.
@jptorres96 on GitHub · 2026-11-27 16:19 UTC · original
Thanks @lvndrpup and @MamaLeVrai for running it. I missed #382 and #462 before opening this; they make the same change, so only one of the three should go in. I'm happy to close this one in favour of whichever the maintainer prefers. For the record, the numbers from my RTX 4080 SUPER (Ryzen 5 5600X, Windows build 26300): base 2 of 15 full
victory-gpu --libruns failed on the two locked tests, head 0 of 40.The view/guard failures I listed belong to #450, so I won't open a separate issue for them.
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.