Windows NVIDIA: StoreOverUntracked can free surfaces before queued work completes #5789

Closed
opened 2026-10-14 11:02:33 +00:00 by Amoenus · 2 comments
Amoenus commented 2026-10-14 11:02:33 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-14T11:02:33Z.


Failure

Unmodified main 3e577edac2159830bd3befff32b3690fd54cfcfe: agc_driver_store_over_untracked intermittently exits with access violation 0xc0000005 on Windows NVIDIA. Found while validating the integration used for Sonic Unleashed Recompiled (PPSA99902); this is a public synthetic fixture, not a game-crash reproduction.

Reproduce

Windows 11 Enterprise 26200, WinLibs GCC 15.2.0r7, Release, bundled dependencies, SPIRV-Tools ON, BUILD_TESTING ON. NVIDIA RTX 5080 / 610.62 (32.0.16.1062), Vulkan required, AnyPS5 shader cache disabled, default GPL on.

$env:ANYPS5_GPU = 'RTX 5080'
$env:ANYPS5_REQUIRE_VULKAN = '1'
$env:ANYPS5_NO_SHADER_CACHE = '1'
Remove-Item Env:APS5_NO_GPL -ErrorAction SilentlyContinue
cmake --build build --target libs agc_driver_store_over_untracked_tests
ctest --test-dir build -R '^agc_driver_store_over_untracked$' --repeat until-fail:20 --parallel 1 --timeout 30 --output-on-failure

The standalone main control failed once immediately and again after nine passing executions in a separate repeat campaign. AMD Radeon(TM) Graphics 1002:13c0 / 32.0.21036.18 passed 20 repetitions. No CTest skips. A composed integration independently failed on its fourth NVIDIA repetition; symbol lookup of that public build identifies StorageTexture::upload/Refresh on the worker stack.

Merged fixture correction

Three-line fork fix260514de7, base main82f112, waits for accepted submissions before Run's surfaces are destroyed. Run can return Missed while a Store is still queued. The guard is declared after Surface and before the GPU mutex lock, so the lock releases before waiting and guest storage remains alive until work completes.

The correction passed 100 serial repetitions on each GPU, both before and after rebase; maximum0.395661s NVIDIA/0.326654s AMD on the final pin. Runtime libraries/fixture build, conventions, registration and whitespace checks pass. This is targeted fixture validation, not a whole-main/full-suite build or title capability fix. The fixture blob is identical on the stock control and final base. Other memory failures are not excluded.

Related #5760 adds different coverage in this fixture; it does not add this lifetime wait. AI-assisted: Codex.

Confirmation after merge

#5790 merged into main as f72b62ff2a3ab959fb949e245f31528f4f057228. On unchanged main f2aa48a8e, a clean Windows Release checkout/build of libs and agc_driver_store_over_untracked_tests, with registration checks, passed. Vulkan was required, AnyPS5 shader cache disabled, default GPL enabled, serial execution, and each test had a 30-second timeout.

Physical device verified in every run Serial repeat campaign Largest CTest printed duration
NVIDIA GeForce RTX 5080, 610.62 / 32.0.16.1062 100/100 passed 0.62 s
AMD Radeon(TM) Graphics, 32.0.21036.18 100/100 passed 0.51 s

Windows 11 Enterprise 26200, WinLibs GCC 15.2.0r7, bundled dependencies, SPIRV-Tools ON, BUILD_TESTING ON. The preceding first NVIDIA run also passed (0.880317 s). No access violations, test failures, timeouts or CTest skips. Source remained clean and pinned through the campaign. Main's additional second-store test was included unchanged.

Run once per GPU selection:

ctest --test-dir build -R '^agc_driver_store_over_untracked$' --repeat until-fail:100 --parallel 1 --timeout 30 -V

Coverage limit: in every repetition on both vendors, the three cases named a surface that left the write watch, a surface written before it left the write watch, and a surface whose import left the write watch report not run, the surface is not write-watched and return success. These are internal conditional omissions, despite zero CTest skips; this campaign does not establish their write-watch transition behavior. No fixture changes or guard bypasses were used. This confirms the reported lifetime crash no longer reproduced in these campaigns; it is not full-suite, Linux or game-startup validation, nor proof that other memory failures are absent.

