AGC: guest unmap releases host-imported pages before the import is freed; NVIDIA can lose the device #2352

Closed
opened 2026-10-09 16:09:22 +00:00 by popcoder565 · 7 comments
popcoder565 commented 2026-10-09 16:09:22 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T16:09:22Z.


When guest memory is unmapped, its pages are released before the AGC driver retires the Vulkan host import that covers them. For host-pointer imports the Vulkan spec requires the opposite: the application "must ensure that the imported memory range remains valid and accessible for the lifetime of the imported memory object". On Windows with NVIDIA 616.92, freeing an import whose pages are already gone loses the device when the release comes soon after the import.

Where

  • GuestAllocationsUnmap_nid_postfix (core/libs/prx/libc/src/GuestAllocations.cpp) runs apply first, which releases the pages: munmap in DirectMemory.cpp calls GuestArenaReset and the arena's Release, or VirtualFree(MEM_DECOMMIT). Only then does it swap the registry.
  • The import is retired later, at the next lookup that reconciles the registry (refreshImports, from HostImportFor and the other callers in GuestBufferMemory.cpp). retireImport can also leave the vkFreeMemory to the end of the open batch.
  • Nothing on the unmap path calls into the driver to retire imports first. The two libc hooks into the driver are the pin waiter (WaitForLeases), which runs only while a build holds a lease on the range, and the invalidator (ForgetPages), which runs after apply.

Measurements

Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release.

A local probe (not part of any PR) imports a 17 MiB guest-arena block with HostImportFor and releases it with the same arena calls as the unmap path. It then lets the next HostImportFor retire the import. vkQueueWaitIdle reports the queue as healthy before the retire's vkFreeMemory and as lost after it:

block released runs device lost
about 10 µs after the import 60 12
0.5 ms after 20 4
1 ms after 20 1
1.5, 2, 5, 20 or 100 ms after 20 each 0
after the import is retired 60 0

