Watch tests: the tests that guard views of their own run one at a time (11 to 2 failures in 64 runs under load) #724
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!724
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-724"
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?
@kibagami-nc on GitHub · 2026-11-28 04:29 UTC · original
kibagami-nc:test/watch-view-guard-tests-one-at-a-time→main· +81 −0 · 1 files · 1 commits · merged 2026-11-29 08:16 UTCThe problem
The write watch's guards, views and askings are global, and its tests (
crates/victory-gpu/src/watch.rs) ran beside each other:Under load, with eight processes running the crate's tests at once and
--all-features, six different watch tests failed 11 times in 64 runs.The change
The 43 tests that map, guard or ask about views of their own now hold
one_view_test()while they run. The five pure ones (block sets, ranges, frames) do not.The lock is not taken twice by one thread, because
faults_that_take_no_lock_tell_the_sameruns ten of the other tests as part of itself.This follows hamdanpor-ctrl's TaynanGT/Vice-Tay#246, which does the same for 21 tests in that tree. That diff does not apply here: this tree has no such lock yet, and has more of these tests.
Tests
many_askers_tests::no_write_is_lost_when_faults_take_no_lock. That test is about the opt-inVICTORY_FAULT_UNLOCKEDpath and needs a look of its own.timeline::report::tests::real_waits_are_recorded_with_who_ended_them, fixed by #598.cargo test -p victory-gpu --locked --lib watch: 47 passed, in 1.1 s.cargo test -p victory-gpu --locked --lib: 453 passed, in 6.7 s, as long as before.cargo clippy -p victory-gpu --all-targets -- -D warnings, with and without--all-features, finds nothing inwatch.rs.main's own findings are fixed by #665.Tested by others
HailLucifer666 (Windows 11 26200, many cores, WARP present) reproduced it independently, without this PR: 2 failures in 10 full parallel runs of victory-gpu's tests. The failures were
what_is_put_in_beside_the_guards_is_told_at_every_viewandwhat_the_kernel_writes_through_is_not_guarded_for_another_view. Every other test passed in all ten runs, so the watch tests' shared book was the only class of failure on that machine.Tests only; nothing outside
#[cfg(test)]changes. No game files, dumps or extracted data are included.@Dukestar69 on GitHub · 2026-11-28 04:42 UTC · original · approved these changes
LGTM — verified on Windows:
cargo test -p victory-gpu --lib watch::passed (47/47 in 1.51s)cargo xtask policypassed (294 files ok)Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@HailLucifer666 on GitHub · 2026-11-29 00:30 UTC · original
Independent reproduction on the current stack head (
931610e, victory-gpu 466 tests): the watch-test class reproduced 2 failures in 10 full parallel suite runs —what_is_put_in_beside_the_guards_is_told_at_every_viewwhat_the_kernel_writes_through_is_not_guarded_for_another_view...which matches your measured rate (2 in 20 → here 2 in 10; machine: Windows 11 26200, many-core, WARP present). Everything else in the 466 passed cleanly across all ten runs, including the descriptor and save_share tests that flake for #785/#819 — so the watch-book sharing is the only flake class this machine sees. Your one-at-a-time pattern is exactly what the queue needs; supporting its merge.
@LucaruluDev on GitHub · 2026-11-29 09:41 UTC · original
Independent post-merge validation of #724 and #785
Before both PRs were merged, I completed 60 full
workspace test runs to independently evaluate their
effect on intermittent test failures.
Setup
f9dfb764094fb8)63cee83)cargo test --workspace --locked --jobs 2 --no-fail-fastResults
Excluding the deterministic asset-policy failure
since resolved by #1493:
what_the_kernel_writes_through_is_not_guarded_for_another_viewviews_off_their_elements_get_a_copy_of_their_bytesa_late_fault_leaves_the_guard_taken_sinceNeither of the two target tests failed in the
30 patched runs. This independently supports the
changes, although the aggregate failure-rate difference
is not statistically significant (two-sided Fisher
exact test, p = 1.0).
Additional observation
Patched run 3 failed in the regression test introduced
by #834:
watch::tests::a_late_fault_leaves_the_guard_taken_sinceThe assertion failed before the simulated late fault.
The current test also lacks an explicit
one_view_test()guard.This may warrant investigation into interference
between tests, but does not establish a regression
in the production fix from #834.
Limitations
baseline runs, but none of the intermittent failures.
directly to the patches.
failure that has since been resolved by #1493.
Full per-run logs, CSVs and methodology are available
on request.
Thanks to the contributors working on test stability.
AI-assisted analysis using Claude Code.