AGC (NVIDIA RTX 4060, Windows): agc_driver_graphics intermittently copies a sparse block's newly committed tail as zeros when the block lands inside the guest arena range #24860
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 boykopovar/AnyPS5. Originally posted by ShootanoJumper on 2026-11-21T07:39:32Z.
agc_driver_graphics(andagc_graphics_profile_draw, same binary) fails intermittently on Windows inspaceCommittedPagesTests(added in #6955):Hardware: Windows 11 Education 23H2 (10.0.22631), AMD Ryzen 7 5700X, NVIDIA RTX 4060. Main at
b9526c7424.How often: it failed in both full
ctest --parallel 6runs I made while 16 spinning threads loaded the CPU, and in none of 3 idle full runs. Running six copies ofagc_driver_graphics_tests.exeat once under the same load reproduced it 23 times. Failures came in whole rounds: all six runs in a round failed, or none did. Alone, the test passed every time, idle or loaded.What differs in failing runs: where
reserveSparse'sVirtualAlloc(nullptr, 3 * 64 KiB, MEM_RESERVE, ...)places the block.0x10000 + 0xfbffff0000here), e.g.0x1510000,0x10a0000,0xb700000xfc0...The low addresses are gaps in host regions the arena left alone at startup, which become free once whatever owned them is released.
Local diagnostics at the failing check (not part of any PR):
rebuiltGeneration+1, no hit), so it was not served stale.acquireMirrorreturned null), so it was copied.backedheld only the head piece (backed=1, buffer2 * 64 KiB + 256bytes), even though the tail was committed and filled with0x72before the build.0.In passing runs the same build had
backed=2and a3 * 64 KiBbuffer.So the commit made by
VirtualAlloc(block + 2 * unit, unit, MEM_COMMIT, ...)inside the test'sMutationwas not seen byDescribeCommittedwhen the block sat inside the arena range. That points at the page-state cache inGuestMemory.cpp(describePages/PageSpan), whose arena span covers these host gaps. Commits there come from the host, not the arena, so the arena's access observer never reports them, and the emptyMutationrecords no changed range.I have not confirmed this. A direct probe (commit a stack page in a host region after
DescribeCommittedhas seen it uncommitted) read back correctly on main. I also have no deterministic reproduction, because I can't create a free gap inside the arena range on demand. Skippingpages.recordfor runs that overlapGuestArenaHostRegionOverlaps_nid_postfixis a candidate fix. I could not verify it: no gap came up in the 48 runs after I made the change.AI-assisted: yes