watch: hold one_view_test in the two tests that end the asking #4620
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4620
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@upipibi on GitHub · 2026-11-30 23:56 UTC · original
upipibi:fix-watch-test-lock→main· +7 −0 · 1 files · 1 commits · openWhat 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 #4248 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).
@tyr0nsur on GitHub · 2026-12-01 00:15 UTC · original
The same
unwatched.is_none()assertion failed in the Windowscheckjob for #4340 on7d93ee07plus the texture-sweep change. It matches the second failure mode in the before runs above.@Tan7rex on GitHub · 2026-12-01 15:51 UTC · original
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 #4705'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.