A later, distinct first-store assertion on unchanged main1d1c7615c is tracked in #6347, including both-vendor reproduction. That does not change the historical lifetime-crash result above or establish the same cause.

AI-assisted: Codex.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5846615647 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5789). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-14T11:02:33Z. --- ### Failure Unmodified main `3e577edac2159830bd3befff32b3690fd54cfcfe`: `agc_driver_store_over_untracked` intermittently exits with access violation `0xc0000005` on Windows NVIDIA. Found while validating the integration used for Sonic Unleashed Recompiled (PPSA99902); this is a public synthetic fixture, not a game-crash reproduction. ### Reproduce Windows 11 Enterprise 26200, WinLibs GCC 15.2.0r7, Release, bundled dependencies, SPIRV-Tools ON, BUILD_TESTING ON. NVIDIA RTX 5080 / 610.62 (32.0.16.1062), Vulkan required, AnyPS5 shader cache disabled, default GPL on. ```powershell $env:ANYPS5_GPU = 'RTX 5080' $env:ANYPS5_REQUIRE_VULKAN = '1' $env:ANYPS5_NO_SHADER_CACHE = '1' Remove-Item Env:APS5_NO_GPL -ErrorAction SilentlyContinue cmake --build build --target libs agc_driver_store_over_untracked_tests ctest --test-dir build -R '^agc_driver_store_over_untracked$' --repeat until-fail:20 --parallel 1 --timeout 30 --output-on-failure ``` The standalone main control failed once immediately and again after nine passing executions in a separate repeat campaign. AMD Radeon(TM) Graphics 1002:13c0 / 32.0.21036.18 passed 20 repetitions. No CTest skips. A composed integration independently failed on its fourth NVIDIA repetition; symbol lookup of that public build identifies StorageTexture::upload/Refresh on the worker stack. ### Merged fixture correction [Three-line fork fix260514de7](https://github.com/Amoenus/AnyPS5/commit/260514de7672d7abe4b19e73afde95e1d70495bd), base main82f112, waits for accepted submissions before Run's surfaces are destroyed. Run can return Missed while a Store is still queued. The guard is declared after Surface and before the GPU mutex lock, so the lock releases before waiting and guest storage remains alive until work completes. The correction passed **100 serial repetitions on each GPU**, both before and after rebase; maximum0.395661s NVIDIA/0.326654s AMD on the final pin. Runtime libraries/fixture build, conventions, registration and whitespace checks pass. This is targeted fixture validation, not a whole-main/full-suite build or title capability fix. The fixture blob is identical on the stock control and final base. Other memory failures are not excluded. Related #5760 adds different coverage in this fixture; it does not add this lifetime wait. AI-assisted: Codex. ### Confirmation after merge #5790 merged into main as `f72b62ff2a3ab959fb949e245f31528f4f057228`. On unchanged main [`f2aa48a8e`](https://github.com/boykopovar/AnyPS5/commit/f2aa48a8e2fd19c681ff0b05f2a52751bf82dfef), a clean Windows Release checkout/build of `libs` and `agc_driver_store_over_untracked_tests`, with registration checks, passed. Vulkan was required, AnyPS5 shader cache disabled, default GPL enabled, serial execution, and each test had a 30-second timeout. | Physical device verified in every run | Serial repeat campaign | Largest CTest printed duration | | --- | --- | --- | | NVIDIA GeForce RTX 5080, 610.62 / 32.0.16.1062 | 100/100 passed | 0.62 s | | AMD Radeon(TM) Graphics, 32.0.21036.18 | 100/100 passed | 0.51 s | Windows 11 Enterprise 26200, WinLibs GCC 15.2.0r7, bundled dependencies, SPIRV-Tools ON, BUILD_TESTING ON. The preceding first NVIDIA run also passed (0.880317 s). No access violations, test failures, timeouts or CTest skips. Source remained clean and pinned through the campaign. Main's additional second-store test was included unchanged. Run once per GPU selection: ```powershell ctest --test-dir build -R '^agc_driver_store_over_untracked$' --repeat until-fail:100 --parallel 1 --timeout 30 -V ``` Coverage limit: in every repetition on both vendors, the three cases named `a surface that left the write watch`, `a surface written before it left the write watch`, and `a surface whose import left the write watch` report `not run, the surface is not write-watched` and return success. These are internal conditional omissions, despite zero CTest skips; this campaign does not establish their write-watch transition behavior. No fixture changes or guard bypasses were used. This confirms the reported lifetime crash no longer reproduced in these campaigns; it is not full-suite, Linux or game-startup validation, nor proof that other memory failures are absent. A later, distinct first-store assertion on unchanged main1d1c7615c is tracked in #6347, including both-vendor reproduction. That does not change the historical lifetime-crash result above or establish the same cause. AI-assisted: Codex.
fdfawef324 commented 2026-10-14 20:41:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-14T20:41:53Z.


