Windows: StoreOverUntracked fails at "the first result was not stored" #6347

Closed
opened 2026-10-15 12:46:21 +00:00 by Amoenus · 1 comment
Amoenus commented 2026-10-15 12:46:21 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-15T12:46:21Z.


Failure

Unchanged main 1d1c7615c34757430f91a1b43b8f5f3dd82ef369: agc_driver_store_over_untracked fails in RunSecondStore at:

AGC graphics: store over untracked: the first result was not stored

The first store is flushed and read back, then the assertion requires its first word to equal Stored. The fixture stops before the second store and its intervening CPU-write preservation check. This is an existing public synthetic regression, found while maintaining the Sonic PPSA99902 validation integration; it is not a reproduced game failure.

Reproduce

Windows 11 Enterprise 26200, WinLibs MinGW-w64 GCC 15.2.0r7, Ninja, Release, bundled dependencies, BUILD_TESTING=ON, SPIRV-Tools enabled. The target and its dependencies were rebuilt on the pinned main; source stayed clean throughout testing.

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
cmake --build build --target agc_driver_store_over_untracked_tests
$env:ANYPS5_REQUIRE_VULKAN = '1'
$env:ANYPS5_NO_SHADER_CACHE = '1'
$env:ANYPS5_GPU = 'RTX 5080'
ctest --test-dir build -R '^agc_driver_store_over_untracked$' --parallel 1 --timeout 30 -V

Repeat in fresh processes; use AMD Radeon(TM) Graphics for the other device. Our default runs clear inherited APS5_*/ANYPS5_* options before setting the three options shown. GPL remains at its default.

Physical GPU verified in every run Result on main1d1c7615c Largest test duration
NVIDIA GeForce RTX 5080, 10de:2c02, driver610.62 /32.0.16.1062 5/5 fail at the same assertion 0.506s
AMD Radeon(TM) Graphics, 1002:13c0, driver32.0.21036.18 5/5 fail at the same assertion 0.371s

No CTest skips, timeouts or access violations. Four internal cases print not run, the surface is not write-watched: leaving the watch, writing before leaving it, an import leaving it, and the neighboring-page case. Those conditional omissions are not counted as successful coverage of their transitions.

Comparisons and scope

  • Unchanged main 2dbdce6c4da46aa3bce634d96bc5ccedbc97038e also fails5/5 per device. Setting the existing APS5_PIPELINED_DRAWS=0 diagnostic control still fails5/5 per device with the same assertion; disabling pipelining is not a demonstrated fix.
  • The retained integration on main2db independently reaches the same failure; its other89 selected groups pass per selector. Main1d differs from main2db only in Python tools, and the exact current head was nevertheless rebuilt/retested above.
  • The fixture lifetime crash in closed #5789 was an access violation and was fixed by merged #5790. This assertion is distinct. The direct second-store case came from merged #5760; #5708 adds a different sample-then-redirty case.
  • The insufficient fixture wait is addressed by the proposal below; the exact overlapping producer accepted by the old predicate and regression-introducing commit remain unconfirmed. No production fix, full-suite result, Linux result or new title capability is claimed. Historical post-#5790 passes remain scoped to their earlier main pin.

AI-assisted investigation: Codex; author reproduced and reviewed the scoped results.

Proposed fixture correction: #6359

Current head b15060bd9dd5539c4d1ffb9a546c9f50ac2243db is the unchanged two-line identity gate rebased onto main5d. The PR and maintained comparison separate its exact-head selected build/tests from the older full-build/red-green campaign. Current unrestricted checks pass; the separate constrained neighbour wait needs #6385, and the exact rebased combination passes20/20. The main5d four-way comparison does not reproduce this first-result assertion; it reproduces the distinct #6383 wait and one #6735 assertion. This does not establish that main's old predicate proves the intended image pending, or relabel the historical controls as current-main failures. Production and title capability remain unchanged.

Historical proposal verification on main598

Proposed fixture correction: #6359

PR #6359 contains only the two-line correction2bc3a760f, based on main 598dd15954f23f0c239b5c86a2e3ede53474931e. The held-pending wait now requires FindPending(address, SurfaceBytes) to equal the image returned by FindLive, under the existing GPU mutex. The original predicate combined a live image with any overlapping pending/flushing image and did not establish that the intended image was pending.

