Repository navigation
Conversation
The runtime maps a view and then tells the write watch (xmem's map). A copy's refresh on another thread can guard the new blocks in between: it finds them mapped, or committed where it knew them absent. The telling then forgot them and left them read-only, so the title's next write to one was an access violation nobody takes (the handler finds the block neither guarded nor writable). A test does exactly that: it maps a view, guards it, then tells the watch. Before, the view stayed read-only and the write ended the process with STATUS_ACCESS_VIOLATION. Told of a new view, the watch now gives the write access back (title_memory_remapped). Before an unmapping it only forgets (title_memory_unmapping, new): xmem's unmap uses it, and so does map when committing the view fails and it goes back to a placeholder. The watch's tests forget their guards before their memory is freed: another test's memory could get the address and inherit them. The journal test no longer expects the address's history to be empty. Under two test binaries at once, of 200 pairs before, one run failed in the watch (a_view_mapped_beside_a_guarded_one_makes_it_check_again); none of 100 pairs and 100 plain runs after. Ported from avatarmanz/VIctory-7900XTX 160d222 (its watch part, adapted to our aliased blocks and clean sets). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tick test required the wait for the next tick to end within 50 ms, which a loaded PC exceeds at times (2 of 150 runs with compilations going). A wait ends on its tick only if the tick is no further than its time-out, and the next tick is at most one interval (2 ms) away: with a 2 ms time-out it must return S_OK, whatever the scheduler does. That is stricter than 50 ms and no longer timed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On
main, independent of #61 and #64. Split out of #64.What
935bf44Views guarded while they are mapped stay writable. Ported from avatarmanz/VIctory-7900XTX@160d222 (itswatchpart, adapted to ouraliasedblocks andcleansets). A refresh on another thread could guard a view's new blocks between the mapping and its notification. The notification then forgot them while leaving them read-only, so the title's next write was an access violation nobody caught. A test reproduced it as aSTATUS_ACCESS_VIOLATIONbefore the fix. Thewatchtests now forget their guards before freeing their memory.1240d8bframe's next-tick wait is checked by its time-out, not the wall clock.Before:
watch::tests::a_view_mapped_beside_a_guarded_one_makes_it_check_againfailed about 1 run in 100 under load. After: 0 failures in 100 pairs of thevictory-gputest binary run two at a time, plus 100 ordinary runs (measured on the #64 tree).Checks (RTX 5060, at
1240d8bonmain)cargo clippy --workspace --all-targets --locked -- -D warnings, with and without--all-features: clean.cargo test --workspace --locked: 684 passed, 0 failed, 12 ignored.🤖 Generated with Claude Code