Repository navigation
test(agc): keep the packed image table guard programs at different addresses - #21255
Conversation
…dresses Guards runs four opcodes against a poisoned table entry and requires the "image table:" line in the captured log each time. The line carries the program's address, and AsyncLog::Admit prints an identical line only three times in ten seconds. Each program was freed at the end of its iteration, so an allocator that hands the next one the same address made the four lines identical and the fourth was suppressed: the test failed with "unrecoverable packed table format was not poisoned" on glibc 2.44 and passed with glibc.malloc.tcache_count=0. The programs now live until the loop ends, so their addresses differ.
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this test-only change; the targeted source review supports its stated fix.
What I ran
Reviewed head 79e34a5581b3c077de7b5b153048b0335b325124 using repo_read.py against the prepared review bundle. No build or tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed test | passed | Read the only changed file and its affected test function. |
| Build and tests | not run | No commands were run. |
Findings
Blocking
None.
Non-blocking
None.
Not verified
No build or test execution was performed. The description’s reported test runs were not independently verified. The manifest lists one changed file, core/libs/prx/libSceAgcDriver/tests/execution/ImageTablePacked.cpp, and marks its full text as included; that file was read. No files were excluded according to the manifest.
To get this to a good state
Nothing is required.
|
Windows NVIDIA check of head Setup: Windows 11 Home 10.0.26300, i9-13900K, WinLibs GCC 15.2.0, Release, RTX 4080 (
Windows doesn't reproduce the failure on The one test not run on both sides is Not checked: AMD, Linux, macOS, any commercial title. AI-assisted: yes |
|
Confirmed on a second GPU vendor. Environment: Arch Linux, glibc 2.44, GCC 16.2.1, Release, NVIDIA RTX 4090, driver 620.70.06, Vulkan validation layer 1.4.363.
With this PR's diff applied on e4caa07:
CI on AI-assisted: yes (Claude Code) |
|
Head Fixes
AI-assisted: yes |
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
What
agc_driver_image_table_packed_guardsfails on every run on a machine whose allocator hands a freed block to the next request of the same size (glibc 2.44 here):Guardsruns four opcodes (2, 0x42, 0x70, 10) against a poisoned table entry and requiresimage table:in the captured log each time. That line is written byLogCoalescedStderr_nid_no_patchinRecorder.cppand carries the program's address, andAsyncLog::Admitprints an identical line onlyPrintedRepeats= 3 times per 10 s. Each program was a local freed at the end of its iteration, so the next one got the same address, the four lines were identical, and the fourth was suppressed.The four programs now live in a vector until the loop ends, so their addresses differ and every line is printed. Test only; no product code changes.
Evidence that it is the coalescing and not the opcode or the GPU:
main(74696a0 and 579e4a0), default allocator: 30 of 30 runs fail, and the log has three identicalshader 0x... stage 4 pc 0x68lines.{10, 2, 0x42, 0x70}on 74696a0, opcode 10 passes and 0x70 fails: the failure follows the fourth position.GLIBC_TUNABLES=glibc.malloc.tcache_count=0on 74696a0: the fourth program gets another address, four lines are printed, andmainpasses 6 of 6.mainalso passes with the validation layer loaded, which changes the allocation pattern too.Tested
CachyOS (glibc 2.44, GCC 16.2.1), Release,
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1.agc_driver_image_table_packed_tests guards, 30 runs each:main579e4a0 fails 30 of 30; this PR passes 30 of 30 with the default allocator and 30 of 30 withGLIBC_TUNABLES=glibc.malloc.tcache_count=0. The log now has four lines with four addresses.ctest -R '^agc_driver_image_table': 29 of 29 pass (agc_driver_image_table_vouched_lookupsskips itself, as onmain).agc_driver_image_table_packed_guardsunderVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationwithVK_LOADER_DEBUG=layer(layer 1.4.363, inserted, not reported missing),mainand this PR: noVUID-line in either log.python3 tools/check_conventions.py --base upstream/main: passed.tools/pr_overlap.py --branchdid not run in my environment; withghthe only open PR I found touchingImageTablePacked.cppis feat(shader): implement MIMG BY2/BY4 stores for the measured 2D subset #16321, inUnsupportedStores, not inGuards.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code