Unchanged main598 fails5/5 per actual GPU. In a separate test-only diagnostic with the original predicate, both GPUs report expected image is pending=0 immediately before the same first-result assertion. The diagnostic is removed and exact proposed source restored. The result/CPU-preservation assertions and bounded wait remain.

The correction passes an initial5/5 and then 100/100 serial fresh-process runs per GPU, with physical-device output checked in every repetition; maximum0.71s NVIDIA/0.58s AMD. Thirteen nearby groups also pass per selector (26 executions, maximum2.18s). Full Windows app/libs build, patched-library validation, conventions and registration pass. Cppcheck2.20/clang-tidy23.1.3 have no selected diagnostic or parser/configuration error for the changed translation unit (7.568s analyzer time).

Four internal watch-transition cases remain omitted exactly as above, despite zero CTest skips. No Linux/full-suite/new title capability result is claimed. This is a fixture synchronization correction, with production unchanged. AI-assisted: Codex.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5866380127 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6347). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-15T12:46:21Z. --- ### Failure Unchanged main `1d1c7615c34757430f91a1b43b8f5f3dd82ef369`: `agc_driver_store_over_untracked` fails in `RunSecondStore` at: ```text AGC graphics: store over untracked: the first result was not stored ``` The first store is flushed and read back, then the assertion requires its first word to equal `Stored`. The fixture stops before the second store and its intervening CPU-write preservation check. This is an existing public synthetic regression, found while maintaining the Sonic PPSA99902 validation integration; it is not a reproduced game failure. ### Reproduce Windows 11 Enterprise 26200, WinLibs MinGW-w64 GCC 15.2.0r7, Ninja, Release, bundled dependencies, `BUILD_TESTING=ON`, SPIRV-Tools enabled. The target and its dependencies were rebuilt on the pinned main; source stayed clean throughout testing. ```powershell cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON cmake --build build --target agc_driver_store_over_untracked_tests $env:ANYPS5_REQUIRE_VULKAN = '1' $env:ANYPS5_NO_SHADER_CACHE = '1' $env:ANYPS5_GPU = 'RTX 5080' ctest --test-dir build -R '^agc_driver_store_over_untracked$' --parallel 1 --timeout 30 -V ``` Repeat in fresh processes; use `AMD Radeon(TM) Graphics` for the other device. Our default runs clear inherited `APS5_*`/`ANYPS5_*` options before setting the three options shown. GPL remains at its default. | Physical GPU verified in every run | Result on main1d1c7615c | Largest test duration | | --- | --- | --- | | NVIDIA GeForce RTX 5080, `10de:2c02`, driver610.62 /32.0.16.1062 | 5/5 fail at the same assertion | 0.506s | | AMD Radeon(TM) Graphics, `1002:13c0`, driver32.0.21036.18 | 5/5 fail at the same assertion | 0.371s | No CTest skips, timeouts or access violations. Four internal cases print `not run, the surface is not write-watched`: leaving the watch, writing before leaving it, an import leaving it, and the neighboring-page case. Those conditional omissions are not counted as successful coverage of their transitions. ### Comparisons and scope - Unchanged main `2dbdce6c4da46aa3bce634d96bc5ccedbc97038e` also fails5/5 per device. Setting the existing `APS5_PIPELINED_DRAWS=0` diagnostic control still fails5/5 per device with the same assertion; disabling pipelining is not a demonstrated fix. - The retained integration on main2db independently reaches the same failure; its other89 selected groups pass per selector. Main1d differs from main2db only in Python tools, and the exact current head was nevertheless rebuilt/retested above. - The fixture lifetime crash in closed #5789 was an access violation and was fixed by merged #5790. This assertion is distinct. The direct second-store case came from merged #5760; #5708 adds a different sample-then-redirty case. - The insufficient fixture wait is addressed by the proposal below; the exact overlapping producer accepted by the old predicate and regression-introducing commit remain unconfirmed. No production fix, full-suite result, Linux result or new title capability is claimed. Historical post-#5790 passes remain scoped to their earlier main pin. AI-assisted investigation: Codex; author reproduced and reviewed the scoped results. <!-- codex-pending-owner-proposal --> ### Proposed fixture correction: #6359 [Current head `b15060bd9dd5539c4d1ffb9a546c9f50ac2243db`](https://github.com/Amoenus/AnyPS5/commit/b15060bd9dd5539c4d1ffb9a546c9f50ac2243db) is the unchanged two-line identity gate rebased onto main5d. [The PR](https://github.com/boykopovar/AnyPS5/pull/6359) and [maintained comparison](https://github.com/boykopovar/AnyPS5/pull/6385#issuecomment-6194151824) separate its exact-head selected build/tests from the older full-build/red-green campaign. Current unrestricted checks pass; the separate constrained neighbour wait needs #6385, and the exact rebased combination passes20/20. The main5d four-way comparison does not reproduce this first-result assertion; it reproduces the distinct #6383 wait and one #6735 assertion. This does not establish that main's old predicate proves the intended image pending, or relabel the historical controls as current-main failures. Production and title capability remain unchanged. <details> <summary>Historical proposal verification on main598</summary> <!-- codex-pr6347-history --> ### Proposed fixture correction: #6359 [PR #6359](https://github.com/boykopovar/AnyPS5/pull/6359) contains only the [two-line correction2bc3a760f](https://github.com/Amoenus/AnyPS5/commit/2bc3a760f1889500ba5d3bc7ba2eddf1b1ad7603), based on main `598dd15954f23f0c239b5c86a2e3ede53474931e`. The held-pending wait now requires `FindPending(address, SurfaceBytes)` to equal the image returned by `FindLive`, under the existing GPU mutex. The original predicate combined a live image with any overlapping pending/flushing image and did not establish that the intended image was pending. Unchanged main598 fails5/5 per actual GPU. In a separate test-only diagnostic with the original predicate, both GPUs report `expected image is pending=0` immediately before the same first-result assertion. The diagnostic is removed and exact proposed source restored. The result/CPU-preservation assertions and bounded wait remain. The correction passes an initial5/5 and then **100/100 serial fresh-process runs per GPU**, with physical-device output checked in every repetition; maximum0.71s NVIDIA/0.58s AMD. Thirteen nearby groups also pass per selector (26 executions, maximum2.18s). Full Windows app/libs build, patched-library validation, conventions and registration pass. Cppcheck2.20/clang-tidy23.1.3 have no selected diagnostic or parser/configuration error for the changed translation unit (7.568s analyzer time). Four internal watch-transition cases remain omitted exactly as above, despite zero CTest skips. No Linux/full-suite/new title capability result is claimed. This is a fixture synchronization correction, with production unchanged. AI-assisted: Codex. <!-- /codex-pr6347-history --> </details> <!-- /codex-pending-owner-proposal -->
fdfawef324 commented 2026-10-15 15:20:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-15T15:20:59Z.


