GPU tests: forget a view's guard state before unmapping it #769
No reviewers
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/fxceless--victory-fork!769
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-769"
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?
@larelgit on GitHub · 2026-11-25 07:05 UTC · original
larelgit:fix/watch-test-race→main· +10 −3 · 1 files · 1 commits · openwatch::tests::kernel_reads_into_guarded_blocks_after_openingfails now and then with "the kernel does not fault into our handler": in 3 of 1200 runs of the wholevictory-gputest binary here on310c6eb. On8dd30abthe same thing hit the newa_view_mapped_beside_a_guarded_one_makes_it_check_again(its firstguard()gaveSome([])instead of the two pages), once in 1200.The cause is in the tests, not in
watch.rs. Three of them unmap or free their memory first and calltitle_memory_remappedafter:kernel_reads_into_guarded_blocks_after_openinga_range_that_begins_in_an_unmapped_block_is_guardedunmapped_blocks_are_reported_once_until_mappedIn between, a test on another thread can get memory at the same address, and
guard()finds its first block still noted protected and clean inGUARDS. It takes the range for a view whose blocks are all clean and returns at once, without making anything read-only. The other test's view is then never guarded.This change calls
title_memory_remappedbefore the memory goes, asdrop_viewsandwrites_in_partly_committed_view_blocks_are_reportedalready do. Test code only.Checked
310c6ebthat reached it printed(protected, clean, absent) = (true, true, false), guard returned Some([])for the view's first block.title_memory_remapped, and maps a view of another section at the same address withMapViewOfFileEx.guard()then returnsSome([])and leaves the new view writable.Tested
The whole
victory-gpulib test binary, run in a loop, two loops at a time on a Ryzen 7 7800X3D:310c6eb310c6eb+ this8dd30abframe::tests::waits_end_on_ticks_and_count_frames8dd30ab+ thisframe::tests::waits_end_on_ticks_and_count_framesThese were runs that panicked or died; the
310c6ebbinary without this change carried the probe. The access violations (exit 139, one in 1200 with and without this change) are the known one: two GPU tests at once on WARP, as noted atONE_AT_A_TIMEin victory-shader. Theframetest is a timing test, and it failed while a build ran beside the loops.cargo clippy -p victory-gpu --all-targets -- -D warningsgives only the errors already onmain, inresource.rs,draw.rsandindirect.rs.AI use
🤖 Generated with Claude Code
@chatgpt-codex-connector[bot] on GitHub · 2026-11-25 07:05 UTC · original · edited 2026-11-25 07:07 UTC
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
4d41247ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
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.