watch: hold one_view_test in the two tests that end the asking #4619
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4619"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by upipibi on 2026-11-30T23:56:40Z.
What it changes
watch::tests::ask_rest_falls_back_per_piece_when_touching_unwatched_neighbourfails now and then in a parallelwatch::run and passes on its own (seen in #4027 and #4247 too). The cause is the test, not the code it checks.The asking that stands (
Journal::ahead,kept) is global. The test callsask_rest, then reads it back withasked, and it doesn't takeone_view_test(), the lock thatthe_rest_of_the_one_asking_has_a_number_of_its_ownand the other asking tests hold. Another test'sask_once_end()between those two calls clearsahead, andaskedreturnsNone. The result iswatched piece touching unwatched neighbour was not cached(watch.rs:5306), or onceunwatched.is_none().an_asking_begun_first_is_made_and_more_is_asked_foralso ends the asking and held no lock, so it could clear the asking under a test that holds it. Both now takeone_view_test(). No other code changes.In the layer itself,
ask_once,ask_restandask_once_endare only called from the submission thread (host.rs), so this is not a race in shipping code.How it was tested
CPU only, Ryzen 9 5950X (16 cores), Windows 11,
cargo test -p victory-gpu --lib --locked -- watch::, default parallel test threads:e15366e2(same test code as7d93ee07)unwatched.is_none())7d93ee07+ the change)ask_rest(if false && covered_to < b && …) makes the test fail 3 of 3 runs, so holding the lock doesn't make it pass on its own.many_askers_tests::no_mapping_is_lost_between_askersfailed once, atassert!(super::published(at, end))(watch.rs:7134). That test already holds the lock and is about placeholder bits, which this doesn't touch. It didn't fail in the 60 runs of main; one in 120 isn't enough to say more.cargo testpassed for the crates it touches:watch::, yes (69 passed). Fullvictory-gpusuite not run.Checked for overlap
Tested with the help of Claude Code (Claude Opus 5.5).
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tyr0nsur on 2026-12-01T00:15:57Z.
The same
unwatched.is_none()assertion failed in the Windowscheckjob for #4339 on7d93ee07plus the texture-sweep change. It matches the second failure mode in the before runs above.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Tan7rex on 2026-12-01T15:51:17Z.
Tested on Windows 11 Pro (build 26100), RTX 4090: this PR's change (
e9a6e9f0) applied ontomain5fabb46e(it applies cleanly). Release test binary ofvictory-gpu --lib,watch::filter, 500 runs each with default parallel threads.main5fabb46emain+ this PRwatch::tests::ask_rest_falls_back_per_piece_when_touching_unwatched_neighbourwatch::tests::a_late_fault_leaves_the_guard_taken_sincewatch::many_askers_tests::no_mapping_is_lost_between_askersWith this PR, none of the 500 runs had any failure. (
a_late_fault_leaves_the_guard_taken_sinceis #4704's, so its 0 here may be chance.)Not tested: the game (test-only change).
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.