Root cause for this: the fixture, not the driver. Tested on Windows Server 2025, RTX 3060 (driver 591.86), WinLibs GCC 15.2.0 r7, Release.

Range. The test passes on b3f9f89e6 and fails from e53927780 (#5671). Between them, only af4e074a0 changes libSceAgcDriver; the other change only fixes how a pm4 test links. 71bd2876e fails 29 of 30 runs with a game on the same GPU and 15 of 15 with the GPU idle. A build from before #5671 passes 8 of 8 under the same load.

What the old wait accepted. #5671 added the NeighbourLeftWatch case, which runs just before RunSecondStore. It puts a linear 0x40000-byte surface at arena+0x1000 and returns with that image still pending, then its memory is freed. RunSecondStore then allocates its surface at the arena base, overlapping that image. Output from a test-only diagnostic (not for merging):

[x] after case 'a surface whose first block left the write watch with the page before it': outcome=0 anyPending=1
[x] RunSecondStore tile=0
[x] heldLive(0x12345678): live=0000024ed4ff1b50 tile=7 pending=0000000000000000 same=0 anyPending=1
[gpu] storage image 0x200001000+0x40000: memory no longer registered; 1 pending ranges dropped
[gpu] storage image 0x200000000 destroyed with GPU results pending
AGC graphics: store over untracked: the first result was not stored

FindLive matched the cached tile-7 image that the leave-the-watch cases left at 0x200000000. AnyPendingOverlaps matched the neighbour case's leftover image. So heldLive returned before the first store was recorded. The flush then dropped the leftover, and the first store's own image (tile 0) was created only after that. Before #5671, the case before RunSecondStore was NeighbourCopied, which uses heap surfaces. Nothing pending overlapped the arena surface, so the weak wait held.

Splitting #5671. One build at 71bd2876e with env-selected variants, 20 fresh runs each:

Variant Passes
unchanged 1/20
NeighbourLeftWatch skipped, #5671's beforeUnwatch kept 20/20
beforeUnwatch back to hook(address, bytes), test unchanged 0/20
surfaceTile = TileR64KBX at the start of RunSecondStore only 0/20
#6359's wait (FindPending == FindLive) 20/20
#6359's wait plus that tile reset 20/20

The production half of #5671 plays no part in this failure. #6359 is the right fix: with it, the image the test waits on is the pending one (same=1) for both stores.

A coverage note for #6359 (@SleglJan pointed this out on #5671): surfaceTile is a global that only Run() sets. Since #5671, RunSecondStore runs on the linear surface (tile=0 above) instead of the R64KBX surface it was written for in #5760. The test passes either way. Resetting surfaceTile in RunSecondStore puts the case back on the tiled surface (last row).

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6195631657 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6347#issuecomment-6195631657). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-15T15:20:59Z. --- Root cause for this: the fixture, not the driver. Tested on Windows Server 2025, RTX 3060 (driver 591.86), WinLibs GCC 15.2.0 r7, Release. **Range.** The test passes on `b3f9f89e6` and fails from `e53927780` (#5671). Between them, only `af4e074a0` changes `libSceAgcDriver`; the other change only fixes how a pm4 test links. `71bd2876e` fails 29 of 30 runs with a game on the same GPU and 15 of 15 with the GPU idle. A build from before #5671 passes 8 of 8 under the same load. **What the old wait accepted.** #5671 added the `NeighbourLeftWatch` case, which runs just before `RunSecondStore`. It puts a linear 0x40000-byte surface at arena+0x1000 and returns with that image still pending, then its memory is freed. `RunSecondStore` then allocates its surface at the arena base, overlapping that image. Output from a test-only diagnostic (not for merging): ``` [x] after case 'a surface whose first block left the write watch with the page before it': outcome=0 anyPending=1 [x] RunSecondStore tile=0 [x] heldLive(0x12345678): live=0000024ed4ff1b50 tile=7 pending=0000000000000000 same=0 anyPending=1 [gpu] storage image 0x200001000+0x40000: memory no longer registered; 1 pending ranges dropped [gpu] storage image 0x200000000 destroyed with GPU results pending AGC graphics: store over untracked: the first result was not stored ``` `FindLive` matched the cached tile-7 image that the leave-the-watch cases left at 0x200000000. `AnyPendingOverlaps` matched the neighbour case's leftover image. So `heldLive` returned before the first store was recorded. The flush then dropped the leftover, and the first store's own image (tile 0) was created only after that. Before #5671, the case before `RunSecondStore` was `NeighbourCopied`, which uses heap surfaces. Nothing pending overlapped the arena surface, so the weak wait held. **Splitting #5671.** One build at `71bd2876e` with env-selected variants, 20 fresh runs each: | Variant | Passes | |---|---| | unchanged | 1/20 | | `NeighbourLeftWatch` skipped, #5671's `beforeUnwatch` kept | 20/20 | | `beforeUnwatch` back to `hook(address, bytes)`, test unchanged | 0/20 | | `surfaceTile = TileR64KBX` at the start of `RunSecondStore` only | 0/20 | | #6359's wait (`FindPending == FindLive`) | 20/20 | | #6359's wait plus that tile reset | 20/20 | The production half of #5671 plays no part in this failure. #6359 is the right fix: with it, the image the test waits on is the pending one (`same=1`) for both stores. A coverage note for #6359 (@SleglJan pointed this out on #5671): `surfaceTile` is a global that only `Run()` sets. Since #5671, `RunSecondStore` runs on the linear surface (`tile=0` above) instead of the R64KBX surface it was written for in #5760. The test passes either way. Resetting `surfaceTile` in `RunSecondStore` puts the case back on the tiled surface (last row). AI-assisted: yes
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#6347
No description provided.