The same order caused the intermittent device loss in agc_driver_recorder_tests (#2155): unitShadowTests released its block before the import was retired. #2299 changes that test.

Not established

  • Whether a title ever releases memory within about 1.5 ms of the driver importing it. I haven't seen one hit this.
  • Other drivers and GPUs. On #2155, rmz-24 saw no device loss with an RTX 5060 Ti (617.42), in 5 runs of the recorder test.
  • Linux.

A possible direction, if this is worth handling: retire the imports that overlap the range before apply releases the pages, and wait for any batch that may still read them. That could be a hook like the pin waiter.

🤖 Investigated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5781126122 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2352). Originally posted by [popcoder565](https://github.com/popcoder565) on 2026-10-09T16:09:22Z. --- When guest memory is unmapped, its pages are released before the AGC driver retires the Vulkan host import that covers them. For host-pointer imports the Vulkan spec requires the opposite: the application "must ensure that the imported memory range remains valid and accessible for the lifetime of the imported memory object". On Windows with NVIDIA 616.92, freeing an import whose pages are already gone loses the device when the release comes soon after the import. ### Where - `GuestAllocationsUnmap_nid_postfix` (`core/libs/prx/libc/src/GuestAllocations.cpp`) runs `apply` first, which releases the pages: `munmap` in `DirectMemory.cpp` calls `GuestArenaReset` and the arena's `Release`, or `VirtualFree(MEM_DECOMMIT)`. Only then does it swap the registry. - The import is retired later, at the next lookup that reconciles the registry (`refreshImports`, from `HostImportFor` and the other callers in `GuestBufferMemory.cpp`). `retireImport` can also leave the `vkFreeMemory` to the end of the open batch. - Nothing on the unmap path calls into the driver to retire imports first. The two libc hooks into the driver are the pin waiter (`WaitForLeases`), which runs only while a build holds a lease on the range, and the invalidator (`ForgetPages`), which runs after `apply`. ### Measurements Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. A local probe (not part of any PR) imports a 17 MiB guest-arena block with `HostImportFor` and releases it with the same arena calls as the unmap path. It then lets the next `HostImportFor` retire the import. `vkQueueWaitIdle` reports the queue as healthy before the retire's `vkFreeMemory` and as lost after it: | block released | runs | device lost | |---|---|---| | about 10 µs after the import | 60 | 12 | | 0.5 ms after | 20 | 4 | | 1 ms after | 20 | 1 | | 1.5, 2, 5, 20 or 100 ms after | 20 each | 0 | | after the import is retired | 60 | 0 | The same order caused the intermittent device loss in `agc_driver_recorder_tests` (#2155): `unitShadowTests` released its block before the import was retired. #2299 changes that test. ### Not established - Whether a title ever releases memory within about 1.5 ms of the driver importing it. I haven't seen one hit this. - Other drivers and GPUs. On #2155, rmz-24 saw no device loss with an RTX 5060 Ti (617.42), in 5 runs of the recorder test. - Linux. A possible direction, if this is worth handling: retire the imports that overlap the range before `apply` releases the pages, and wait for any batch that may still read them. That could be a hook like the pin waiter. _🤖 Investigated with [Claude Code](https://claude.com/claude-code)_
MarcZX10 commented 2026-10-09 17:33:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T17:33:20Z.


The runtime unmap path is fixed on MarcZX100's fork branch.

The pin waiter now receives the mutation range, drains GPU work, and retires every overlapping host import before the unmap callback releases pages. A host import holds a strong reference to its registered range until retirement completes. The recorder test checks that the import is already gone inside the unmap callback, before releasing the block.

Verified: the agc_driver_recorder_tests target builds with GCC 12.2 on Linux, Conventions passes against current main, and agc_driver_recorder_tests --host-import-unmap-only passes on lavapipe (host import unmap lifetime: ok). The full recorder executable still fails earlier in the existing refresh-store case from #2155/#2248 on this upstream main head, before reaching the new test; I am not counting that run as a pass. Windows hardware and the full CI build matrix have not been run for this commit.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6085985512 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2352#issuecomment-6085985512). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T17:33:20Z. --- The runtime unmap path is fixed on [MarcZX100's fork branch](https://github.com/MarcZX100/AnyPS5/commit/1d1e9896af269395e216a0477f179f451f38f8f3). The pin waiter now receives the mutation range, drains GPU work, and retires every overlapping host import before the unmap callback releases pages. A host import holds a strong reference to its registered range until retirement completes. The recorder test checks that the import is already gone inside the unmap callback, before releasing the block. **Verified:** the `agc_driver_recorder_tests` target builds with GCC 12.2 on Linux, Conventions passes against current `main`, and `agc_driver_recorder_tests --host-import-unmap-only` passes on lavapipe (`host import unmap lifetime: ok`). The full recorder executable still fails earlier in the existing refresh-store case from #2155/#2248 on this upstream `main` head, before reaching the new test; I am not counting that run as a pass. Windows hardware and the full CI build matrix have not been run for this commit.
popcoder565 commented 2026-10-09 19:15:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T19:15:53Z.


@MarcZX100 I ran 1d1e9896 on Windows with NVIDIA, where this device loss shows up. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, merged onto main ae3d5f95 together with #2248.

It fixes the unmap path. A local probe imports a 17 MiB guest-arena block with HostImportFor and right away unmaps it through Mutation::Unmap. Its callback releases the pages with the same arena calls as munmap. The probe then lets the next lookup run and checks the queue:

build runs device lost import still present in the unmap callback
main 8b393b6e + #2248 40 7 40
with 1d1e9896 40 0 0
  • --host-import-unmap-only passes 10 of 10.
  • I ran agc_driver_recorder_tests 30 times without #2299, and every run got through all its checks. So the unitShadowTests device loss is gone too: Remove goes through the same pin wait.

On Windows, though, the process now crashes at exit. Those 30 recorder runs crash this way, and in ctest so do agc_driver_sampled_cache_budget and agc_driver_sampled_cache_budget_memory. Each prints its pass line, then takes an access violation in nvoglv64.dll. The call comes from the static destructor of Imports() (__tcf_…Imports…imports) and goes through BufferPool::~BufferPool.

refreshImports now stores a full Context copy in the static HostImports (state.context = context). Its bufferPool shared pointer keeps the device's pool alive until static destruction, after the VkDevice is gone. Two ways to avoid it: keep only what retireImport needs, the way device, destroyBuffer and freeMemory are kept, or drop the copy when the device goes away. Apart from those two tests, the full ctest passes (505 of 507).

🤖 Addressed by Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6087607896 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2352#issuecomment-6087607896). Originally posted by [popcoder565](https://github.com/popcoder565) on 2026-10-09T19:15:53Z. --- @MarcZX100 I ran `1d1e9896` on Windows with NVIDIA, where this device loss shows up. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, merged onto `main` ae3d5f95 together with #2248. **It fixes the unmap path.** A local probe imports a 17 MiB guest-arena block with `HostImportFor` and right away unmaps it through `Mutation::Unmap`. Its callback releases the pages with the same arena calls as `munmap`. The probe then lets the next lookup run and checks the queue: | build | runs | device lost | import still present in the unmap callback | |---|---|---|---| | `main` 8b393b6e + #2248 | 40 | 7 | 40 | | with `1d1e9896` | 40 | 0 | 0 | - `--host-import-unmap-only` passes 10 of 10. - I ran `agc_driver_recorder_tests` 30 times without #2299, and every run got through all its checks. So the `unitShadowTests` device loss is gone too: `Remove` goes through the same pin wait. **On Windows, though, the process now crashes at exit.** Those 30 recorder runs crash this way, and in ctest so do `agc_driver_sampled_cache_budget` and `agc_driver_sampled_cache_budget_memory`. Each prints its pass line, then takes an access violation in `nvoglv64.dll`. The call comes from the static destructor of `Imports()` (`__tcf_…Imports…imports`) and goes through `BufferPool::~BufferPool`. `refreshImports` now stores a full `Context` copy in the static `HostImports` (`state.context = context`). Its `bufferPool` shared pointer keeps the device's pool alive until static destruction, after the `VkDevice` is gone. Two ways to avoid it: keep only what `retireImport` needs, the way `device`, `destroyBuffer` and `freeMemory` are kept, or drop the copy when the device goes away. Apart from those two tests, the full ctest passes (505 of 507). _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
MarcZX10 commented 2026-10-09 20:47:31 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T20:47:31Z.


Follow-up: release the cached device context at shutdown

The Windows report found a second lifetime problem after the unmap ordering fix: the static host-import registry retained a full Context, whose bufferPool shared pointer survived until static destruction, after the Vulkan device was gone.

I updated my existing branch fix/host-import-unmap-lifetime and pushed:

  • 2d07e1a8 — retire overlapping host imports before guest unmap.
  • baadd9d3 — keep only the device handle and Vulkan destroy function pointers in deferred import retirement; the static registry no longer owns a Context or its BufferPool.

Validation on current main 8b393b6e (Linux x86-64, GCC 12.2, Release):

  • agc_driver_recorder_tests builds.
  • agc_driver_recorder_tests --host-import-unmap-only passes on lavapipe.
  • agc_driver_sampled_cache_budget and agc_driver_sampled_cache_budget_memory both pass on lavapipe (2/2).
  • The repository conventions checker and git diff --check upstream/main...HEAD pass.

These Linux results cover the same sample-cache tests that exited with access violations on Windows/NVIDIA, but cannot reproduce that driver-specific shutdown failure. @popcoder565 or anyone with the reported Windows/NVIDIA setup, could you rerun the focused unmap test and the recorder/sample-cache tests, checking that each process exits without an access violation in nvoglv64.dll? The previous Windows report established that the first commit fixed the device loss, but that report predates this shutdown-lifetime follow-up.

No PR was opened.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6088989724 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2352#issuecomment-6088989724). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T20:47:31Z. --- ### Follow-up: release the cached device context at shutdown The Windows report found a second lifetime problem after the unmap ordering fix: the static host-import registry retained a full `Context`, whose `bufferPool` shared pointer survived until static destruction, after the Vulkan device was gone. I updated my existing branch `fix/host-import-unmap-lifetime` and pushed: - `2d07e1a8` — retire overlapping host imports before guest unmap. - `baadd9d3` — keep only the device handle and Vulkan destroy function pointers in deferred import retirement; the static registry no longer owns a `Context` or its `BufferPool`. Validation on current `main` `8b393b6e` (Linux x86-64, GCC 12.2, Release): - `agc_driver_recorder_tests` builds. - `agc_driver_recorder_tests --host-import-unmap-only` passes on lavapipe. - `agc_driver_sampled_cache_budget` and `agc_driver_sampled_cache_budget_memory` both pass on lavapipe (2/2). - The repository conventions checker and `git diff --check upstream/main...HEAD` pass. These Linux results cover the same sample-cache tests that exited with access violations on Windows/NVIDIA, but cannot reproduce that driver-specific shutdown failure. @popcoder565 or anyone with the reported Windows/NVIDIA setup, could you rerun the focused unmap test and the recorder/sample-cache tests, checking that each process exits without an access violation in `nvoglv64.dll`? The previous Windows report established that the first commit fixed the device loss, but that report predates this shutdown-lifetime follow-up. No PR was opened.
MarcZX10 commented 2026-10-09 21:45:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T21:45:01Z.


Rebased validation on current main

I rebased the existing fork branch fix/host-import-unmap-lifetime onto upstream main e603f3f5 and force-updated it after confirming the old fork head was baadd9d3. The change remains the two focused commits for retiring overlapping host imports before guest unmap and avoiding a retained device-pool reference during deferred destruction.

On the rebased source (Linux x86-64, GCC 12.2, Release, lavapipe):

  • agc_driver_recorder_tests builds; --host-import-unmap-only passes (host import unmap lifetime: ok).
  • agc_driver_sampled_cache_budget and agc_driver_sampled_cache_budget_memory pass (2/2).
  • python3 tools/check_conventions.py --base upstream/main and git diff --check upstream/main...HEAD pass.

This Linux validation does not reproduce the Windows/NVIDIA shutdown access violation reported above. The retest on the updated branch is still needed to establish that the process exits cleanly on the affected driver. No PR has been opened.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6089776822 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2352#issuecomment-6089776822). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T21:45:01Z. --- ### Rebased validation on current `main` I rebased the existing fork branch `fix/host-import-unmap-lifetime` onto upstream `main` `e603f3f5` and force-updated it after confirming the old fork head was `baadd9d3`. The change remains the two focused commits for retiring overlapping host imports before guest unmap and avoiding a retained device-pool reference during deferred destruction. On the rebased source (Linux x86-64, GCC 12.2, Release, lavapipe): - `agc_driver_recorder_tests` builds; `--host-import-unmap-only` passes (`host import unmap lifetime: ok`). - `agc_driver_sampled_cache_budget` and `agc_driver_sampled_cache_budget_memory` pass (2/2). - `python3 tools/check_conventions.py --base upstream/main` and `git diff --check upstream/main...HEAD` pass. This Linux validation does not reproduce the Windows/NVIDIA shutdown access violation reported above. The retest on the updated branch is still needed to establish that the process exits cleanly on the affected driver. No PR has been opened.
MarcZX10 commented 2026-10-09 21:57:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T21:57:15Z.


Current-base refresh after #2299 merged

I rebased the existing fix/host-import-unmap-lifetime branch onto upstream main aad16d05 and pushed head c6bffc00 to my fork after confirming the old remote head was 58d8ebca. Upstream has now merged #2299, whose test-only cleanup covers the unitShadowTests teardown. This branch still addresses the separate runtime unmap path: retire overlapping imports before guest pages are released and avoid retaining the device pool through deferred destruction.

On the current source (Linux x86-64, GCC 12.2, Release, lavapipe):

  • agc_driver_recorder_tests builds; --host-import-unmap-only passes (host import unmap lifetime: ok).
  • agc_driver_sampled_cache_budget and agc_driver_sampled_cache_budget_memory pass (2/2).
  • Conventions and git diff --check upstream/main...HEAD pass.

The updated Linux run still cannot verify the Windows/NVIDIA shutdown path reported earlier. A Windows retest on this branch, including clean process exit for the recorder and sampled-cache tests, remains needed. No PR has been opened.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6089930872 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2352#issuecomment-6089930872). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T21:57:15Z. --- ### Current-base refresh after #2299 merged I rebased the existing `fix/host-import-unmap-lifetime` branch onto upstream `main` `aad16d05` and pushed head `c6bffc00` to my fork after confirming the old remote head was `58d8ebca`. Upstream has now merged #2299, whose test-only cleanup covers the `unitShadowTests` teardown. This branch still addresses the separate runtime unmap path: retire overlapping imports before guest pages are released and avoid retaining the device pool through deferred destruction. On the current source (Linux x86-64, GCC 12.2, Release, lavapipe): - `agc_driver_recorder_tests` builds; `--host-import-unmap-only` passes (`host import unmap lifetime: ok`). - `agc_driver_sampled_cache_budget` and `agc_driver_sampled_cache_budget_memory` pass (2/2). - Conventions and `git diff --check upstream/main...HEAD` pass. The updated Linux run still cannot verify the Windows/NVIDIA shutdown path reported earlier. A Windows retest on this branch, including clean process exit for the recorder and sampled-cache tests, remains needed. No PR has been opened.
popcoder565 commented 2026-10-09 22:34:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T22:34:14Z.


@MarcZX100 I reran your c6bffc00 on Windows: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0, Release. It was merged onto main 64fe7439 together with #2248, plus #2462's two-line fix, which current main needs to build on Windows.

The exit crash is gone, and the unmap path still holds:

  • The unmap probe lost the device in 0 of 40 runs (7 of 40 on main), and the import was already retired at release in every run.
  • agc_driver_recorder_tests passes 20 of 20, --host-import-unmap-only 10 of 10, and agc_driver_sampled_cache_budget and _memory 5 of 5 each.

But agc_driver_graphics now segfaults in every run (10 of 10), at rip 0. The stack goes importCrossingTests → GuestAllocationsRemove → WaitForLeasesAndImports → retireImport → ~RetiredImport, which calls a null destroyBuffer.

The cause is that mockContext() has no device. So state.device stays VK_NULL_HANDLE, equal to context.device. refreshImports then never takes the device-change branch that loads destroyBuffer and freeMemory. Before this commit, the retire looked both functions up through the context, which the mock provides.

Loading them whenever they are still null fixes it locally:

+    if (state.destroyBuffer == nullptr) state.destroyBuffer = context.Function<PFN_vkDestroyBuffer>("vkDestroyBuffer");
+    if (state.freeMemory == nullptr) state.freeMemory = context.Function<PFN_vkFreeMemory>("vkFreeMemory");
     const auto generation = GuestAllocations::GuestAllocationsGeneration_nid_postfix();

With that, agc_driver_graphics passes 5 of 5 and the full ctest passes (543 of 543). The unmap probe shows 0 of 20 device losses, and the recorder test passes 10 of 10.

🤖 Addressed by Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6090381897 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2352#issuecomment-6090381897). Originally posted by [popcoder565](https://github.com/popcoder565) on 2026-10-09T22:34:14Z. --- @MarcZX100 I reran your `c6bffc00` on Windows: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0, Release. It was merged onto `main` 64fe7439 together with #2248, plus #2462's two-line fix, which current `main` needs to build on Windows. The exit crash is gone, and the unmap path still holds: - The unmap probe lost the device in 0 of 40 runs (7 of 40 on `main`), and the import was already retired at release in every run. - `agc_driver_recorder_tests` passes 20 of 20, `--host-import-unmap-only` 10 of 10, and `agc_driver_sampled_cache_budget` and `_memory` 5 of 5 each. **But `agc_driver_graphics` now segfaults in every run (10 of 10), at `rip 0`.** The stack goes `importCrossingTests` → `GuestAllocationsRemove` → `WaitForLeasesAndImports` → `retireImport` → `~RetiredImport`, which calls a null `destroyBuffer`. The cause is that `mockContext()` has no `device`. So `state.device` stays `VK_NULL_HANDLE`, equal to `context.device`. `refreshImports` then never takes the device-change branch that loads `destroyBuffer` and `freeMemory`. Before this commit, the retire looked both functions up through the context, which the mock provides. Loading them whenever they are still null fixes it locally: ```diff + if (state.destroyBuffer == nullptr) state.destroyBuffer = context.Function<PFN_vkDestroyBuffer>("vkDestroyBuffer"); + if (state.freeMemory == nullptr) state.freeMemory = context.Function<PFN_vkFreeMemory>("vkFreeMemory"); const auto generation = GuestAllocations::GuestAllocationsGeneration_nid_postfix(); ``` With that, `agc_driver_graphics` passes 5 of 5 and the full ctest passes (543 of 543). The unmap probe shows 0 of 20 device losses, and the recorder test passes 10 of 10. _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
zaydzaari commented 2026-10-09 23:32:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by zaydzaari on 2026-10-09T23:32:32Z.


@MarcZX100 @popcoder565

I independently validated the Issue #2352 candidate (c6bffc00) on another NVIDIA GPU generation.

Environment

  • Windows 11 Pro 64-bit, build 26200
  • NVIDIA GeForce RTX 5070 (Blackwell)
  • NVIDIA driver 610.47 (32.0.16.1047)
  • Vulkan 1.4.341
  • MinGW-w64 GCC 15.2.0

Results on the candidate:

  • agc_driver_recorder_tests --host-import-unmap-only: 10/10 passed, exit code 0; no device losses observed.
  • Sampled-cache budget and memory-budget tests: both passed with clean exit.
  • agc_driver_graphics_tests: reproducible 0xC0000005 access violation at address 0x0, matching the null destroyBuffer issue already reported.

Validation of the proposed fix:

I applied only the two initialization lines in refreshImports:

if (state.destroyBuffer == nullptr) state.destroyBuffer = context.Function<PFN_vkDestroyBuffer>("vkDestroyBuffer");
if (state.freeMemory == nullptr) state.freeMemory = context.Function<PFN_vkFreeMemory>("vkFreeMemory");

No destructor null guards were included.

With that change:

  • agc_driver_graphics_tests: 5/5 passed, clean exit code 0.
  • agc_driver_recorder_tests --host-import-unmap-only: 10/10 passed.
  • Both sampled-cache tests, guest_memory_tests, agc_write_tracking_tests, and guest_agc_driver_resources_tests passed.

The unrestricted recorder suite still exits unsuccessfully in storeRunTests; I have not established that this is caused by the candidate patch.

This independently corroborates the pointer-initialization fix on an RTX 5070. It also avoids potentially hiding cleanup failures by silently skipping Vulkan destruction when a function pointer is missing.

These are focused Windows/NVIDIA validation results, not a full cross-platform or retail-game compatibility certification.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6091046368 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2352#issuecomment-6091046368). Originally posted by [zaydzaari](https://github.com/zaydzaari) on 2026-10-09T23:32:32Z. --- @MarcZX100 @popcoder565 I independently validated the Issue #2352 candidate (`c6bffc00`) on another NVIDIA GPU generation. **Environment** - Windows 11 Pro 64-bit, build 26200 - NVIDIA GeForce RTX 5070 (Blackwell) - NVIDIA driver 610.47 (32.0.16.1047) - Vulkan 1.4.341 - MinGW-w64 GCC 15.2.0 **Results on the candidate:** - `agc_driver_recorder_tests --host-import-unmap-only`: 10/10 passed, exit code 0; no device losses observed. - Sampled-cache budget and memory-budget tests: both passed with clean exit. - `agc_driver_graphics_tests`: reproducible `0xC0000005` access violation at address `0x0`, matching the null `destroyBuffer` issue already reported. **Validation of the proposed fix:** I applied only the two initialization lines in `refreshImports`: ```cpp if (state.destroyBuffer == nullptr) state.destroyBuffer = context.Function<PFN_vkDestroyBuffer>("vkDestroyBuffer"); if (state.freeMemory == nullptr) state.freeMemory = context.Function<PFN_vkFreeMemory>("vkFreeMemory"); ``` No destructor null guards were included. With that change: - `agc_driver_graphics_tests`: 5/5 passed, clean exit code 0. - `agc_driver_recorder_tests --host-import-unmap-only`: 10/10 passed. - Both sampled-cache tests, `guest_memory_tests`, `agc_write_tracking_tests`, and `guest_agc_driver_resources_tests` passed. The unrestricted recorder suite still exits unsuccessfully in `storeRunTests`; I have not established that this is caused by the candidate patch. This independently corroborates the pointer-initialization fix on an RTX 5070. It also avoids potentially hiding cleanup failures by silently skipping Vulkan destruction when a function pointer is missing. These are focused Windows/NVIDIA validation results, not a full cross-platform or retail-game compatibility certification.
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#2352
No description provided.