GPU tests: the release-and-re-take case of FIND-14, ignored until it is fixed #3077
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3077
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3077"
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?
@HoLa-Lee on GitHub · 2026-11-26 06:47 UTC · original
HoLa-Lee:tests/find14-release-case→main· +60 −0 · 1 files · 1 commits · closed without mergingGPU tests: the release-and-re-take case of FIND-14, ignored until it is fixed
A copy of a title buffer holds the address it was registered with and writes
back through it, and watch.rs documents that "memory freed and allocated again
while a tracker holds it is not seen". So a range the title releases - and takes
the same addresses for again - between a submission and its copy-back can have
that submission's shader bytes written into whatever holds them now.
This adds the deterministic test for it, ignored because it still fails on main:
No game, no GPU work beyond registering the copy: register a page, take the
submission's snapshot, let a shader write one byte into the copy, unregister
and VirtualFree, take the same addresses again with VirtualAlloc filled with
0xEE, then run the copy-back. It observes only when the allocator hands the same
address back and says so when it does not.
Why it is worth having while it is red: #2612 fixes FIND-14 at the runtime's own
itle_memory_remapped, which is the right hook for the reported remaps - and
this case never reaches it, because a release and re-take is not a remap. It
fails on #2612's head (
4f47bdc) exactly as it fails here, so it is the flag forthe other half: the addresses really go away in Memory's Drop (committed
resources and heaps) and in the upload block's Drop before VirtualFree.
Whoever fixes that flips this on by deleting the #[ignore]. Nothing else in the
tree changes: the test is self-contained and uses only APIs the other shadow tests
already use.
A copy of a title buffer holds the address it was registered with and writes back through it, and watch.rs documents that "memory freed and allocated again while a tracker holds it is not seen". So a range the title releases - and takes the same addresses for again - between a submission and its copy-back can have that submission's shader bytes written into whatever holds them now. This adds the deterministic test for it, ignored because it still fails on main: left: 153 (0x99, what the shader wrote for a submission that is over) right: 238 (0xEE, what the title's next use of the address held) No game, no GPU work beyond registering the copy: register a page, take the submission's snapshot, let a shader write one byte into the copy, unregister and VirtualFree, take the same addresses again with VirtualAlloc filled with 0xEE, then run the copy-back. It observes only when the allocator hands the same address back and says so when it does not. Why it is worth having while it is red: #2612 fixes FIND-14 at the runtime's own itle_memory_remapped, which is the right hook for the reported remaps - and this case never reaches it, because a release and re-take is not a remap. It fails on #2612's head (4f47bdc) exactly as it fails here, so it is the flag for the other half: the addresses really go away in Memory's Drop (committed resources and heaps) and in the upload block's Drop before VirtualFree. Whoever fixes that flips this on by deleting the #[ignore]. Nothing else in the tree changes: the test is self-contained and uses only APIs the other shadow tests already use.@Marvisak on GitHub · 2026-11-26 08:22 UTC · original
Automated triage for the maintainers.
Needs work. The test adds
a_pending_copy_back_does_not_write_into_memory_the_title_took_backtoshadow.rsas#[ignore]. It sets up a title range that is unregistered and freed between a submission's snapshot and itscopy_back. Onmain,Host::execute(host.rs) runsshadow.copy_backafter the GPU work and before the submission's deferred writes andafterwork. So the title can only free the range in that window if it frees memory a submission it has not seen finish is still writing. The PR does not show that the title does this. What would help:An ignored test for a hazard that is not shown to happen adds little on its own. It would fit better next to the fix. CI: not run.
Generated by Claude Code
@HoLa-Lee on GitHub · 2026-11-26 12:16 UTC · original
Closing: the triage is right on the part that matters, and the right place for this test is next to the fix.
The evidence point stands.
Host::executerunsshadow.copy_backafter the GPU work and before the submission's deferred writes, so a title that frees a range in that window is freeing memory a submission it has not seen finish still writes. I have not shown that the title does that, and I do not have it: what I have is the runtime remapping memory (watch::title_memory_remappedis called from the title's own paths, which is why #2612 can hook it) and a synthetic free-and-re-take. Remapping is not freeing, so the gap the test exercises is a construction of the test, not an observed behaviour.So:
FIND-14is a label in the coordination thread (#1633), not an issue - that is my mistake to have used it as if it were one - and an ignored test for a hazard nobody has seen happen does not pull its weight on its own. The test is offered in #2612, where the fix lives and where it fails on the head (0x99in0xEEat4f47bdc); if the author of #2612 wants it, it lands there with a fix beside it, and if the free-side hook is ever added it can be a PR of its own with that fix.For the record, and so the next person does not have to redo it: the reproduction is 60 lines in
shadow.rs's test module, needs no game and no GPU work beyond registering a copy, and only observes when the allocator hands the same address back.Pull request closed