test(gpu): tell the guard views are unmapped in drop_views so their bits do not outlive them #559
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/lobomfz--VIctory-xmem!559
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-559"
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?
@Kal0s-design on GitHub · 2026-12-05 07:06 UTC · original
Kal0s-design:fix/watch-flaky-test→main· +6 −2 · 1 files · 1 commits · merged 2026-12-05 17:26 UTCThe watch test the_rest_of_the_one_asking_has_a_number_of_its_own failed most of the time in the full suite and passed when run alone. It panicked on "watched" because writes() returned None for a freshly allocated write-watched range.
The cause is the drop_views test helper. Before it unmaps the two views of a section it tells the guard title_memory_remapped, which reopens the blocks but leaves them in VIEWS. After the unmap the blocks are still known as view memory, so when the next VirtualAlloc in another test lands on the same address, refused_as_view says yes and writes() never asks the kernel. Logging who set VIEWS showed that every caught failure was at a block last set by a_write_is_reported_at_every_checked_view, which ends with drop_views. Three other view tests failed now and then for the same reason.
The runtime already calls title_memory_unmapping before an unmap (xmem bind), which forgets the views. drop_views now does the same, so this is a test-only change.
On one NVIDIA desktop card with MSVC, the watch tests at four threads failed in 9 of 10 runs before the change and passed 10 of 10 after. The full suite had watch failures in 2 of 3 runs before and none in 4 runs after. Four indirect and pipeline tests fail on this machine with or without the change and are not related.
AI-assisted: yes
🤖 Generated with Claude Code