watch tests: forget the views before the addresses go back (38 failing runs in 300 of the watch tests, 0 in 600 after) #962
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/963"
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?
Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T13:52:53Z.
Tests in
watch.rsfail now and then when the tests of the binary run side by side (the default). Onmain(0b0074e), RX 6950 XT (RDNA2), Windows 11 build 26300, Rust 1.98.1, running only thewatch::tests of thevictory_gputest binary (victory_gpu-….exe watch::), 300 runs: 38 failed (13kernel_reads_into_guarded_blocks_after_opening, 12a_write_told_at_one_view_is_reported_at_the_others, 9a_write_through_another_view_is_reported_at_the_guarded_one, 5writes_in_partly_committed_view_blocks_are_reported, 1a_write_is_reported_at_every_checked_view). With--test-threads=1: 0 of 200. In whole-binary runs (with #849 and #878 merged so those two do not hide them) 3 of 200 runs failed on awatch::test.The assertions that fail show pages missing or reported again, for example
left: [] right: [26709552, 26709553, 26709554],left: Some([29889239, 29889240]) right: Some([])("nothing written yet") andleft: Some([34624605, 34624606]) right: Some([34624606]).The change. Three tests (
kernel_reads_into_guarded_blocks_after_openingand the two placeholder tests) gave their addresses back (UnmapViewOfFile,VirtualFree) and only then told the guards withtitle_memory_remapped; the runtime does it the other way round, and the other tests of the module already do (drop_views,View::drop). They now call it first. Only tests change.What I did not see. I did not catch the interleaving itself. My reading is that a test beside these can map its own view at the address just given back, and the late call then clears the guards it has set there (
protected,clean,absent,viewedare by block address). The numbers say the order is the cause: the same 300-run loop went from 38 failing runs to 0 in 600 runs with the change.Not covered. The whole
victory_gpubinary still ends in a driver crash now and then on this machine, about 1 run in 10 (no test named; the Windows event log showsamdxc64.dllord3d10warp.dllas the faulting module); this PR does not touch that.harness machine: rx6950xt-w11 | AMD Radeon RX 6950 XT (RDNA2), driver 32.0.21045.29003 | 32 GB RAM | Windows 11 build 26300
AI-assisted (Claude Code); no game data.
🤖 Generated with Claude Code
Imported from fxceless/victory-fork. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T13:53:07Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from fxceless/victory-fork. Originally posted by cmt8 on 2026-11-25T15:58:32Z.
The same reorder, under Wine, confirms it here. We made the identical change to these three tests on our Linux branch (cmt8/VIctory afe67caa), after
kernel_reads_into_guarded_blocks_after_openingfailed once in 43 runs of the watch tests under Wine. With half of the change, 1 run in 70 still failed. With all of it, 0 runs in 30 failed. #769 is the same change as well.One more watch flake remains with this PR applied:
written_pages_are_reported_to_every_askerfailing withbefore.is_empty(). That one is the journal, not the guards.drop_viewstellstitle_memory_remappedbut leaves the views' pages in the journal'swrittenmap, so the next test to get that address finds them written. Over 200 runs each of the victory-gpu binary under Wine 11.22 (RX 7900 XTX):0b0074e00b0074e0+ this PRwritten_pages_..., before.is_empty())0b0074e0+ this PR + dropping the journal's pages indrop_viewsThe counts are small. The journal change is test-only and is in a separate PR (#1008) so it does not get in the way of this one.
AI-assisted (Claude Code); no game data.
Imported from fxceless/victory-fork. Originally posted by welisonzika14-jpg on 2026-11-25T16:04:32Z.
Machine: RTX 5070, driver 621.24, Windows 11, Rust 1.98.1 (MSVC).
Command: build the victory-gpu tests, then run the test binary
watch::50 times (default threads), counting runs with a failure.3973179: 2 of 50 runs failed: writes_in_partly_committed_view_blocks_are_reported 1, unmapped_blocks_are_reported_once_until_mapped 1.2009b95, merged, ee22311): 0 of 50 runs failed.Small sample (50 runs, one machine); 0/50 does not prove the flake is gone. The failure messages of the two failures were not captured.
Written with AI help (Claude/Kiro); the numbers are from runs on my machine.
Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T23:36:51Z.
Thank you both. cmt8: good that the same reorder holds under Wine, and thanks for splitting the journal part into #1008; I saw
written_pages_are_reported_to_every_askerfail once in 150 runs of another tree here too, so that one is worth its own fix. welisonzika14-jpg: 2 in 50 onmainand 0 in 50 with the change is in line with the 38 in 300 and 0 in 600 I measured.AI-assisted (Claude Code); no game data.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.