victory-gpu's watch tests fail one or two per full run, never the same ones (concurrency; --test-threads=1 is clean) #4
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/RedLightDOWN--VIvidia#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@erdemcisse on GitHub · 2026-12-01 21:54 UTC · original
Once the CI step gets past
clippy(#3, #2),cargo test --workspaceruns for the first time — andvictory-gpu'swatchtests fail intermittently, one or two per full run, never the same ones: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 ina_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".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
GUARDSand real watched pages.Why it matters: this is the first thing CI will report as red the moment
clippypasses, and a run that fails one time in three teaches people to re-run instead of read.Reproduce:
Windows 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.
@github-actions[bot] on GitHub · 2026-12-01 21:54 UTC · original
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)
@erdemcisse on GitHub · 2026-12-02 18:39 UTC · original
Evidence for the flake/no-flake split, from the clippy branch (#3,
e90076c, rebased onmainb67c405):No
watchtest failed in that run, which supports the diagnosis here: thewatchfailures are concurrency, they vanish on one thread, and the fivegpu_ownedones do not.The same five fail on unmodified
mainb67c405on this PC (cargo test -p victory-gpu --lib --locked -- gpu_owned::tests::-> 3 passed; 5 failed), so they are pre-existing and separate from this issue; every one of them panics atassert!(shadow.carded(), …)(gpu_owned.rs:1254/1370/1433/1508/1567), i.e. the host here never reports the test buffer as placed on the card, even withVICTORY_ADAPTERnaming the discrete adapter.Multi-threaded, the whole workspace run on the same branch is 7 failed: the five above,
host::menu::tests::the_link_is_always_right_under_the_notewhenVICTORY_STREAMLINE_DIRis set (#1), andwatch::port7_tests::no_write_is_lost_with_port_7.