Repository navigation
inplace test: decommit the pages again for up to two seconds (the test failed about 8 runs in 100) - #878
inplace test: decommit the pages again for up to two seconds (the test failed about 8 runs in 100)#878MamaLeVrai wants to merge 1 commit into
Conversation
warp_a_title_buffer_in_place_shows_its_bytes_at_its_offset drops its placed buffer and then decommits part of the memory under it. The host lets go of those pages a moment after the drop, and while other tests keep the device busy VirtualFree(MEM_DECOMMIT) failed with ERROR_INVALID_PARAMETER in about 8 runs in 100 of the whole test binary (0 in 100 alone). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fxceless#875 and the per-chunk clamp Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Independent confirmation of your diagnosis, from a different angle, and one negative result that may save someone an hour. I hit the same failure today on my own machine (Windows 10, software adapter) while checking a branch under four concurrent test processes rather than one binary's threads:
Same assertion, same silence: The negative result. The obvious fix is to submit one empty command list after The mechanism, for whoever reads this next. One suggestion for the message, since assert_ne!(
freed, 0,
"decommit still refused after {waits} ms: {refused} (87 means a heap from this address is still standing)"
);capturing Your two seconds and my one second are the same fix — I am not opening a competing PR; I've dropped my branch. Yours is the one to take. The only thing I'd add is the error text. |
inplace::tests::warp_a_title_buffer_in_place_shows_its_bytes_at_its_offsetfails now and then in the wholevictory-gputest binary onmain(f85101b), and never alone. On this machine (Windows 11, RX 6950 XT, Rust 1.98.1): 10 failures in 120 runs of the binary (the test alone: 0 in 100 runs).eazyvessaw the same test fail 4 in 100 runs on an RX 9070 XT in #849.Which assertion. I printed the Windows error in the failing runs. The failing line is
inplace.rs:1239,assert_ne!(mem::VirtualFree(base.add(2 * K64).cast(), K64, mem::MEM_DECOMMIT), 0), and the error isERROR_INVALID_PARAMETER(87). That line runs right afterdrop(placed).Why, as far as I can tell. I did not read the host's code; this is inferred from the behaviour: the placed buffer is a view of the test's own memory made through the device, and dropping it hands the pages back to the runtime, which lets go of them a moment later. While other tests of the binary keep the (WARP) device busy, the decommit can come before that, and it fails.
The change. The test repeats the decommit every 10 ms for up to 2 seconds and asserts it in the end, with the Windows error in the message. Only the test changes.
Checks. 250 runs of the whole
victory-gputest binary with this change: the test failed 0 times (before: 10 in 120). I did not run the other crates' tests again; nothing outside this test changes. The binary still fails for the reasons #849 fixes (the indirect budget test) and for the rare crash in #850; those are not in this PR.AI-assisted (Claude Code); no game data.
🤖 Generated with Claude Code