Repository navigation
Description
Once the CI step gets past clippy (#3, #2), cargo test --workspace runs for the first time — and victory-gpu's watch tests fail intermittently, one or two per full run, never the same ones:
run A cargo test -p victory-gpu --lib 457 passed; 0 failed
run B cargo test -p victory-gpu --lib 455 passed; 2 failed watch::tests::a_block_just_written_rests
watch::tests::a_write_is_reported_at_every_checked_view
run C cargo test -p victory-gpu --lib 456 passed; 1 failed watch::port7_tests::no_write_is_lost_with_port_7
run D cargo test -p victory-gpu --lib 457 passed; 0 failed
run E cargo test -p victory-gpu --lib 457 passed; 0 failed (with my #3 applied)
run F cargo test -p victory-gpu --lib 456 passed; 1 failed watch::port7_tests::no_write_is_lost_with_port_7 (with #3)
cargo test -p victory-gpu --lib -- --test-threads=1 457 passed; 0 failed
cargo test -p victory-gpu --lib watch::tests:: 30 passed; 0 failed (three times in a row, alone)
So it is concurrency, not the diff: single-threaded is clean every time, the failures only appear while other tests run alongside, and they move between runs. The assertions that go are about counts on process-wide state — assertion \left == right` failed: nothing written yetina_block_just_written_rests, and the same shape in a_write_is_reported_at_every_checked_view`.
Two shared things are in the neighbourhood, both in crates/victory-gpu/src/watch.rs:
static GUARDS: RwLock<Guards>(line 2502) withguards()taking the write lock (2515), andguards_timed()/guards_timed_shared()taking read ones — every test that callsguard(),writable(),published()orwrites()goes through it, and the assertions compare whole bookkeeping answers (Some(vec![page])/Some(Vec::new())) rather than "the entry for this view".- real
VirtualAlloc'dMEM_WRITE_WATCHpages (two_views()), whose faults are raised by the installed handler on any thread, plus a process-wideREST_IN_TEST(thread_local!, line 2370) that some tests set to an hour and others read.
My guess — not measured — is that a test's assertions see another test's guards or faults, and that the fix is to scope the assertions to the test's own views, or to hold one test mutex for everything that touches GUARDS and real watched pages.
Why it matters: this is the first thing CI will report as red the moment clippy passes, and a run that fails one time in three teaches people to re-run instead of read.
Reproduce:
cargo test -p victory-gpu --lib --locked # a few times
cargo test -p victory-gpu --lib --locked -- --test-threads=1 # cleanWindows 11 10.0.26100, Rust 1.98.1 (rust-toolchain.toml), x86_64-pc-windows-msvc, MSVC 14.44.35207. No game files; the tests build their own pages.
AI-assisted: yes (DeepSeek Harness, lead agent) — the runs above were made with the toolchain and target the workflow uses.
Activity
github-actions commentedon Dec 1, 2026
Please attach both logs from the run that went wrong. Without them we can only guess. Paste
%LOCALAPPDATA%into the address bar of File Explorer to get there.%LOCALAPPDATA%\victory\logs\: the newestvictory-nvidia-play-<date>-<time>-<number>.log(fromvictory.exe) orvictory-nvidia-<date>-<time>.log(from the script launcher). The window shows its path at the start, on the lineLog: ....%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newestvictory-<date>-<time>-<number>.crash.login%LOCALAPPDATA%\VIctory\data\7952987A\temp\.Also say which GPU, Windows version (10 or 11)