watch: a_late_fault_leaves_the_guard_taken_since holds the guards' lock while its entry is unsettled #4705
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!4705
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4704"
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-12-01 02:35 UTC · original
upipibi:fix-late-fault-test→main· +7 −1 · 1 files · 1 commits · openWhat it changes
watch::tests::a_late_fault_leaves_the_guard_taken_sincefails now and then when the wholevictory-gpusuite runs in parallel and passes on its own. #3920, #3474 and #3723 each report it that way. The cause is the test, not the code it checks.The test pushes an
Openedentry onto the globalOPENEDqueue and then asserts that both blocks are unsettled. But any thread that takesguards()runssettlefirst, so another test's thread taking the guards' lock between the push and the assertion settles the entry:assertion failed: unsettled(block(one), block(one) + 1). It also didn't takeone_view_test(), though it maps views of its own.Now it takes
one_view_test(), and holdsguards()from before the push until those three assertions. The next block, which takesguards()to settle the entry, is unchanged; whoever settles it, the assertions that follow hold the same. Only the test changes.How it was tested
CPU only: Ryzen 9 5950X (16 cores), Windows 11,
cargo test -p victory-gpu --lib --locked, the whole library suite with default parallel threads, 20 runs each:7d93ee07(+ #4620, which touches two other tests)f5c3d243+ the change)The two mains differ by two commits, neither in
watch.rs,host.rsorshadow.rs.Other failures in those runs, not touched here:
host::uav_pool::tests::host_list_uav_pool_lifecycle_retire_trim_and_info_queue: 5 and 7 of 20 runs (also seen in #4207).host::card_steps::tests::shared_scratch_eliminates_flight_settle_end_to_end: once, on this branch.cargo testpassed for the crates it touches: yes, apart from the flakes above.Checked for overlap
Tested with the help of Claude Code (Claude Opus 5.5).
@Dukestar69 on GitHub · 2026-12-01 12:06 UTC · original · approved these changes
Reviewed crates/victory-gpu/src/watch.rs: taking one_view_test() and holding guards() across the unsettled-entry check in _late_fault_leaves_the_guard_taken_since prevents concurrent tests from settling the queue before the assertion runs. Verified on Windows: cargo test -p victory-gpu --lib watch::tests::a_late_fault_leaves_the_guard_taken_since -- --test-threads=1 (1 passed, 0 failed).
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@Tan7rex on GitHub · 2026-12-01 15:51 UTC · original
Tested on Windows 11 Pro (build 26100), RTX 4090: this PR's change (
e03346cc) applied ontomain5fabb46e(it applies cleanly). Release test binary ofvictory-gpu --lib,watch::filter, 500 runs each with default parallel threads.main5fabb46emain+ this PRwatch::tests::a_late_fault_leaves_the_guard_taken_sincewatch::tests::ask_rest_falls_back_per_piece_when_touching_unwatched_neighbour(#4620's)watch::many_askers_tests::no_write_is_lost_when_faults_take_no_lockThe test this PR fixes failed only 2 times in 500 on
mainhere, so 0 with the PR fits the fix but doesn't prove it. In 60 runs of the wholevictory-gpulibrary onmainit failed once. The oneno_write_is_lost_when_faults_take_no_lockfailure looks unrelated: this PR only changesa_late_fault_leaves_the_guard_taken_since, and that test also failed once in 300 runs with #3603 applied.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.