Resolved on main by #5790 (merged 2026-10-14 19:06 UTC, f72b62ff2). On main e6ef803ce, Run in core/libs/prx/libSceAgcDriver/tests/execution/StoreOverUntracked.cpp declares the WaitForWork guard (destructor calls AgcDriverWaitIdle_nid_postfix(), :294-296) right after Surface surface(leaves); (:293) and before the GPU mutex lock (:299), so the surfaces outlive queued work. The later RunSecondStore (:232-235) has the same guard.

Verified by source check only (git grep/git log on main e6ef803ce); I did not re-run the fixture on Windows NVIDIA. If @Amoenus confirms the repeat campaign stays green on main, this can be closed.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6177996854 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5789#issuecomment-6177996854). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-14T20:41:53Z. --- Resolved on `main` by #5790 (merged 2026-10-14 19:06 UTC, `f72b62ff2`). On `main` `e6ef803ce`, `Run` in `core/libs/prx/libSceAgcDriver/tests/execution/StoreOverUntracked.cpp` declares the `WaitForWork` guard (destructor calls `AgcDriverWaitIdle_nid_postfix()`, :294-296) right after `Surface surface(leaves);` (:293) and before the GPU mutex lock (:299), so the surfaces outlive queued work. The later `RunSecondStore` (:232-235) has the same guard. Verified by source check only (`git grep`/`git log` on `main` `e6ef803ce`); I did not re-run the fixture on Windows NVIDIA. If @Amoenus confirms the repeat campaign stays green on `main`, this can be closed. AI-assisted: yes
Amoenus commented 2026-10-14 21:09:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-14T21:09:55Z.


@fdfawef324 Confirmed on unchanged main f2aa48a8e: rebuilt runtime libraries and the fixture in a clean Windows Release checkout; 100/100 serial runs passed on RTX 5080 and 100/100 on AMD Radeon Graphics, plus the first NVIDIA run. Actual selected device output was checked in every run. No access violations, failures or timeouts.

Important scope limit: all three write-watch-transition cases report not run, the surface is not write-watched on both GPUs, although CTest records zero skips. The fixture, including the later second-store case, was unchanged. Full details, drivers, commands and coverage limits are now in the issue body.

Closing the reported fixture-lifetime crash as resolved by #5790. This does not claim game-startup or whole-suite validation. AI-assisted: Codex.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6178571187 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5789#issuecomment-6178571187). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-14T21:09:55Z. --- @fdfawef324 Confirmed on unchanged main [`f2aa48a8e`](https://github.com/boykopovar/AnyPS5/commit/f2aa48a8e2fd19c681ff0b05f2a52751bf82dfef): rebuilt runtime libraries and the fixture in a clean Windows Release checkout; **100/100 serial runs passed on RTX 5080 and 100/100 on AMD Radeon Graphics**, plus the first NVIDIA run. Actual selected device output was checked in every run. No access violations, failures or timeouts. Important scope limit: all three write-watch-transition cases report `not run, the surface is not write-watched` on both GPUs, although CTest records zero skips. The fixture, including the later second-store case, was unchanged. Full details, drivers, commands and coverage limits are now in the issue body. Closing the reported fixture-lifetime crash as resolved by #5790. This does not claim game-startup or whole-suite validation. AI-assisted: Codex.
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#5789
No description provided.