Tests: memory the suite makes anew tells the watch nothing of the old at its address #277
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!277
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-277"
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?
@GDemay on GitHub · 2026-11-26 14:11 UTC · original
GDemay:fix/test-stale-watch-state→main· +60 −0 · 2 files · 1 commits · openWhat and why
watch::tests::freed_memory_leaves_no_notesandhost::refresh_tests::unchanged_ranges_are_knownfailed together in the parallel job of run 45800018587 (both at 10:23:02), and pass in that same run's--test-threads=1job and in the three runs before it. The suite's tests impersonate many owners of one process-global, address-keyed watch state, and a fresh raw allocation can land on an address another test has just given back, inheriting its notes:guard()then skips noting a block that a staleforeignentry covers, so the notes the test reads back are not there (freed_memory_leaves_no_notes, the firstnoted()).PUBLISHEDbits say it is known, so the kernel is never asked about the test's write and all 100 retries of the one asking miss it (unchanged_ranges_are_known, "view false: written on its last page").The runtime never sees this interleaving: it is the one owner and tells of every change (
title_memory_allocated,title_memory_freed, ...); the tests' rawVirtualAllocs and placeholders tell of nothing.#[cfg(test)] pub(crate) fn title_memory_made_anew(at, len)clears what the address range's previous owner left: the guards'protected/clean/absent/held/aliased/foreignentries, theopenedmarks, thePUBLISHED/PROTECTED/BESIDEbits, and theVIEWSbits through the newforget_views. The journal needs no such call: its entries carry asking numbers, and another test's are always older than this test's (the suite's own idiom,written_pages_are_reported_to_every_asker). The three helpers that make memory anew call it: host.rs'stitle()andwith_holes(), and watch.rs'splaceholder(). Nothing outside#[cfg(test)]changes; no new switch, as there is no new behavior.Measurements or Tested
--test-threads=1in the same run: run 45800018587, Default job (both FAILED at 10:23:02); Diagnostics job: both pass. #172 saw the same class of one-off parallel flake in victory-loader.CARGO_FEATURE_PURE=1 cargo clippy -p victory-gpu --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings(and--all-features) is clean on this branch apart from theunnecessary_mut_passederror already on main (watch.rs:3626, #241) and themissing_transmute_annotationsone (#169).depth_bounds_pipeline_loads_and_filters_draws(WARP, #169); both victim tests pass in the parallel job.Not run
#[cfg(test)].AI-assisted: yes
@compaccount1-coder on GitHub · 2026-11-26 15:54 UTC · original
Results on real hardware, since CI only has WARP: RX 6700 XT (RDNA 2), Windows 11, this PR merged onto
main(c9c932c),cargo test -p victory-gpu --lib:views_are_made_beside_the_heap_and_copied_in, which fails on every RDNA 2 card onmaintoo (fixed in #298).watch::tests::freed_memory_leaves_no_notes --- FAILED, one of the two tests this PR is about. Right after it,what_the_title_puts_in_beside_a_guard_is_toldspun in its unboundedput_besideretry and never finished (the run was killed after 25 minutes, so cargo never printed the failure's message). I've opened #315 so that loop fails with a message instead of hanging.So on this card the PR doesn't break anything when the machine is quiet. But with it applied,
freed_memory_leaves_no_notesstill failed once in parallel under load. Either some recycled-address state isn't cleared yet, or that run hit something else. One run is all I have, so take it as a data point rather than a verdict.Without this PR, under the same load, I also saw
host::refresh_tests::unchanged_ranges_are_knownandwatch::tests::what_the_kernel_writes_through_is_not_guarded_for_another_viewfail once each. Both runs were on #283 merged ontomain, and #283 only changes where diagnostic files are written.AI-assisted: yes (Claude Code)
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.