Tell the askers test's placeholders to the watch, as xmem does (#354) #449
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/449"
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?
Imported from TaynanGT/Vice-Tay. Originally posted by Kal0s-design on 2026-11-29T16:45:20Z.
Targets #439's branch. Test-only, one call. Refs #354.
watch::many_askers_tests::no_mapping_is_lost_between_askersfails about once in 250 to 300 runs ofhost::refresh_tests watch::under parallel load (3 failures over roughly 800 runs today), always at the lastassert!(super::published(at, end)).The captured failure. With temporary probes I caught one. Every block of the test was published except one, and that block was noted
absentbut notheld(not a known hole), though it was a placeholder hole. A probe whereprotect_herenotes a hole showed what happened:placeholder(block)answered false, and the same call right after answered true. VirtualQuery already reportedMEM_RESERVEfor that block.Why it sticks. The test reserves its placeholders itself and never calls
title_memory_placeholder, soplaceholder()falls back toNtQueryVirtualMemory(MemoryRegionInformationEx). While another thread is unmapping a view back into its placeholder, that answer can say free (MEM_FREE) or private memory for a moment. A block noted absent but not held is then never asked again whether it is a placeholder. Theunsurepass inwritesonly checks whether it was committed. It stays unpublished until the nexttitle_memory_*change for that block. Only the unmap side can stick: a remap tells before anything else and wipesabsent.Why the runtime doesn't take this path. xmem tells of every placeholder it reserves (
xmem.rs, thetitle_memory_placeholdercall afterXMemVirtualAlloc, the 32-bit heap's kind 0x42000 included), andplaceholder()reads thePLACEHOLDERSbits before asking Windows. The bit survives mapping and unmapping.title_memory_remapped,title_memory_unmappingandtitle_memory_splittingdon't touch it, and onlytitle_memory_allocatedandtitle_memory_freedforget it. xmem callstitle_memory_freedonly for a release withoutMEM_PRESERVE_PLACEHOLDER/coalesce. So the fix is the test telling of its reservation the same way.Measured. Same probe in both builds, 240 runs each side by side, counting where
placeholder()said no for a hole on the test's unnamed threads. Without the call there were 9 (7MEM_FREE, 2 private), and with it 0. The fallback query is simply not reached for this test's blocks any more. Probe lines from another test that uses non-placeholder holes on purpose were the same in both builds (240/240), so the load matched. As a regression check, 480 clean runs with the change gave no new failures. The only failures wereraw_title_copy, which this base doesn't have #443 for yet. That isn't proof by itself: at this rate 0 in 480 can happen without a fix.#402 skips this test where the placeholder query isn't answered (Wine). With the placeholders told, the test no longer needs that query, so it might run there instead. I can't check Wine.
Clippy on this branch shows only the errors #442 fixes.
cargo test -p victory-gpu --lib watch::passes (50).AI-assisted: yes
🤖 Generated with Claude Code
Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-29T19:09:13Z.
Thanks for capturing the transient placeholder-query failure and matching the fixture to xmem's registration path. The probe results are stronger evidence than the zero failures alone. Keep this test-only, preserve the final published assertion, and verify it together with #443 on the consolidated branch. Wine coverage should remain conditional until tested.
Imported from TaynanGT/Vice-Tay. Originally posted by Kal0s-design on 2026-11-29T20:03:25Z.
Verified together with #443 on
cfd5ebdunder parallel stress: 4 of 250 base runs failed (the two assertions these PRs address), 0 of 250 with both. Details and caveats on #354.AI-assisted: yes
Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-30T17:06:19Z.
mainhas moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the currentmainand open a new PR; I'll review it there.Pull request closed