fix(agc): pin the import ceiling only on memory exhaustion #8091

Merged
JJenkx merged 1 commit from upstream-pr/8091 into main 2026-10-28 07:11:24 +00:00
JJenkx commented 2026-10-19 21:10:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-19T21:10:46Z.


What

vkAllocateMemory returning VK_ERROR_INVALID_EXTERNAL_HANDLE or VK_ERROR_UNKNOWN does not by itself mean the host heap is exhausted. Since #6479, three such failures in a row, or one near the budget, pin a permanent ceiling at the bytes live at that moment. In affected titles that is a few MiB, and it disables imports for the rest of the run.

With this change, only VK_ERROR_OUT_OF_HOST_MEMORY and VK_ERROR_OUT_OF_DEVICE_MEMORY pin the ceiling. Any failed vkAllocateMemory still sets allocationFailed, so the default budget then follows the driver's VK_EXT_memory_budget headroom, as on main. This was revised on 2026-10-27 after review. The earlier head also stopped non-OOM failures from switching to the reported budget, which removed that protection on RADV, where a refused import under pressure never returns an OOM code.

RADV error ambiguity: Mesa 26.2.4 radv_amdgpu_winsys_bo_from_ptr maps a failed ac_drm_create_bo_from_user_mem call to VK_ERROR_INVALID_EXTERNAL_HANDLE without distinguishing its cause. A real user-pointer/GTT allocation failure can therefore reach this non-OOM path too. The classification change prevents unsupported mappings from automatically shrinking the ceiling, but does not establish safe admission under physical pressure. The smaller-GTT validation blocker below remains material; injected Vulkan return codes do not replace it.

Current status (2026-10-28)

On head 1c7f19e716 (one commit on main 801d5b9bc1):

  • Smaller-GTT admission. After any failed vkAllocateMemory, the default budget follows the driver's VK_EXT_memory_budget report, exactly as on main. Only the permanent ceiling pin is now limited to OOM codes, as the reviewer asked. This PR no longer changes admission on low-GTT systems, though I have not run one.
  • JUMANJI. With main built from exactly 801d5b9bc1, the title crashes at about 30 s in 3 of 3 runs, after the ceiling is pinned at 77 MiB. With this PR it ran 150 s in 3 of 3 runs at about 33 FPS (pairs). Over five 150 s runs this PR crashed once. The earlier association with crashes was measured against an older base that did not crash.
  • Dusk Diver 2. main stalls on the FMOD start-up logo in 2 of 2 runs, with a 77 MiB ceiling against a 51,060 MiB reported heap budget. With this PR it reaches the System settings screen in 2 of 2 runs (pair).
  • The Oregon Trail (PPSA19244). main runs at 16.9 FPS: the budget is lowered to about 70 MiB, and every storage-image write-back (9.8 GB per 10 s) goes through the CPU. With this PR it runs at a capped 60 FPS, with all write-backs done on the GPU into imported memory (comment). Its output is black in both arms, a separate issue.
  • Independent RDNA4 result. @MuteRex: LEGO Batman (PPSA16833), RX 9060 XT, RADV Mesa 26.0.8, this head cherry-picked onto b6fe513b9, five alternating launches per arm. With this PR: 80 to 83 presents per 20 s window every time, and the ceiling is never lowered. On the base: one launch hung at boot, and the other four gave 21 to 132 presents, with the ceiling lowered 10 to 21 times to 776 to 1,298 MiB. Peer-reported; not reproduced locally.
  • Correction: some comments from 2026-10-27 used a mislabelled baseline; see correction.

Older results below refer to earlier heads and bases, as labelled.

Tested

Revision 1c7f19e716 (2026-10-27), one commit on main 801d5b9bc1. Linux 7.2.9, RX 6650 XT, RADV Mesa 26.2.4. Results: comment. Everything below this paragraph refers to the earlier head 71d29197ff and its pins.

Rebased without merge commits onto 7ab4b2e5610c3d4328c83566cba488eb82972c9c, head 71d29197ffb2142d3a9e3a7320437ec43d7dcdde. Clean merge against newer main f47c85663404ecd27764bf0c6f1adaa44922c423; conventions and whitespace checks pass. No other PR changes are included.

Linux 7.2.9-arch1-1, Ryzen 9 7950X, RX 6650 XT, RADV Mesa 26.2.4:

  • Rebuilt libraries and focused test targets on both pinned main and candidate. ctest --test-dir build-full -R '^(agc_driver_graphics|agc_driver_host_import_failure_handles)$' -V: 2/2 pass on each. ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, explicit layer path and RADV ICD; loader logs confirm the Khronos layer was inserted, no VUIDs or skips. The device test supplies actual-layer coverage separately from the mocked graphics fixture.
  • Negative control dead21e87cc2a0916d898cac1bb66ab3d608c314 (candidate tests, unchanged main implementation) fails with allocation error -1000072003 incorrectly changed the host import budget. Candidate source and build restored afterward.
  • Injected host/device OOM, invalid-handle and unknown errors cover near/far budgets and default/explicit heap reports. Existing repeated-OOM ceiling/reset tests remain enabled.

Historical standalone Lodoss PPSA05347 regression, before #7465 merged. A fresh pair compares unmodified main 9f4ddf7cf985d80e2885ee3942fe48871e4a5e5a with only this change (bb414a0aab5b1a1d168f7e4304035a874d2b7d0c). These runtime pins differ from the rebased validation pins above. Same machine, 3840x2160, copied warm-cache seed (625 files), save seed (3 files), input schedule and 250-second close; screenshots at 190/240 seconds show the same stationary tutorial scene. Both exit 0, native PIDs disappear and the diagnostic udmabuf setting returns from 8192 to 64 MiB. Native captures have validation disabled; focused layer validation is separate.

tools/trace_digest.py summaries, seconds 200:30:

Build Presents / window Frame p50 / p90 / p99 / max (ms) GPU busy ms/present
main 9f4ddf7cf985 1580 / 30008.602 ms 18.140 / 22.616 / 26.553 / 31.404 2.127
main + change bb414a0aab5b 890 / 30019.869 ms 31.959 / 42.236 / 53.514 / 60.440 2.202

Observed presents/s: 52.65 versus 29.65. Main reports 19 budget reductions and 48 invalid-handle failures; the change reports zero reductions/refusals but 472,840 invalid-handle failures and 711,825 successful imports across the run. Repeated failures cover 484 exact virtual-address/size spans; one recurs 64,460 times. Address reuse alone does not prove backing identity, so caching failures solely by address would be unsafe.

This is one ordered diagnostic pair, not a general performance claim. Neither trace dropped events. A two-second compiler/linker monitor found no overlap (126 samples/run, maximum gap 2.02 seconds); short jobs could be missed and other host workloads were not comprehensively captured. performance_comparison_valid therefore remains false in the machine report. Subsequent isolation and smaller-GTT feedback are summarized below; the standalone retry and pressure limitations remain unresolved.

Full evidence archive: paired traces, native logs/screenshots, protocols, cache/save manifests, compiler monitor, official digests, failure recurrence and main/candidate/negative-control validation. Download verified SHA256 e2ec9076db8c0d92a54f083597fac597fa8c14c65f28863ba88b3bde1e29035b.

Independent contributor evidence: alfalfa-star tested Kena: Bridge of Spirits PPSA01802 02.008.000 on an RX 9070 XT / i7-13700KF, main 3e7d1d297 versus this head merged onto that main (ac17c9ece), in three alternating rounds from a fixed forest-title save. Reported frame p50 was 1532–2441 ms on main versus 73–81 ms with this fix; budget reductions fell from 22–37 per run to zero, with no crash or GPU reset in six runs. These are peer-reported results, not locally reproduced. The displayed candidate trace dropped events, limiting detailed slice interpretation; no OOM occurred, so these runs do not validate the exhaustion path. This supports title-dependent benefit but does not resolve the PPSA05347 eager-import regression above; the PR remains draft.

Subsequent evidence and remaining blockers

Lodoss isolation on pinned main 525e299fc085 measured main / this PR / this PR plus #7465 / #7465 alone at 51.65 / 29.73 / 58.26 / 59.94 presents/s in the same stationary tutorial. This was one ordered set, not a reverse-order repeat. #7465 alone was sufficient for the gain; the combined result does not establish a benefit from #8091. Focused validation was 16/17 on each variant, with the same baseline guest-memory-lifetime failure and fence-reset VUID. These results do not replace the standalone regression above.

The development worker measured Minecraft Dungeons II PPSA16064 on this PR's base 7ab4b2e561 and head 71d29197ff, alternating base/PR/base/PR with identical warm-cache and save seeds, no concurrent build, and complete traces. At the Accessibility menu, frame p50 was 2725.2 / 162.0 / 2509.1 / 164.9 ms. The linked report includes the official summary lines and downloadable traces. This is menu evidence on one machine, not gameplay or general stability evidence.

Default memory-pressure admission remains unresolved. 3mro777o's Stellar Blade PPSA13195 report compares main 11bb53a34 with this change on an RX 6700 XT with about 7.9 GiB GTT. A host-pressure monitor terminated main at 175 s and the second default-budget candidate run at 44 s; other candidate runs crashed with causes not established. These are peer-reported single runs without frame-time traces. As confirmed in the code review, the default uses reported heap headroom only after an OOM allocation error; pressure can surface elsewhere first. Correct error classification does not make that admission policy pressure-safe. This PR remains draft pending the standalone retry and pressure follow-ups.

Ghost of Yōtei integration provenance correction: filter-on/off observations used different builds, including uncommitted changes. They do not isolate this PR's loading, pressure or frame-time effect.

Repeated Lodoss composition test on pinned main b5d763770a used main / this PR / this PR + #7465 / this PR + #7465 / this PR / main, with matching cache/save seeds, inputs and a 200:30 trace window. The clean final main run measured 51.71 FPS; this PR alone measured 30.70 and 33.48 FPS, while both combined runs held 59.94 FPS. The first main run overlapped up to 22 compiler processes and measured 40.85 FPS. Map-time import attempts fell from roughly 730–770 thousand with this PR alone to 170 with #7465 alongside. All six runs closed cleanly, restored the diagnostic setting and produced traces without dropped events. This supports #7465 as a companion policy for map-churning titles; it does not establish that this PR alone is safe to merge or that it adds a gain over #7465 alone.

Additional standalone stability blocker: JUMANJI PPSA03973 testing observed no crashes in four 188-second base runs but four crashes in five candidate runs. GDB located null reads in guest code; the cause remains unresolved, so this is an association with the candidate rather than an established root cause. The follow-up scope report records no crashes in the bounded Minecraft Dungeons II, Super Meat Boy 3D and Afterimage runs. Those other-title results do not resolve JUMANJI or the smaller-GTT pressure concern. The PR remains draft.

hugodearaujo's LEGO Horizon Adventures PPSA14632 01.004.000 report (Linux 7.2.11, RX 9070 XT, RADV Mesa 26.2.5): on main 342ac2eda0 with #8881 and an empty uecommandline.txt, the first imports fail with -1000072003. The budget is lowered to 82 MiB, against a reported 15,521 MiB host-heap budget, and by 24 minutes 2.4 million imports have been refused. The boot logos take about 24 minutes, and the run segfaults on the next loading screen before reaching the menu. With this PR's head 71d29197ff on the same base, the budget is never lowered and the failed imports fall back to copies one by one. The main menu appears in about 3 minutes, and New Game reaches the first playable scene at about 9.5 minutes (four runs). These are progress times from runs with the log redirected to a file, not a performance report.

Protocol-compliant Lodoss reruns (game output on a terminal, seeds restored per run, scene-matched): this PR alone on its merge base 7ab4b2e561: main 53.43 / 53.47 FPS against this PR 34.03 / 34.90. Composition on pinned main 94fbb8cea8: main 43.89 / 53.02, #7465 59.94 / 59.94, #7465 + this PR 59.81 / 59.74. With #7465 present the standalone Lodoss regression is essentially gone. These replace the earlier, log-redirected Lodoss figures above for any claim.

johnmaia’s Epic Mickey: Rebrushed PPSA15657 report, Linux/i3-12100/RX 7600 RADV: main 933c0e4f1 reportedly lowers the import budget to about 87 MiB after non-OOM import failures and runs at a reported 0.76–0.88 FPS in-level. This PR alone aborts before gameplay in two runs with guest buffer has no GPU owner. This PR plus #10304 reaches the level in two runs, with reported 6.6–7.2 FPS and no budget lowering. The reporter’s bisect attributes the large slowdown to the #6479 merge. These are independent reported in-level observations; no downloadable official paired summaries/traces accompany that comment, and they were not reproduced locally. The report names invalid external handles but gives -13; the pinned Vulkan headers define -13 as VK_ERROR_UNKNOWN and VK_ERROR_INVALID_EXTERNAL_HANDLE as -1000072003, so the exact return code needs the original failure line. Both codes are outside this PR’s two OOM cases. #10304 is a separate overlay-dissolution owner-retention fix; it is a tested title composition, not a build dependency of this error-classification change. This does not establish the cause of JUMANJI’s separate guest null-read crashes or validate smaller-GTT admission.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none (budget regression observed in PPSA05347, discussion #6460; it already reaches gameplay)
  • GPUs tested: AMD Radeon RX 6650 XT, RADV Mesa 26.2.4, Arch Linux 7.2.9-arch1-1
  • AI-assisted: yes

Additional contributor evidence, with an unresolved stop: @hugodearaujo tested Skyrim PPSA03747 01.001.010 on RX 9070 XT / RADV 26.2.5, Linux, with main 88795ed448 plus #11506/#11507, then this head 71d29197ff. Invalid-handle failures reduced the base import ceiling to zero despite available budget; candidate imports continued. Their surviving candidate run improved the reported opening-cart interval, but one of two candidate runs stopped presenting around 200 s on three WAIT_REG_MEM label timeouts. The cause is uninvestigated, and the performance figure excludes that stopped run. This adds a positive admission observation and a separate stability limitation; it does not clear the smaller-GTT admission question, the JUMANJI excess-crash blocker or this title's stop. The PR remains a technical draft. Original report with setup, counts and failure details.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4927478273 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-19T21:10:46Z. --- ### What `vkAllocateMemory` returning `VK_ERROR_INVALID_EXTERNAL_HANDLE` or `VK_ERROR_UNKNOWN` does not by itself mean the host heap is exhausted. Since #6479, three such failures in a row, or one near the budget, pin a permanent ceiling at the bytes live at that moment. In affected titles that is a few MiB, and it disables imports for the rest of the run. With this change, only `VK_ERROR_OUT_OF_HOST_MEMORY` and `VK_ERROR_OUT_OF_DEVICE_MEMORY` pin the ceiling. **Any** failed `vkAllocateMemory` still sets `allocationFailed`, so the default budget then follows the driver's `VK_EXT_memory_budget` headroom, as on `main`. This was revised on 2026-10-27 after [review](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6437288667). The earlier head also stopped non-OOM failures from switching to the reported budget, which removed that protection on RADV, where a refused import under pressure never returns an OOM code. **RADV error ambiguity:** [Mesa 26.2.4 `radv_amdgpu_winsys_bo_from_ptr`](https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-26.2.4/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c#L799) maps a failed `ac_drm_create_bo_from_user_mem` call to `VK_ERROR_INVALID_EXTERNAL_HANDLE` without distinguishing its cause. A real user-pointer/GTT allocation failure can therefore reach this non-OOM path too. The classification change prevents unsupported mappings from automatically shrinking the ceiling, but does not establish safe admission under physical pressure. The smaller-GTT validation blocker below remains material; injected Vulkan return codes do not replace it. ### Current status (2026-10-28) On head `1c7f19e716` (one commit on `main` `801d5b9bc1`): - **Smaller-GTT admission.** After any failed `vkAllocateMemory`, the default budget follows the driver's `VK_EXT_memory_budget` report, exactly as on `main`. Only the permanent ceiling pin is now limited to OOM codes, as the reviewer asked. This PR no longer changes admission on low-GTT systems, though I have not run one. - **JUMANJI.** With `main` built from exactly `801d5b9bc1`, the title crashes at about 30 s in 3 of 3 runs, after the ceiling is pinned at 77 MiB. With this PR it ran 150 s in 3 of 3 runs at about 33 FPS ([pairs](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6442250100)). Over five 150 s runs this PR crashed once. The earlier association with crashes was measured against an older base that did not crash. - **Dusk Diver 2.** `main` stalls on the FMOD start-up logo in 2 of 2 runs, with a 77 MiB ceiling against a 51,060 MiB reported heap budget. With this PR it reaches the System settings screen in 2 of 2 runs ([pair](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6441947069)). - **The Oregon Trail (PPSA19244).** `main` runs at 16.9 FPS: the budget is lowered to about 70 MiB, and every storage-image write-back (9.8 GB per 10 s) goes through the CPU. With this PR it runs at a capped 60 FPS, with all write-backs done on the GPU into imported memory ([comment](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6453823091)). Its output is black in both arms, a separate issue. - **Independent RDNA4 result.** [@MuteRex: LEGO Batman (PPSA16833)](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6449570528), RX 9060 XT, RADV Mesa 26.0.8, this head cherry-picked onto `b6fe513b9`, five alternating launches per arm. With this PR: 80 to 83 presents per 20 s window every time, and the ceiling is never lowered. On the base: one launch hung at boot, and the other four gave 21 to 132 presents, with the ceiling lowered 10 to 21 times to 776 to 1,298 MiB. Peer-reported; not reproduced locally. - **Correction:** some comments from 2026-10-27 used a mislabelled baseline; see [correction](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6441747331). Older results below refer to earlier heads and bases, as labelled. ### Tested **Revision `1c7f19e716` (2026-10-27)**, one commit on `main` `801d5b9bc1`. Linux 7.2.9, RX 6650 XT, RADV Mesa 26.2.4. Results: [comment](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6438669225). Everything below this paragraph refers to the earlier head `71d29197ff` and its pins. Rebased without merge commits onto `7ab4b2e5610c3d4328c83566cba488eb82972c9c`, head `71d29197ffb2142d3a9e3a7320437ec43d7dcdde`. Clean merge against newer main `f47c85663404ecd27764bf0c6f1adaa44922c423`; conventions and whitespace checks pass. No other PR changes are included. Linux 7.2.9-arch1-1, Ryzen 9 7950X, RX 6650 XT, RADV Mesa 26.2.4: - Rebuilt libraries and focused test targets on both pinned main and candidate. `ctest --test-dir build-full -R '^(agc_driver_graphics|agc_driver_host_import_failure_handles)$' -V`: 2/2 pass on each. `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, explicit layer path and RADV ICD; loader logs confirm the Khronos layer was inserted, no VUIDs or skips. The device test supplies actual-layer coverage separately from the mocked graphics fixture. - Negative control `dead21e87cc2a0916d898cac1bb66ab3d608c314` (candidate tests, unchanged main implementation) fails with `allocation error -1000072003 incorrectly changed the host import budget`. Candidate source and build restored afterward. - Injected host/device OOM, invalid-handle and unknown errors cover near/far budgets and default/explicit heap reports. Existing repeated-OOM ceiling/reset tests remain enabled. **Historical standalone Lodoss PPSA05347 regression, before #7465 merged.** A fresh pair compares unmodified main `9f4ddf7cf985d80e2885ee3942fe48871e4a5e5a` with only this change (`bb414a0aab5b1a1d168f7e4304035a874d2b7d0c`). These runtime pins differ from the rebased validation pins above. Same machine, 3840x2160, copied warm-cache seed (625 files), save seed (3 files), input schedule and 250-second close; screenshots at 190/240 seconds show the same stationary tutorial scene. Both exit 0, native PIDs disappear and the diagnostic udmabuf setting returns from 8192 to 64 MiB. Native captures have validation disabled; focused layer validation is separate. `tools/trace_digest.py` summaries, seconds 200:30: | Build | Presents / window | Frame p50 / p90 / p99 / max (ms) | GPU busy ms/present | | --- | --- | --- | --- | | main `9f4ddf7cf985` | 1580 / 30008.602 ms | 18.140 / 22.616 / 26.553 / 31.404 | 2.127 | | main + change `bb414a0aab5b` | 890 / 30019.869 ms | 31.959 / 42.236 / 53.514 / 60.440 | 2.202 | Observed presents/s: 52.65 versus 29.65. Main reports 19 budget reductions and 48 invalid-handle failures; the change reports zero reductions/refusals but 472,840 invalid-handle failures and 711,825 successful imports across the run. Repeated failures cover 484 exact virtual-address/size spans; one recurs 64,460 times. Address reuse alone does not prove backing identity, so caching failures solely by address would be unsafe. This is one ordered diagnostic pair, not a general performance claim. Neither trace dropped events. A two-second compiler/linker monitor found no overlap (126 samples/run, maximum gap 2.02 seconds); short jobs could be missed and other host workloads were not comprehensively captured. `performance_comparison_valid` therefore remains false in the machine report. Subsequent isolation and smaller-GTT feedback are summarized below; the standalone retry and pressure limitations remain unresolved. [Full evidence archive](https://github.com/JJenkx/AnyPS5/releases/download/game-library-checks-20261016/pr8091-main7ab4-validation-main9f4-runtime-20261021.tar.gz): paired traces, native logs/screenshots, protocols, cache/save manifests, compiler monitor, official digests, failure recurrence and main/candidate/negative-control validation. Download verified SHA256 `e2ec9076db8c0d92a54f083597fac597fa8c14c65f28863ba88b3bde1e29035b`. Independent contributor evidence: [alfalfa-star tested Kena: Bridge of Spirits PPSA01802 02.008.000](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6297327216) on an RX 9070 XT / i7-13700KF, main `3e7d1d297` versus this head merged onto that main (`ac17c9ece`), in three alternating rounds from a fixed forest-title save. Reported frame p50 was 1532–2441 ms on main versus 73–81 ms with this fix; budget reductions fell from 22–37 per run to zero, with no crash or GPU reset in six runs. These are peer-reported results, not locally reproduced. The displayed candidate trace dropped events, limiting detailed slice interpretation; no OOM occurred, so these runs do not validate the exhaustion path. This supports title-dependent benefit but does not resolve the PPSA05347 eager-import regression above; the PR remains draft. ### Subsequent evidence and remaining blockers [Lodoss isolation on pinned main `525e299fc085`](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6283167365) measured main / this PR / this PR plus #7465 / #7465 alone at 51.65 / 29.73 / 58.26 / 59.94 presents/s in the same stationary tutorial. This was one ordered set, not a reverse-order repeat. #7465 alone was sufficient for the gain; the combined result does not establish a benefit from #8091. Focused validation was 16/17 on each variant, with the same baseline guest-memory-lifetime failure and fence-reset VUID. These results do not replace the standalone regression above. [The development worker measured Minecraft Dungeons II PPSA16064](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6314036383) on this PR's base `7ab4b2e561` and head `71d29197ff`, alternating base/PR/base/PR with identical warm-cache and save seeds, no concurrent build, and complete traces. At the Accessibility menu, frame p50 was 2725.2 / 162.0 / 2509.1 / 164.9 ms. The linked report includes the official summary lines and downloadable traces. This is menu evidence on one machine, not gameplay or general stability evidence. **Default memory-pressure admission remains unresolved.** [3mro777o's Stellar Blade PPSA13195 report](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6316934385) compares main `11bb53a34` with this change on an RX 6700 XT with about 7.9 GiB GTT. A host-pressure monitor terminated main at 175 s and the second default-budget candidate run at 44 s; other candidate runs crashed with causes not established. These are peer-reported single runs without frame-time traces. As [confirmed in the code review](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6317347128), the default uses reported heap headroom only after an OOM allocation error; pressure can surface elsewhere first. Correct error classification does not make that admission policy pressure-safe. This PR remains draft pending the standalone retry and pressure follow-ups. [Ghost of Yōtei integration provenance correction](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6318650496): filter-on/off observations used different builds, including uncommitted changes. They do not isolate this PR's loading, pressure or frame-time effect. [Repeated Lodoss composition test](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6329061223) on pinned main `b5d763770a` used main / this PR / this PR + #7465 / this PR + #7465 / this PR / main, with matching cache/save seeds, inputs and a 200:30 trace window. The clean final main run measured 51.71 FPS; this PR alone measured 30.70 and 33.48 FPS, while both combined runs held 59.94 FPS. The first main run overlapped up to 22 compiler processes and measured 40.85 FPS. Map-time import attempts fell from roughly 730–770 thousand with this PR alone to 170 with #7465 alongside. All six runs closed cleanly, restored the diagnostic setting and produced traces without dropped events. This supports #7465 as a companion policy for map-churning titles; it does not establish that this PR alone is safe to merge or that it adds a gain over #7465 alone. **Additional standalone stability blocker:** [JUMANJI PPSA03973 testing](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6327264256) observed no crashes in four 188-second base runs but four crashes in five candidate runs. GDB located null reads in guest code; the cause remains unresolved, so this is an association with the candidate rather than an established root cause. [The follow-up scope report](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6328629966) records no crashes in the bounded Minecraft Dungeons II, Super Meat Boy 3D and Afterimage runs. Those other-title results do not resolve JUMANJI or the smaller-GTT pressure concern. The PR remains draft. [hugodearaujo's LEGO Horizon Adventures PPSA14632 01.004.000 report](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6371415859) (Linux 7.2.11, RX 9070 XT, RADV Mesa 26.2.5): on `main` `342ac2eda0` with #8881 and an empty `uecommandline.txt`, the first imports fail with `-1000072003`. The budget is lowered to 82 MiB, against a reported 15,521 MiB host-heap budget, and by 24 minutes 2.4 million imports have been refused. The boot logos take about 24 minutes, and the run segfaults on the next loading screen before reaching the menu. With this PR's head `71d29197ff` on the same base, the budget is never lowered and the failed imports fall back to copies one by one. The main menu appears in about 3 minutes, and New Game reaches the first playable scene at about 9.5 minutes (four runs). These are progress times from runs with the log redirected to a file, not a performance report. Protocol-compliant Lodoss reruns (game output on a terminal, seeds restored per run, scene-matched): [this PR alone](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6363851662) on its merge base `7ab4b2e561`: `main` 53.43 / 53.47 FPS against this PR 34.03 / 34.90. [Composition on pinned `main` `94fbb8cea8`](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6369673373): `main` 43.89 / 53.02, #7465 59.94 / 59.94, #7465 + this PR 59.81 / 59.74. With #7465 present the standalone Lodoss regression is essentially gone. These replace the earlier, log-redirected Lodoss figures above for any claim. [johnmaia’s Epic Mickey: Rebrushed PPSA15657 report](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6382906682), Linux/i3-12100/RX 7600 RADV: main `933c0e4f1` reportedly lowers the import budget to about 87 MiB after non-OOM import failures and runs at a reported 0.76–0.88 FPS in-level. This PR alone aborts before gameplay in two runs with `guest buffer has no GPU owner`. This PR plus #10304 reaches the level in two runs, with reported 6.6–7.2 FPS and no budget lowering. The reporter’s bisect attributes the large slowdown to the #6479 merge. These are independent reported in-level observations; no downloadable official paired summaries/traces accompany that comment, and they were not reproduced locally. The report names invalid external handles but gives `-13`; the pinned Vulkan headers define `-13` as `VK_ERROR_UNKNOWN` and `VK_ERROR_INVALID_EXTERNAL_HANDLE` as `-1000072003`, so the exact return code needs the original failure line. Both codes are outside this PR’s two OOM cases. #10304 is a separate overlay-dissolution owner-retention fix; it is a tested title composition, not a build dependency of this error-classification change. This does not establish the cause of JUMANJI’s separate guest null-read crashes or validate smaller-GTT admission. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none (budget regression observed in PPSA05347, discussion #6460; it already reaches gameplay) - [x] GPUs tested: AMD Radeon RX 6650 XT, RADV Mesa 26.2.4, Arch Linux 7.2.9-arch1-1 - [x] AI-assisted: yes <!-- codex-contributor-note-20261027-pr8091 --> Additional contributor evidence, with an unresolved stop: @hugodearaujo tested Skyrim PPSA03747 01.001.010 on RX 9070 XT / RADV 26.2.5, Linux, with main `88795ed448` plus #11506/#11507, then this head `71d29197ff`. Invalid-handle failures reduced the base import ceiling to zero despite available budget; candidate imports continued. Their surviving candidate run improved the reported opening-cart interval, but one of two candidate runs stopped presenting around 200 s on three `WAIT_REG_MEM` label timeouts. The cause is uninvestigated, and the performance figure excludes that stopped run. This adds a positive admission observation and a separate stability limitation; it does not clear the smaller-GTT admission question, the JUMANJI excess-crash blocker or this title's stop. The PR remains a technical draft. [Original report with setup, counts and failure details](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6423645589).
JJenkx commented 2026-10-19 22:20:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-19T22:20:56Z.


Follow-up on the draft's import-churn regression: the combined local stack now reaches approximately 60 presents/s in Lodoss PPSA05347's stationary opening forest. Two matched pairs against pinned main 903cbbd5ba31, in opposite execution orders, give main/change 50.41/59.94 and 50.73/59.91 presents/s. Both pairs use the same machine, scene, settings and independently cloned warm caches. The candidate's shutdown import counts fell to 174–175 successful imports with zero refusals or failures, compared with main's roughly 11,200 successes, over one million refusals and 5,600–5,700 failures.

This combines this PR with #4449, #7465, #7849 and a local backing-descriptor ownership repair shared with #4449's author. It does not isolate this PR, establish that this PR alone is faster, or replace the standalone regression recorded above. I am leaving it in draft pending a dependency-aware standalone assessment. Movement/attack coverage is being tested separately; the benchmark scene is stationary.

Official summary lines, complete traces, screenshots, source composition and same-machine focused Vulkan validation evidence. Candidate validation passed 20/20 without VUIDs. The main control failed its guest-memory-lifetime test with VUID-vkResetFences-pFences-01123; the evidence records that failure rather than calling the control clean.

AI-assisted investigation and testing.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6278643197 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6278643197). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-19T22:20:56Z. --- Follow-up on the draft's import-churn regression: the combined local stack now reaches approximately 60 presents/s in Lodoss PPSA05347's stationary opening forest. Two matched pairs against pinned main `903cbbd5ba31`, in opposite execution orders, give main/change 50.41/59.94 and 50.73/59.91 presents/s. Both pairs use the same machine, scene, settings and independently cloned warm caches. The candidate's shutdown import counts fell to 174–175 successful imports with zero refusals or failures, compared with main's roughly 11,200 successes, over one million refusals and 5,600–5,700 failures. This combines this PR with #4449, #7465, #7849 and a local backing-descriptor ownership repair shared with #4449's author. It does **not** isolate this PR, establish that this PR alone is faster, or replace the standalone regression recorded above. I am leaving it in draft pending a dependency-aware standalone assessment. Movement/attack coverage is being tested separately; the benchmark scene is stationary. [Official summary lines, complete traces, screenshots, source composition and same-machine focused Vulkan validation evidence](https://github.com/boykopovar/AnyPS5/discussions/6460#discussioncomment-19052670). Candidate validation passed 20/20 without VUIDs. The main control failed its guest-memory-lifetime test with `VUID-vkResetFences-pFences-01123`; the evidence records that failure rather than calling the control clean. AI-assisted investigation and testing.
JJenkx commented 2026-10-20 04:09:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-20T04:09:51Z.


Follow-up isolation on pinned main 525e299fc085c400de4a703c6b1ab105eefb50c7: removing #4449 and #7849 from the earlier combined experiment still reproduces the budget-only slowdown, while adding #7465 largely removes it in this stationary Lodoss PPSA05347 scene.

Production composition Presents/s Frame p50 ms Frame p99 ms Budget cuts Failed imports (whole run)
main 51.65 18.506 27.948 11 2,912
main + #8091 29.73 32.472 51.783 0 846,997
main + #8091 + #7465 58.26 16.684 24.959 0 112
main + #7465 (control) 59.94 16.683 16.693 3 75

The budget-only run made 720,568 successful imports and 846,997 failed attempts; budget plus deferred imports made 174 successes and 112 failed attempts. All recorded failures were vkAllocateMemory: -1000072003. These are whole-run counters, not just the 30-second trace window. This supports small-map eager import churn as a major contributor to the standalone regression; it does not establish that this PR is beneficial once #7465 is present. The subsequent #7465-only control measured 59.94 presents/s, made 121 successful imports, refused 63 and failed 75, with three budget cuts. This isolates #7465 as sufficient for the observed gain over pinned main in this scene. Adding this PR did not improve that result (58.26 versus 59.94); one run per variant does not establish the size of a small regression. This PR remains draft; no standalone performance benefit is claimed.

Protocol: same RX 6650 XT, RADV Mesa 26.2.4, Linux, 3840x2160, stationary opening tutorial, settings/input schedule, and independently cloned identical warm-seeded caches. Sequential order main → budget → budget+deferred → deferred-only; no reverse-order repeat in this set. Official trace window 200:30 seconds; no dropped trace events. All four 240-second screenshots were visually inspected and show the same scene with readable UI. Native exits were 0, PIDs disappeared and kernel configuration was restored. This is not cold-cache, Windows, sustained 60 FPS or full-game evidence.

Focused Vulkan validation was 16/17 on each of the four variants, with the same baseline guest prefix unmap failed / VUID-vkResetFences-pFences-01123 in agc_driver_guest_memory_lifetime. No new VUID, missing-layer or skipped-test result. The deferred variant adjusts the existing eager-accounting fixture from 64 KiB to 128 KiB to match #7465; its added 64 KiB first-GPU-use test is retained. This test-only adjustment is included in the source patch.

Complete traces, official summary JSONL, source composition/patch, commands, cache manifests, validation/native logs and screenshots.

Additional deferred-only control trace, summaries for all four variants, source patch, cache manifest, validation/native logs and screenshots.

Official summary lines (main, budget-only, budget+deferred, deferred-only respectively):

{"commit":"525e299fc085","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":11177,"ms":30009.58},"presents":1550,"frame_ms":{"p50":18.506,"p90":23.005,"p99":27.948,"max":32.251},"gpu_busy_ms_per_present":2.21,"worker_busy_pct":{"queue worker 0x0":18.242},"top_phases_ms_per_frame":{"Driver.Packet":3.53,"VideoOut.Flip":1.844,"VideoOut.Flip.present":1.811,"Driver.Present":1.811,"Driver.Present.render_fence_wait":1.601,"Vulkan.Retire":1.601,"Vulkan.Retire.wait":1.597,"Graphics.Draw":1.335},"trace_dropped":false,"trace":"aps5-trace-525e299fc085-2049725.json.gz"}
{"commit":"50202a158fca","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":10155,"ms":30001.881},"presents":892,"frame_ms":{"p50":32.472,"p90":41.475,"p99":51.783,"max":58.48},"gpu_busy_ms_per_present":2.55,"worker_busy_pct":{"queue worker 0x0":23.622},"top_phases_ms_per_frame":{"Driver.Packet":7.943,"Recorder.Sync":3.811,"GpuMutex.wait.label":3.023,"Graphics.Draw":2.412,"VideoOut.Flip":1.574,"VideoOut.Flip.present":1.534,"Driver.Present":1.532,"Driver.Packet.draw":1.346},"trace_dropped":false,"trace":"aps5-trace-50202a158fca-2149805.json.gz"}
{"commit":"1a42f919a6e9","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":11639,"ms":30022.899},"presents":1749,"frame_ms":{"p50":16.684,"p90":19.734,"p99":24.959,"max":32.28},"gpu_busy_ms_per_present":2.466,"worker_busy_pct":{"queue worker 0x0":32.024},"top_phases_ms_per_frame":{"VideoOut.Flip":7.75,"VideoOut.Flip.vblank_wait":6.748,"Driver.Packet":5.495,"Recorder.Sync":1.847,"GpuMutex.wait.label":1.64,"Graphics.Draw":1.605,"Graphics.Draw.draw_and_resource_release":1.22,"Driver.Packet.draw":1.116},"trace_dropped":false,"trace":"aps5-trace-1a42f919a6e9-2277418.json.gz"}
{"commit":"df77f5b03af9","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":11831,"ms":30013.315},"presents":1799,"frame_ms":{"p50":16.683,"p90":16.688,"p99":16.693,"max":16.701},"gpu_busy_ms_per_present":2.171,"worker_busy_pct":{"queue worker 0x0":81.968},"top_phases_ms_per_frame":{"VideoOut.Flip":16.484,"VideoOut.Flip.vblank_wait":16.068,"Driver.Packet":13.658,"Driver.Packet.rendering_wait":9.33,"Graphics.Draw":1.756,"Graphics.Draw.draw_and_resource_release":1.384,"Driver.Packet.draw":0.842,"Driver.Draw":0.83},"trace_dropped":false,"trace":"aps5-trace-df77f5b03af9-2442745.json.gz"}

Local heads: main 525e299fc085c400de4a703c6b1ab105eefb50c7; budget 50202a158fcaf33eef0a0d844268e93c0a139b20; budget+deferred+fixture adjustment 1a42f919a6e92d9c34195aa685256c2f55909ede. #7465 authorship is preserved. Deferred-only control head df77f5b03af90adea68c72a1d818fd2539c118e5. Main has advanced since this pinned comparison.

AI-assisted investigation and testing.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6283167365 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6283167365). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-20T04:09:51Z. --- Follow-up isolation on pinned main `525e299fc085c400de4a703c6b1ab105eefb50c7`: removing #4449 and #7849 from the earlier combined experiment still reproduces the budget-only slowdown, while adding #7465 largely removes it in this stationary Lodoss PPSA05347 scene. | Production composition | Presents/s | Frame p50 ms | Frame p99 ms | Budget cuts | Failed imports (whole run) | |---|---:|---:|---:|---:|---:| | main | 51.65 | 18.506 | 27.948 | 11 | 2,912 | | main + #8091 | 29.73 | 32.472 | 51.783 | 0 | 846,997 | | main + #8091 + #7465 | 58.26 | 16.684 | 24.959 | 0 | 112 | | main + #7465 (control) | 59.94 | 16.683 | 16.693 | 3 | 75 | The budget-only run made 720,568 successful imports and 846,997 failed attempts; budget plus deferred imports made 174 successes and 112 failed attempts. All recorded failures were `vkAllocateMemory: -1000072003`. These are whole-run counters, not just the 30-second trace window. This supports small-map eager import churn as a major contributor to the standalone regression; it does not establish that this PR is beneficial once #7465 is present. The subsequent **#7465-only control measured 59.94 presents/s**, made 121 successful imports, refused 63 and failed 75, with three budget cuts. This isolates #7465 as sufficient for the observed gain over pinned main in this scene. Adding this PR did not improve that result (58.26 versus 59.94); one run per variant does not establish the size of a small regression. This PR remains draft; no standalone performance benefit is claimed. Protocol: same RX 6650 XT, RADV Mesa 26.2.4, Linux, 3840x2160, stationary opening tutorial, settings/input schedule, and independently cloned identical warm-seeded caches. Sequential order main → budget → budget+deferred → deferred-only; no reverse-order repeat in this set. Official trace window 200:30 seconds; no dropped trace events. All four 240-second screenshots were visually inspected and show the same scene with readable UI. Native exits were 0, PIDs disappeared and kernel configuration was restored. This is not cold-cache, Windows, sustained 60 FPS or full-game evidence. Focused Vulkan validation was **16/17 on each of the four variants**, with the same baseline `guest prefix unmap failed` / `VUID-vkResetFences-pFences-01123` in `agc_driver_guest_memory_lifetime`. No new VUID, missing-layer or skipped-test result. The deferred variant adjusts the existing eager-accounting fixture from 64 KiB to 128 KiB to match #7465; its added 64 KiB first-GPU-use test is retained. This test-only adjustment is included in the source patch. [Complete traces, official summary JSONL, source composition/patch, commands, cache manifests, validation/native logs and screenshots](https://github.com/JJenkx/AnyPS5/releases/download/game-library-checks-20261016/sync218-lodoss-import-isolation-evidence.tar.gz). [Additional deferred-only control trace, summaries for all four variants, source patch, cache manifest, validation/native logs and screenshots](https://github.com/JJenkx/AnyPS5/releases/download/game-library-checks-20261016/sync219-lodoss-deferred-control-evidence.tar.gz). Official summary lines (main, budget-only, budget+deferred, deferred-only respectively): ```jsonl {"commit":"525e299fc085","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":11177,"ms":30009.58},"presents":1550,"frame_ms":{"p50":18.506,"p90":23.005,"p99":27.948,"max":32.251},"gpu_busy_ms_per_present":2.21,"worker_busy_pct":{"queue worker 0x0":18.242},"top_phases_ms_per_frame":{"Driver.Packet":3.53,"VideoOut.Flip":1.844,"VideoOut.Flip.present":1.811,"Driver.Present":1.811,"Driver.Present.render_fence_wait":1.601,"Vulkan.Retire":1.601,"Vulkan.Retire.wait":1.597,"Graphics.Draw":1.335},"trace_dropped":false,"trace":"aps5-trace-525e299fc085-2049725.json.gz"} {"commit":"50202a158fca","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":10155,"ms":30001.881},"presents":892,"frame_ms":{"p50":32.472,"p90":41.475,"p99":51.783,"max":58.48},"gpu_busy_ms_per_present":2.55,"worker_busy_pct":{"queue worker 0x0":23.622},"top_phases_ms_per_frame":{"Driver.Packet":7.943,"Recorder.Sync":3.811,"GpuMutex.wait.label":3.023,"Graphics.Draw":2.412,"VideoOut.Flip":1.574,"VideoOut.Flip.present":1.534,"Driver.Present":1.532,"Driver.Packet.draw":1.346},"trace_dropped":false,"trace":"aps5-trace-50202a158fca-2149805.json.gz"} {"commit":"1a42f919a6e9","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":11639,"ms":30022.899},"presents":1749,"frame_ms":{"p50":16.684,"p90":19.734,"p99":24.959,"max":32.28},"gpu_busy_ms_per_present":2.466,"worker_busy_pct":{"queue worker 0x0":32.024},"top_phases_ms_per_frame":{"VideoOut.Flip":7.75,"VideoOut.Flip.vblank_wait":6.748,"Driver.Packet":5.495,"Recorder.Sync":1.847,"GpuMutex.wait.label":1.64,"Graphics.Draw":1.605,"Graphics.Draw.draw_and_resource_release":1.22,"Driver.Packet.draw":1.116},"trace_dropped":false,"trace":"aps5-trace-1a42f919a6e9-2277418.json.gz"} {"commit":"df77f5b03af9","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":11831,"ms":30013.315},"presents":1799,"frame_ms":{"p50":16.683,"p90":16.688,"p99":16.693,"max":16.701},"gpu_busy_ms_per_present":2.171,"worker_busy_pct":{"queue worker 0x0":81.968},"top_phases_ms_per_frame":{"VideoOut.Flip":16.484,"VideoOut.Flip.vblank_wait":16.068,"Driver.Packet":13.658,"Driver.Packet.rendering_wait":9.33,"Graphics.Draw":1.756,"Graphics.Draw.draw_and_resource_release":1.384,"Driver.Packet.draw":0.842,"Driver.Draw":0.83},"trace_dropped":false,"trace":"aps5-trace-df77f5b03af9-2442745.json.gz"} ``` Local heads: main `525e299fc085c400de4a703c6b1ab105eefb50c7`; budget `50202a158fcaf33eef0a0d844268e93c0a139b20`; budget+deferred+fixture adjustment `1a42f919a6e92d9c34195aa685256c2f55909ede`. #7465 authorship is preserved. Deferred-only control head `df77f5b03af90adea68c72a1d818fd2539c118e5`. Main has advanced since this pinned comparison. AI-assisted investigation and testing.
alfalfa-star commented 2026-10-20 17:45:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by alfalfa-star on 2026-10-20T17:45:34Z.


@JJenkx Data from a second title, where this fix is the difference between unplayable and normal: Kena: Bridge of Spirits (PPSA01802) 02.008.000.

Setup: RX 9070 XT (RADV GFX1201), RADV Mesa 26.2.4, Linux 7.2.9, i7-13700KF. Forest title scene from a fixed save, no input, APS5_TRACE_SECONDS=100:30, shared warm shader cache. main 3e7d1d297 built at its own commit, against this PR's head 1d6febae0 merged onto that main (merge ac17c9ece, no conflicts); three alternating rounds. agc_driver_graphics_tests passes on the merge.

On main the first three map-time imports fail with -1000072003 within a few seconds of boot, and the budget is never usable again:

[gpu] host import of 0x1720e00000+0x80000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by map
[gpu] host import of 0x1720e40000+0x40000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by map
[gpu] host import of 0x1720e60000+0x20000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by map
[gpu] host import budget lowered to the 3.0 MiB live after vkAllocateMemory failed 3 times in a row
per 150 s run main 3e7d1d297 this PR on main
presents per 30 s (rounds 1, 2, 3) 13, 14, 20 368, 401, 402
frame p50 1532–2441 ms 73–81 ms
budget lowered 22–37 times 0
imports refused 1.48–2.64 M 0
imports made 183–319 14,863–25,987
vkAllocateMemory failures 40–67, all -1000072003 3,938–5,991, all -1000072003
live at shutdown 0.4–3.2 MiB 4.3–5.3 GiB

No out-of-memory result appeared in any run, so the remaining ceiling path was not exercised. The invalid-handle failures with this PR are about 40 per second at most (split map / build / access as 1.8k / 3.7k / 0.4k in round 1), well below the 262k failures and 765k imports per Lodoss run in your description. The eager-import churn you found does not show at that scale here. No crash or GPU reset in the six runs.

main 3e7d1d297, round 1: tools/trace_digest.py

seconds 100:30 from present 450: 13 presents, frame p50 2441.4 / p90 2554.8 / p99 2601.6 / max 2601.6 ms, GPU busy 61.2 ms per present
AMD Radeon RX 9070 XT (RADV GFX1201), radv Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1, 3840x2160, commit 3e7d1d297c, dropped: no

{"commit":"3e7d1d297c62","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"100:30"},"gpu":"AMD Radeon RX 9070 XT (RADV GFX1201)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"13th Gen Intel(R) Core(TM) i7-13700KF","cpu_threads":24,"memory_mib":31870,"title_id":"PPSA01802","title":"Kena: Bridge of Spirits","content_version":"02.008.000","resolution":"3840x2160","window":{"spec":"seconds 100:30","first_present":450,"ms":31513.259},"presents":13,"frame_ms":{"p50":2441.396,"p90":2554.75,"p99":2601.564,"max":2601.564},"gpu_busy_ms_per_present":61.233,"worker_busy_pct":{"queue worker 0x0":99.921,"queue worker 0x20":84.266},"top_phases_ms_per_frame":{"Driver.Packet":4443.934,"Graphics.Draw":2305.59,"Graphics.Draw.draw_and_resource_release":2216.335,"Driver.Packet.memory_wait":2041.071,"Driver.Packet.draw":1429.666,"Driver.Draw":1429.082,"Driver.Draw.draw_enqueued":1365.488,"Driver.Packet.device_lock":783.518},"trace_dropped":false,"trace":"aps5-trace-3e7d1d297c62-220871.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 451: 2601.6 ms at 2555 ms: Driver.Packet (queue worker 0x0) 2567.1, Graphics.Draw (draw committer) 2477.3, Graphics.Draw.draw_and_resource_release (draw committer) 2392.9, Driver.Packet (queue worker 0x20) 2385.7
  • present 450: 2554.7 ms at 0 ms: Driver.Packet (queue worker 0x0) 2519.1, Graphics.Draw (draw committer) 2420.1, Graphics.Draw.draw_and_resource_release (draw committer) 2307.1, Driver.Packet (queue worker 0x20) 2241.9
  • present 459: 2497.9 ms at 21903 ms: Driver.Packet (queue worker 0x0) 2465.9, Graphics.Draw (draw committer) 2380.2, Graphics.Draw.draw_and_resource_release (draw committer) 2285.0, Driver.Packet (queue worker 0x20) 2242.9

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 2382.5 (98 %) 30.7 (1 %) 10.9 86.5 Driver.Packet 2392.4, Driver.EndSubmission 20.8
draw committer 2023.6 (83 %) 300.2 (12 %) 100.3 23.4 Graphics.Draw 2301.7, Recorder.Sync 21.2
presenter 0.1 (0 %) 0.1 (0 %) 2423.8 0.1 VideoOut.Flip 0.2, Driver.Present 0.1
queue worker 0x20 0.4 (0 %) 2255.6 (93 %) 168.1 0.1 Driver.Packet 2042.5, Driver.EndSubmission 0.1
gpu 61.1 (3 %) 0.0 (0 %) 2363.0 0.0 batch 61.1

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 4435.0, Graphics.Draw 2305.5, Graphics.Draw.draw_and_resource_release 2216.0, Driver.Packet.memory_wait 2041.1, Driver.Packet.draw 1427.7, Driver.Draw 1427.1

Longest waits

  • Driver.Packet.memory_wait (queue worker 0x20) 2380.6 ms at 2851 ms, present 451
  • Driver.Packet.memory_wait (queue worker 0x20) 2322.0 ms at 313 ms, present 450
  • Driver.Packet.memory_wait (queue worker 0x20) 2273.9 ms at 12507 ms, present 455
  • Driver.Packet.memory_wait (queue worker 0x20) 2261.3 ms at 14986 ms, present 456
  • Driver.Packet.memory_wait (queue worker 0x20) 2231.6 ms at 7871 ms, present 453
  • Driver.Packet.memory_wait (queue worker 0x20) 2230.7 ms at 19749 ms, present 458

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 1372: 6.6 ms at 12389 ms, present 455: GPU no ranges; recorded by Graphics.Draw (draw committer) 27.3, Graphics.Draw.draw_and_resource_release (draw committer) 14.2, Graphics.Draw.validate (draw committer) 11.8, Resources.Complete (draw committer) 11.7
  • batch 2679: 6.6 ms at 24547 ms, present 460: GPU no ranges; recorded by Graphics.Draw (draw committer) 24.6, Graphics.Draw.draw_and_resource_release (draw committer) 12.7, Graphics.Draw.validate (draw committer) 10.8, Resources.Complete (draw committer) 10.6
  • batch 2948: 6.6 ms at 26893 ms, present 461: GPU no ranges; recorded by Graphics.Draw (draw committer) 27.8, Graphics.Draw.draw_and_resource_release (draw committer) 14.6, Resources.Complete (draw committer) 12.3, Graphics.Draw.validate (draw committer) 12.0
this PR on main (ac17c9ece), round 1: tools/trace_digest.py

seconds 100:30 from present 961: 368 presents, frame p50 81.3 / p90 86.3 / p99 103.2 / max 117.5 ms, GPU busy 45.2 ms per present
AMD Radeon RX 9070 XT (RADV GFX1201), radv Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1, 3840x2160, commit ac17c9ece2b3, dropped: yes

{"commit":"ac17c9ece2b3","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"100:30"},"gpu":"AMD Radeon RX 9070 XT (RADV GFX1201)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"13th Gen Intel(R) Core(TM) i7-13700KF","cpu_threads":24,"memory_mib":31870,"title_id":"PPSA01802","title":"Kena: Bridge of Spirits","content_version":"02.008.000","resolution":"3840x2160","window":{"spec":"seconds 100:30","first_present":961,"ms":30020.603},"presents":368,"frame_ms":{"p50":81.323,"p90":86.326,"p99":103.224,"max":117.485},"gpu_busy_ms_per_present":45.198,"worker_busy_pct":{"queue worker 0x0":98.68,"queue worker 0x20":70.805},"top_phases_ms_per_frame":{"Driver.Packet":137.376,"Driver.Packet.memory_wait":56.776,"Graphics.Draw":41.416,"Driver.Packet.draw":40.46,"Driver.Draw":40.303,"Graphics.Draw.draw_and_resource_release":26.909,"Driver.Draw.shader_compile_and_link":20.995,"Shader.DrawStage":18.848},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.848,"events_lost":892495,"totals_full":false},"draw committer":{"events_full_after_s":21.881,"events_lost":97763,"totals_full":false}},"trace":"aps5-trace-ac17c9ece2b3-224752.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 1324: 117.5 ms at 29521 ms: Driver.Packet (queue worker 0x20) 76.7, Driver.Packet.memory_wait (queue worker 0x20) 76.4, batch (gpu) 44.9, Driver.WorkerWait (queue worker 0x20) 40.6
  • present 1208: 113.5 ms at 19874 ms: Driver.Packet (queue worker 0x20) 78.6, Driver.Packet.memory_wait (queue worker 0x20) 77.9, Graphics.Draw (draw committer) 65.3, batch (gpu) 45.4
  • present 1326: 103.6 ms at 29741 ms: Driver.Packet (queue worker 0x20) 68.9, Driver.Packet.memory_wait (queue worker 0x20) 67.9, batch (gpu) 44.7, Driver.WorkerWait (queue worker 0x20) 34.0

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 15.9 (19 %) 0.0 (0 %) 65.7 17.0 Driver.Packet 15.8, Driver.EndSubmission 0.1
draw committer 26.3 (32 %) 0.2 (0 %) 55.1 15.2 Graphics.Draw 24.2, Recorder.Submit 2.0
presenter 0.2 (0 %) 0.7 (1 %) 80.6 0.1 VideoOut.Flip 0.9, Driver.Present 0.0
queue worker 0x20 0.4 (0 %) 81.0 (99 %) 0.2 0.1 Driver.Packet 57.4, Driver.EndSubmission 0.3
gpu 45.2 (55 %) 0.0 (0 %) 36.4 0.0 batch 45.2

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 73.2, Driver.Packet.memory_wait 56.8, batch 45.2, Graphics.Draw 24.2, Driver.WorkerWait 23.7, Driver.WorkerWait.idle_and_completion_poll 23.7

Longest waits

  • Driver.Packet.memory_wait (queue worker 0x20) 78.0 ms at 19926 ms, present 1208
  • Driver.Packet.memory_wait (queue worker 0x20) 75.7 ms at 29589 ms, present 1324
  • Driver.Packet.memory_wait (queue worker 0x20) 70.5 ms at 29477 ms, present 1323
  • Driver.Packet.memory_wait (queue worker 0x20) 68.7 ms at 29698 ms, present 1325
  • Driver.Packet.memory_wait (queue worker 0x20) 65.5 ms at 29803 ms, present 1326
  • Driver.Packet.memory_wait (queue worker 0x20) 65.1 ms at 29291 ms, present 1321

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 9211: 8.9 ms at 13626 ms, present 1130: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, GpuMutex.wait.end (draw committer) 0.1, Recorder.Submit (draw committer) 0.1
  • batch 10627: 8.9 ms at 15738 ms, present 1156: GPU no ranges; recorded by no CPU slices
  • batch 4609: 8.9 ms at 6810 ms, present 1045: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.9, Driver.Packet.device_lock (queue worker 0x0) 0.4, Driver.Packet.draw (queue worker 0x0) 0.3, Driver.Draw (queue worker 0x0) 0.3

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6297327216 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6297327216). Originally posted by [alfalfa-star](https://github.com/alfalfa-star) on 2026-10-20T17:45:34Z. --- @JJenkx Data from a second title, where this fix is the difference between unplayable and normal: Kena: Bridge of Spirits (PPSA01802) 02.008.000. Setup: RX 9070 XT (RADV GFX1201), RADV Mesa 26.2.4, Linux 7.2.9, i7-13700KF. Forest title scene from a fixed save, no input, `APS5_TRACE_SECONDS=100:30`, shared warm shader cache. `main` 3e7d1d297 built at its own commit, against this PR's head 1d6febae0 merged onto that `main` (merge ac17c9ece, no conflicts); three alternating rounds. `agc_driver_graphics_tests` passes on the merge. On `main` the first three map-time imports fail with `-1000072003` within a few seconds of boot, and the budget is never usable again: ``` [gpu] host import of 0x1720e00000+0x80000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by map [gpu] host import of 0x1720e40000+0x40000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by map [gpu] host import of 0x1720e60000+0x20000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by map [gpu] host import budget lowered to the 3.0 MiB live after vkAllocateMemory failed 3 times in a row ``` | per 150 s run | `main` 3e7d1d297 | this PR on `main` | |---|---|---| | presents per 30 s (rounds 1, 2, 3) | 13, 14, 20 | 368, 401, 402 | | frame p50 | 1532–2441 ms | 73–81 ms | | budget lowered | 22–37 times | 0 | | imports refused | 1.48–2.64 M | 0 | | imports made | 183–319 | 14,863–25,987 | | `vkAllocateMemory` failures | 40–67, all `-1000072003` | 3,938–5,991, all `-1000072003` | | live at shutdown | 0.4–3.2 MiB | 4.3–5.3 GiB | No out-of-memory result appeared in any run, so the remaining ceiling path was not exercised. The invalid-handle failures with this PR are about 40 per second at most (split map / build / access as 1.8k / 3.7k / 0.4k in round 1), well below the 262k failures and 765k imports per Lodoss run in your description. The eager-import churn you found does not show at that scale here. No crash or GPU reset in the six runs. <details><summary><code>main</code> 3e7d1d297, round 1: <code>tools/trace_digest.py</code></summary> **seconds 100:30** from present 450: 13 presents, frame p50 2441.4 / p90 2554.8 / p99 2601.6 / max 2601.6 ms, GPU busy 61.2 ms per present AMD Radeon RX 9070 XT (RADV GFX1201), radv Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1, 3840x2160, commit 3e7d1d297c62, dropped: no ```json {"commit":"3e7d1d297c62","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"100:30"},"gpu":"AMD Radeon RX 9070 XT (RADV GFX1201)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"13th Gen Intel(R) Core(TM) i7-13700KF","cpu_threads":24,"memory_mib":31870,"title_id":"PPSA01802","title":"Kena: Bridge of Spirits","content_version":"02.008.000","resolution":"3840x2160","window":{"spec":"seconds 100:30","first_present":450,"ms":31513.259},"presents":13,"frame_ms":{"p50":2441.396,"p90":2554.75,"p99":2601.564,"max":2601.564},"gpu_busy_ms_per_present":61.233,"worker_busy_pct":{"queue worker 0x0":99.921,"queue worker 0x20":84.266},"top_phases_ms_per_frame":{"Driver.Packet":4443.934,"Graphics.Draw":2305.59,"Graphics.Draw.draw_and_resource_release":2216.335,"Driver.Packet.memory_wait":2041.071,"Driver.Packet.draw":1429.666,"Driver.Draw":1429.082,"Driver.Draw.draw_enqueued":1365.488,"Driver.Packet.device_lock":783.518},"trace_dropped":false,"trace":"aps5-trace-3e7d1d297c62-220871.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 451: 2601.6 ms at 2555 ms: Driver.Packet (queue worker 0x0) 2567.1, Graphics.Draw (draw committer) 2477.3, Graphics.Draw.draw_and_resource_release (draw committer) 2392.9, Driver.Packet (queue worker 0x20) 2385.7 - present 450: 2554.7 ms at 0 ms: Driver.Packet (queue worker 0x0) 2519.1, Graphics.Draw (draw committer) 2420.1, Graphics.Draw.draw_and_resource_release (draw committer) 2307.1, Driver.Packet (queue worker 0x20) 2241.9 - present 459: 2497.9 ms at 21903 ms: Driver.Packet (queue worker 0x0) 2465.9, Graphics.Draw (draw committer) 2380.2, Graphics.Draw.draw_and_resource_release (draw committer) 2285.0, Driver.Packet (queue worker 0x20) 2242.9 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 2382.5 (98 %) | 30.7 (1 %) | 10.9 | 86.5 | Driver.Packet 2392.4, Driver.EndSubmission 20.8 | | draw committer | 2023.6 (83 %) | 300.2 (12 %) | 100.3 | 23.4 | Graphics.Draw 2301.7, Recorder.Sync 21.2 | | presenter | 0.1 (0 %) | 0.1 (0 %) | 2423.8 | 0.1 | VideoOut.Flip 0.2, Driver.Present 0.1 | | queue worker 0x20 | 0.4 (0 %) | 2255.6 (93 %) | 168.1 | 0.1 | Driver.Packet 2042.5, Driver.EndSubmission 0.1 | | gpu | 61.1 (3 %) | 0.0 (0 %) | 2363.0 | 0.0 | batch 61.1 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 4435.0, Graphics.Draw 2305.5, Graphics.Draw.draw_and_resource_release 2216.0, Driver.Packet.memory_wait 2041.1, Driver.Packet.draw 1427.7, Driver.Draw 1427.1 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x20) 2380.6 ms at 2851 ms, present 451 - Driver.Packet.memory_wait (queue worker 0x20) 2322.0 ms at 313 ms, present 450 - Driver.Packet.memory_wait (queue worker 0x20) 2273.9 ms at 12507 ms, present 455 - Driver.Packet.memory_wait (queue worker 0x20) 2261.3 ms at 14986 ms, present 456 - Driver.Packet.memory_wait (queue worker 0x20) 2231.6 ms at 7871 ms, present 453 - Driver.Packet.memory_wait (queue worker 0x20) 2230.7 ms at 19749 ms, present 458 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 1372: 6.6 ms at 12389 ms, present 455: GPU no ranges; recorded by Graphics.Draw (draw committer) 27.3, Graphics.Draw.draw_and_resource_release (draw committer) 14.2, Graphics.Draw.validate (draw committer) 11.8, Resources.Complete (draw committer) 11.7 - batch 2679: 6.6 ms at 24547 ms, present 460: GPU no ranges; recorded by Graphics.Draw (draw committer) 24.6, Graphics.Draw.draw_and_resource_release (draw committer) 12.7, Graphics.Draw.validate (draw committer) 10.8, Resources.Complete (draw committer) 10.6 - batch 2948: 6.6 ms at 26893 ms, present 461: GPU no ranges; recorded by Graphics.Draw (draw committer) 27.8, Graphics.Draw.draw_and_resource_release (draw committer) 14.6, Resources.Complete (draw committer) 12.3, Graphics.Draw.validate (draw committer) 12.0 </details> <details><summary>this PR on <code>main</code> (ac17c9ece), round 1: <code>tools/trace_digest.py</code></summary> **seconds 100:30** from present 961: 368 presents, frame p50 81.3 / p90 86.3 / p99 103.2 / max 117.5 ms, GPU busy 45.2 ms per present AMD Radeon RX 9070 XT (RADV GFX1201), radv Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1, 3840x2160, commit ac17c9ece2b3, dropped: yes ```json {"commit":"ac17c9ece2b3","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"100:30"},"gpu":"AMD Radeon RX 9070 XT (RADV GFX1201)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"13th Gen Intel(R) Core(TM) i7-13700KF","cpu_threads":24,"memory_mib":31870,"title_id":"PPSA01802","title":"Kena: Bridge of Spirits","content_version":"02.008.000","resolution":"3840x2160","window":{"spec":"seconds 100:30","first_present":961,"ms":30020.603},"presents":368,"frame_ms":{"p50":81.323,"p90":86.326,"p99":103.224,"max":117.485},"gpu_busy_ms_per_present":45.198,"worker_busy_pct":{"queue worker 0x0":98.68,"queue worker 0x20":70.805},"top_phases_ms_per_frame":{"Driver.Packet":137.376,"Driver.Packet.memory_wait":56.776,"Graphics.Draw":41.416,"Driver.Packet.draw":40.46,"Driver.Draw":40.303,"Graphics.Draw.draw_and_resource_release":26.909,"Driver.Draw.shader_compile_and_link":20.995,"Shader.DrawStage":18.848},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.848,"events_lost":892495,"totals_full":false},"draw committer":{"events_full_after_s":21.881,"events_lost":97763,"totals_full":false}},"trace":"aps5-trace-ac17c9ece2b3-224752.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 1324: 117.5 ms at 29521 ms: Driver.Packet (queue worker 0x20) 76.7, Driver.Packet.memory_wait (queue worker 0x20) 76.4, batch (gpu) 44.9, Driver.WorkerWait (queue worker 0x20) 40.6 - present 1208: 113.5 ms at 19874 ms: Driver.Packet (queue worker 0x20) 78.6, Driver.Packet.memory_wait (queue worker 0x20) 77.9, Graphics.Draw (draw committer) 65.3, batch (gpu) 45.4 - present 1326: 103.6 ms at 29741 ms: Driver.Packet (queue worker 0x20) 68.9, Driver.Packet.memory_wait (queue worker 0x20) 67.9, batch (gpu) 44.7, Driver.WorkerWait (queue worker 0x20) 34.0 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 15.9 (19 %) | 0.0 (0 %) | 65.7 | 17.0 | Driver.Packet 15.8, Driver.EndSubmission 0.1 | | draw committer | 26.3 (32 %) | 0.2 (0 %) | 55.1 | 15.2 | Graphics.Draw 24.2, Recorder.Submit 2.0 | | presenter | 0.2 (0 %) | 0.7 (1 %) | 80.6 | 0.1 | VideoOut.Flip 0.9, Driver.Present 0.0 | | queue worker 0x20 | 0.4 (0 %) | 81.0 (99 %) | 0.2 | 0.1 | Driver.Packet 57.4, Driver.EndSubmission 0.3 | | gpu | 45.2 (55 %) | 0.0 (0 %) | 36.4 | 0.0 | batch 45.2 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 73.2, Driver.Packet.memory_wait 56.8, batch 45.2, Graphics.Draw 24.2, Driver.WorkerWait 23.7, Driver.WorkerWait.idle_and_completion_poll 23.7 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x20) 78.0 ms at 19926 ms, present 1208 - Driver.Packet.memory_wait (queue worker 0x20) 75.7 ms at 29589 ms, present 1324 - Driver.Packet.memory_wait (queue worker 0x20) 70.5 ms at 29477 ms, present 1323 - Driver.Packet.memory_wait (queue worker 0x20) 68.7 ms at 29698 ms, present 1325 - Driver.Packet.memory_wait (queue worker 0x20) 65.5 ms at 29803 ms, present 1326 - Driver.Packet.memory_wait (queue worker 0x20) 65.1 ms at 29291 ms, present 1321 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 9211: 8.9 ms at 13626 ms, present 1130: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, GpuMutex.wait.end (draw committer) 0.1, Recorder.Submit (draw committer) 0.1 - batch 10627: 8.9 ms at 15738 ms, present 1156: GPU no ranges; recorded by no CPU slices - batch 4609: 8.9 ms at 6810 ms, present 1045: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.9, Driver.Packet.device_lock (queue worker 0x0) 0.4, Driver.Packet.draw (queue worker 0x0) 0.3, Driver.Draw (queue worker 0x0) 0.3 </details> AI-assisted: yes (Claude Code)
JJenkx commented 2026-10-21 00:46:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T00:46:54Z.


A fresh matched PPSA05347 (Lodoss) pair reproduces the regression on pinned main e10b4d6190479edcabfe3f805169b76b18ffaaaa versus exactly that main plus this PR (5a40175977afa9c2222f8cb961685eca5d452128). No other PRs are included. Upstream main advanced during the comparison, so these are pinned-base results.

Same machine (Ryzen 9 7950X / RX 6650 XT), stationary opening tutorial, identical warm-cache clones (625-file SHA256 manifests match), input schedule, pipeline/DMA settings and 250-second close protocol. This is one ordered pair, not a cold-cache or general speed claim.

seconds 200:30 pinned main main + this PR
Presents / window 1257 / 30.002474 s 761 / 30.003735 s
Presents/s 41.90 25.36
Frame p50 / p90 / p99 / max, ms 23.446 / 29.504 / 34.965 / 36.166 38.296 / 51.204 / 61.599 / 70.364
Whole-run invalid-handle failures 3,341 915,517
Whole-run successful imports 6,824 609,517
Budget reductions 20 0

Both runs reached matching tutorial screenshots, exited 0 with no surviving native PID, restored the udmabuf limit to 64 MiB and produced complete traces (no dropped events). Neither native log contained VUIDs; the matched focused validation runs explicitly enabled core validation, required Vulkan and disabled shader cache: both passed agc_driver_graphics and agc_driver_host_import_failure_handles (2/2, no skips, missing validation layer or VUIDs).

The PR remains draft. Removing global budget suppression exposes repeated eager map-import failures; all failed imports in this pair were requester map. The existing failure caches need investigation before calling this ready. This does not contradict the independently reported Kena benefit.

Evidence archive: full traces and official trace-digest summaries, native logs/screenshots, source pins, protocols/results, focused validation logs and cache manifest. SHA256: e7682c2ccb8ea5af88ca6575c6d120c72ee3203ccf92f900438d0a4257500e6c.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6305169624 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6305169624). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-21T00:46:54Z. --- A fresh matched PPSA05347 (Lodoss) pair reproduces the regression on pinned main `e10b4d6190479edcabfe3f805169b76b18ffaaaa` versus exactly that main plus this PR (`5a40175977afa9c2222f8cb961685eca5d452128`). No other PRs are included. Upstream main advanced during the comparison, so these are pinned-base results. Same machine (Ryzen 9 7950X / RX 6650 XT), stationary opening tutorial, identical warm-cache clones (625-file SHA256 manifests match), input schedule, pipeline/DMA settings and 250-second close protocol. This is one ordered pair, not a cold-cache or general speed claim. | seconds 200:30 | pinned main | main + this PR | |---|---:|---:| | Presents / window | 1257 / 30.002474 s | 761 / 30.003735 s | | Presents/s | 41.90 | 25.36 | | Frame p50 / p90 / p99 / max, ms | 23.446 / 29.504 / 34.965 / 36.166 | 38.296 / 51.204 / 61.599 / 70.364 | | Whole-run invalid-handle failures | 3,341 | 915,517 | | Whole-run successful imports | 6,824 | 609,517 | | Budget reductions | 20 | 0 | Both runs reached matching tutorial screenshots, exited 0 with no surviving native PID, restored the udmabuf limit to 64 MiB and produced complete traces (no dropped events). Neither native log contained VUIDs; the matched focused validation runs explicitly enabled core validation, required Vulkan and disabled shader cache: both passed `agc_driver_graphics` and `agc_driver_host_import_failure_handles` (2/2, no skips, missing validation layer or VUIDs). The PR remains draft. Removing global budget suppression exposes repeated eager map-import failures; all failed imports in this pair were requester `map`. The existing failure caches need investigation before calling this ready. This does not contradict the independently reported Kena benefit. [Evidence archive](https://github.com/JJenkx/AnyPS5/releases/download/game-library-checks-20261016/pr8091-e10b-paired-evidence.tar.gz): full traces and official trace-digest summaries, native logs/screenshots, source pins, protocols/results, focused validation logs and cache manifest. SHA256: `e7682c2ccb8ea5af88ca6575c6d120c72ee3203ccf92f900438d0a4257500e6c`.
JJenkx commented 2026-10-21 02:26:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T02:26:44Z.


Pinned Lodoss follow-up: this PR remains in draft. One ordered main / +#8091 / +#8091+#8802 comparison on main 6c12024f7d9b reached the same tutorial scene on all three variants. All six 190/240-second screenshots were inspected; each shows the centered player between the stone columns and the sword/jump prompt. No visible corruption was apparent in those captures.

Same machine: Ryzen 9 7950X (32 threads), RX 6650 XT RADV, Mesa 26.2.4, Linux 7.2.9, 3840×2160. Each variant started with an identical 625-file warm-cache seed and identical three-file private save seed. Same scripted input, APS5_PIPELINED_DRAWS=1, pipeline DMA, full SPIR-V optimization, host import limit 16384 MiB; trace window 200:30, close at 250 seconds.

Variant Commit FPS (30 s) Failed imports (full run) Budget cuts
main 6c12024f7d9b 36.166 154 20
main + #8091 56a11404511e 30.732 640,560 0
main + #8091 + #8802 cda85abc3b9b 27.479 492,094 0

Every recorded import failure was vkAllocateMemory (-1000072003). The budget-only run made 737,288 imports and failed 640,560 times; its terminal log was 80 MB. Adding #8802 reduced failures to 492,094, but did not recover performance in this triplet. This is consistent with substantial remaining retry churn; these counts alone do not establish allocation identity or why a remembered failure stopped applying.

All three builds passed agc_driver_graphics and agc_driver_host_import_failure_handles with the actual Khronos layer inserted and no VUIDs. Native performance captures had validation disabled, no trace drops, exited zero, and restored the kernel udmabuf limit.

Limits: one ordered run per variant, so run-order effects remain unmeasured; the import totals cover the full run while FPS covers only the 30-second trace window. This is diagnostic evidence and supports keeping this PR in draft. No title speedup is claimed. Next is investigating the remaining retry invalidation and repeating the relevant pair in reverse order after a supported fix.

Official trace summary lines (main, +8091, +8091+8802)
{"commit":"6c12024f7d9b","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA05347","title":"Record of Lodoss War -Deedlit in Wonder Labyrinth-","content_version":"01.000.001","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":10478,"ms":30000.269},"presents":1085,"frame_ms":{"p50":26.411,"p90":47.878,"p99":55.577,"max":58.975},"gpu_busy_ms_per_present":2.74,"worker_busy_pct":{"queue worker 0x0":62.69},"top_phases_ms_per_frame":{"Driver.Packet":17.327,"Recorder.Sync":5.844,"Graphics.Draw":5.832,"Graphics.Draw.validate":3.922,"Graphics.Draw.draw_and_resource_release":1.885,"Driver.Packet.draw":1.559,"Driver.Draw":1.538,"VideoOut.Flip":1.481},"trace_dropped":false,"trace":"aps5-trace-6c12024f7d9b-1221131.json.gz"}
{"commit":"56a11404511e","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA05347","title":"Record of Lodoss War -Deedlit in Wonder Labyrinth-","content_version":"01.000.001","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":10146,"ms":30001.06},"presents":922,"frame_ms":{"p50":30.587,"p90":40.874,"p99":49.175,"max":55.53},"gpu_busy_ms_per_present":2.218,"worker_busy_pct":{"queue worker 0x0":18.979},"top_phases_ms_per_frame":{"Driver.Packet":6.173,"Recorder.Sync":2.338,"Graphics.Draw":2.198,"VideoOut.Flip":1.419,"VideoOut.Flip.present":1.378,"Driver.Present":1.377,"Graphics.Draw.draw_and_resource_release":1.277,"GpuMutex.wait.flush":1.047},"trace_dropped":false,"trace":"aps5-trace-56a11404511e-1426753.json.gz"}
{"commit":"cda85abc3b9b","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA05347","title":"Record of Lodoss War -Deedlit in Wonder Labyrinth-","content_version":"01.000.001","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":9667,"ms":30023.159},"presents":825,"frame_ms":{"p50":35.232,"p90":44.447,"p99":53.038,"max":59.907},"gpu_busy_ms_per_present":2.27,"worker_busy_pct":{"queue worker 0x0":27.004},"top_phases_ms_per_frame":{"Driver.Packet":9.824,"Graphics.Draw":3.58,"Recorder.Sync":3.129,"GpuMutex.wait.flush":2.174,"Graphics.Draw.validate":2.013,"Graphics.Draw.draw_and_resource_release":1.549,"Driver.Packet.draw":1.322,"Driver.Draw":1.305},"trace_dropped":false,"trace":"aps5-trace-cda85abc3b9b-1612021.json.gz"}
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6306475211 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6306475211). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-21T02:26:44Z. --- Pinned Lodoss follow-up: this PR remains in draft. One ordered main / +#8091 / +#8091+#8802 comparison on main `6c12024f7d9b` reached the same tutorial scene on all three variants. All six 190/240-second screenshots were inspected; each shows the centered player between the stone columns and the sword/jump prompt. No visible corruption was apparent in those captures. Same machine: Ryzen 9 7950X (32 threads), RX 6650 XT RADV, Mesa 26.2.4, Linux 7.2.9, 3840×2160. Each variant started with an identical 625-file warm-cache seed and identical three-file private save seed. Same scripted input, `APS5_PIPELINED_DRAWS=1`, pipeline DMA, full SPIR-V optimization, host import limit 16384 MiB; trace window `200:30`, close at 250 seconds. | Variant | Commit | FPS (30 s) | Failed imports (full run) | Budget cuts | |---|---|---:|---:|---:| | main | `6c12024f7d9b` | 36.166 | 154 | 20 | | main + #8091 | `56a11404511e` | 30.732 | 640,560 | 0 | | main + #8091 + #8802 | `cda85abc3b9b` | 27.479 | 492,094 | 0 | Every recorded import failure was `vkAllocateMemory (-1000072003)`. The budget-only run made 737,288 imports and failed 640,560 times; its terminal log was 80 MB. Adding #8802 reduced failures to 492,094, but did not recover performance in this triplet. This is consistent with substantial remaining retry churn; these counts alone do not establish allocation identity or why a remembered failure stopped applying. All three builds passed `agc_driver_graphics` and `agc_driver_host_import_failure_handles` with the actual Khronos layer inserted and no VUIDs. Native performance captures had validation disabled, no trace drops, exited zero, and restored the kernel udmabuf limit. Limits: one ordered run per variant, so run-order effects remain unmeasured; the import totals cover the full run while FPS covers only the 30-second trace window. This is diagnostic evidence and supports keeping this PR in draft. No title speedup is claimed. Next is investigating the remaining retry invalidation and repeating the relevant pair in reverse order after a supported fix. <details><summary>Official trace summary lines (main, +8091, +8091+8802)</summary> ```json {"commit":"6c12024f7d9b","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA05347","title":"Record of Lodoss War -Deedlit in Wonder Labyrinth-","content_version":"01.000.001","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":10478,"ms":30000.269},"presents":1085,"frame_ms":{"p50":26.411,"p90":47.878,"p99":55.577,"max":58.975},"gpu_busy_ms_per_present":2.74,"worker_busy_pct":{"queue worker 0x0":62.69},"top_phases_ms_per_frame":{"Driver.Packet":17.327,"Recorder.Sync":5.844,"Graphics.Draw":5.832,"Graphics.Draw.validate":3.922,"Graphics.Draw.draw_and_resource_release":1.885,"Driver.Packet.draw":1.559,"Driver.Draw":1.538,"VideoOut.Flip":1.481},"trace_dropped":false,"trace":"aps5-trace-6c12024f7d9b-1221131.json.gz"} {"commit":"56a11404511e","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA05347","title":"Record of Lodoss War -Deedlit in Wonder Labyrinth-","content_version":"01.000.001","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":10146,"ms":30001.06},"presents":922,"frame_ms":{"p50":30.587,"p90":40.874,"p99":49.175,"max":55.53},"gpu_busy_ms_per_present":2.218,"worker_busy_pct":{"queue worker 0x0":18.979},"top_phases_ms_per_frame":{"Driver.Packet":6.173,"Recorder.Sync":2.338,"Graphics.Draw":2.198,"VideoOut.Flip":1.419,"VideoOut.Flip.present":1.378,"Driver.Present":1.377,"Graphics.Draw.draw_and_resource_release":1.277,"GpuMutex.wait.flush":1.047},"trace_dropped":false,"trace":"aps5-trace-56a11404511e-1426753.json.gz"} {"commit":"cda85abc3b9b","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA05347","title":"Record of Lodoss War -Deedlit in Wonder Labyrinth-","content_version":"01.000.001","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":9667,"ms":30023.159},"presents":825,"frame_ms":{"p50":35.232,"p90":44.447,"p99":53.038,"max":59.907},"gpu_busy_ms_per_present":2.27,"worker_busy_pct":{"queue worker 0x0":27.004},"top_phases_ms_per_frame":{"Driver.Packet":9.824,"Graphics.Draw":3.58,"Recorder.Sync":3.129,"GpuMutex.wait.flush":2.174,"Graphics.Draw.validate":2.013,"Graphics.Draw.draw_and_resource_release":1.549,"Driver.Packet.draw":1.322,"Driver.Draw":1.305},"trace_dropped":false,"trace":"aps5-trace-cda85abc3b9b-1612021.json.gz"} ``` </details>
JJenkx commented 2026-10-21 02:31:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T02:31:14Z.


Correction to the preceding experiment report: another local worker has since supplied build timestamps showing that its -j4 build ran continuously from approximately 22:17–22:31 local time. That covers the entire final main + #8091 + #8802 native run (22:21:33–22:25:46), including its 200–230-second capture. Its 27.479 FPS result therefore must not be treated as a clean performance comparison; I withdraw that timing comparison.

An earlier build also overlapped the beginning of the main + #8091 run (22:13:06–22:17:19) until 22:13:49. The supplied timestamps do not place a build inside that run's later 200–230-second capture, but the run as a whole was not isolated either. The baseline ran 22:03:32–22:07:45. Treat this triplet as diagnostic evidence, not a controlled title performance comparison; replacement isolated captures are needed.

The recorded import-failure counts remain observations, but do not establish a performance effect or an ownership-invalidation cause. #8091 remains draft; no speedup is claimed.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6306533481 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6306533481). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-21T02:31:14Z. --- Correction to the preceding experiment report: another local worker has since supplied build timestamps showing that its `-j4` build ran continuously from approximately 22:17–22:31 local time. That covers the entire final `main + #8091 + #8802` native run (22:21:33–22:25:46), including its 200–230-second capture. Its 27.479 FPS result therefore **must not be treated as a clean performance comparison**; I withdraw that timing comparison. An earlier build also overlapped the beginning of the `main + #8091` run (22:13:06–22:17:19) until 22:13:49. The supplied timestamps do not place a build inside that run's later 200–230-second capture, but the run as a whole was not isolated either. The baseline ran 22:03:32–22:07:45. Treat this triplet as diagnostic evidence, not a controlled title performance comparison; replacement isolated captures are needed. The recorded import-failure counts remain observations, but do not establish a performance effect or an ownership-invalidation cause. #8091 remains draft; no speedup is claimed.
3mro777o commented 2026-10-21 13:12:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by 3mro777o on 2026-10-21T13:12:21Z.


Another title: Stellar Blade (PPSA13195) 01.014.001, Unreal Engine. Linux 7.2.8 (Omarchy), Ryzen 5 5600X, 16 GiB RAM, Radeon RX 6700 XT, RADV Mesa 26.2.5. GTT is 7931 MiB on this machine, smaller than VRAM.

Pins: main 11bb53a34 and main + this PR cherry-picked (71d29197f), Release builds from one worktree, only libSceAgcDriver.prx (and libSceVideoOut.prx) differ between the two runtime directories. Same relinked executable, same input schedule (Return every 4 s after the startup screens), APS5_PLAYGO_UNLISTED_CHUNKS=absent. A monitor stops the game with SIGTERM when system GTT use passes 85 %, because earlier unguarded runs here ran GTT out and took the compositor down with them.

Run Budget reductions -1000072003 import failures Outcome
main 3 (to 22, then ~108 MiB) 13 GTT plateau ~3.9 GiB, then a jump to 6.7 GiB at ~172 s; stopped by the monitor at 175 s
main + #8091, run 1 0 4595 Unreal Ran out of memory allocating 548682072064 bytes (0x7FC0000000), SIGSEGV at 37 s, GTT 4.4 GiB
main + #8091, run 2 0 4958 imports reach the default 3965 MiB budget while the host heap report says 5133 of 7869 MiB used; GTT 6.85 GiB, stopped by the monitor at 44 s
main + #8091, APS5_HOST_IMPORT_MIB=2048 0 4236 4.28 M refused imports (4.21 M remembered); SIGSEGV at 40.6 s reading 0x207a900000 in libc; GTT 5.6 GiB

On main the game's own fdinfo shows ~6.6 GiB GTT and ~4.6 GiB VRAM at the stop, so with imports held at ~100 MiB most of that GTT is not imports. With this PR the imports no longer collapse, but on this machine the default budget (about half of the host heap) plus the rest of the title's host-heap use exceeds GTT, and the budget does not follow the VK_EXT_memory_budget report unless an allocation fails; here exhaustion shows up at command submission, not at vkAllocateMemory.

These are single runs, not traces, and the crashes with this PR are not attributed: the 0x7FC0000000 size and the libc read could be stale data rather than anything this change does. I have not compared frame times.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6316934385 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6316934385). Originally posted by [3mro777o](https://github.com/3mro777o) on 2026-10-21T13:12:21Z. --- Another title: **Stellar Blade (PPSA13195) 01.014.001**, Unreal Engine. Linux 7.2.8 (Omarchy), Ryzen 5 5600X, 16 GiB RAM, Radeon RX 6700 XT, RADV Mesa 26.2.5. GTT is 7931 MiB on this machine, smaller than VRAM. **Pins**: main `11bb53a34` and main + this PR cherry-picked (`71d29197f`), Release builds from one worktree, only `libSceAgcDriver.prx` (and `libSceVideoOut.prx`) differ between the two runtime directories. Same relinked executable, same input schedule (Return every 4 s after the startup screens), `APS5_PLAYGO_UNLISTED_CHUNKS=absent`. A monitor stops the game with SIGTERM when system GTT use passes 85 %, because earlier unguarded runs here ran GTT out and took the compositor down with them. | Run | Budget reductions | `-1000072003` import failures | Outcome | | --- | --- | --- | --- | | main | 3 (to 22, then ~108 MiB) | 13 | GTT plateau ~3.9 GiB, then a jump to 6.7 GiB at ~172 s; stopped by the monitor at 175 s | | main + #8091, run 1 | 0 | 4595 | Unreal `Ran out of memory allocating 548682072064 bytes` (0x7FC0000000), SIGSEGV at 37 s, GTT 4.4 GiB | | main + #8091, run 2 | 0 | 4958 | imports reach the default 3965 MiB budget while the host heap report says 5133 of 7869 MiB used; GTT 6.85 GiB, stopped by the monitor at 44 s | | main + #8091, `APS5_HOST_IMPORT_MIB=2048` | 0 | 4236 | 4.28 M refused imports (4.21 M remembered); SIGSEGV at 40.6 s reading `0x207a900000` in libc; GTT 5.6 GiB | On main the game's own fdinfo shows ~6.6 GiB GTT and ~4.6 GiB VRAM at the stop, so with imports held at ~100 MiB most of that GTT is not imports. With this PR the imports no longer collapse, but on this machine the default budget (about half of the host heap) plus the rest of the title's host-heap use exceeds GTT, and the budget does not follow the VK_EXT_memory_budget report unless an allocation fails; here exhaustion shows up at command submission, not at `vkAllocateMemory`. These are single runs, not traces, and the crashes with this PR are not attributed: the 0x7FC0000000 size and the libc read could be stale data rather than anything this change does. I have not compared frame times. AI-assisted: yes (Claude Code); results above were run on this machine.
JJenkx commented 2026-10-21 13:31:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T13:31:32Z.


Thank you; this exposes a limitation that the earlier large-RAM measurements did not cover. I checked the code at 71d29197ff: effectiveBudget() refreshes the heap report once per second, but HostImportBudgetWith() applies that report to the default only after an import allocation returns OUT_OF_HOST_MEMORY or OUT_OF_DEVICE_MEMORY. An INVALID_EXTERNAL_HANDLE failure no longer opens that gate. Thus this PR fixes the error classification while leaving the default unable to react to the reported headroom in the runs you describe. An explicit APS5_HOST_IMPORT_MIB also intentionally bypasses that report.

Your results do not establish the cause of either crash, and I am not treating the 512-GiB Unreal allocation or libc read as a confirmed budget regression. They do show that the Minecraft menu frame-time improvement is not evidence of stability on a smaller-GTT system. A follow-up needs to evaluate pressure-aware default admission independently of allocation-error classification, including other heap users and the treatment of already-live imports; simply reclassifying INVALID_EXTERNAL_HANDLE as exhaustion would restore the original budget-collapse problem. I am keeping this feedback open while that follow-up is investigated.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6317347128 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6317347128). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-21T13:31:32Z. --- Thank you; this exposes a limitation that the earlier large-RAM measurements did not cover. I checked the code at `71d29197ff`: `effectiveBudget()` refreshes the heap report once per second, but `HostImportBudgetWith()` applies that report to the default only after an import allocation returns OUT_OF_HOST_MEMORY or OUT_OF_DEVICE_MEMORY. An INVALID_EXTERNAL_HANDLE failure no longer opens that gate. Thus this PR fixes the error classification while leaving the default unable to react to the reported headroom in the runs you describe. An explicit APS5_HOST_IMPORT_MIB also intentionally bypasses that report. Your results do not establish the cause of either crash, and I am not treating the 512-GiB Unreal allocation or libc read as a confirmed budget regression. They do show that the Minecraft menu frame-time improvement is not evidence of stability on a smaller-GTT system. A follow-up needs to evaluate pressure-aware default admission independently of allocation-error classification, including other heap users and the treatment of already-live imports; simply reclassifying INVALID_EXTERNAL_HANDLE as exhaustion would restore the original budget-collapse problem. I am keeping this feedback open while that follow-up is investigated.
hritikutekar commented 2026-10-21 13:40:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hritikutekar on 2026-10-21T13:40:45Z.


Ghost of Yōtei (PPSA26344 v02.002) data for this change, as asked in #675. RX 9070 XT, RADV Mesa 26.2.4 (plus an unrelated ACO spill fix), Linux 7.2.9. Build: Celegans12's yotei/best plus the same filter (only VK_ERROR_OUT_OF_HOST_MEMORY / VK_ERROR_OUT_OF_DEVICE_MEMORY lower the budget, github.com/hritikutekar/AnyPS5@5b4669400). Each run: boot → title menu → load → about 12 min of open-world gameplay. Every failed import is logged, so these are exact counts.

Filter on, three runs:

Run INVALID_EXTERNAL_HANDLE failures distinct base+size spans most failures of one span budget reductions
1 3,789 3,780 2 0
2 3,767 3,764 2 0
3 3,785 3,782 2 0
  • All of them fall in two bursts: ~1,500 during boot and ~2,280 during the world load. There are zero in the menu and zero in gameplay.
  • Only three spans fail twice (0x8000800000+0x800000, 0x8002800000+0x800000, 0x8002800000+0x400000). No span recurs beyond that, so Yōtei has no retry loop like the one in Lodoss.
  • Sizes are 256 KiB (~1,140), 512 KiB (~1,080), 1 MiB (~700), 2 MiB (~410) and 4 MiB (~250). Requests split about evenly between map and build.
  • No other error code appeared.

Filter off (main's behaviour), one run: only 199 invalid-handle failures, but the budget was lowered 126 times. Once it collapsed, later imports were refused before vkAllocateMemory, so they never failed. That's where the "~110 per run" in my #675 comment came from; the true count with imports allowed is ~3,780. That run stalled in the world load with 47k+ refused imports, ~13 ms draws and swap. The three filter-on runs reached gameplay with zero faults.

So for Yōtei the cost is one failed attempt per span, all at load time, and nothing per frame. That points to the Lodoss retry cost being specific to that title. I can't give a frame-time pair against unmodified main, since main doesn't reach gameplay here.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6317540781 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6317540781). Originally posted by [hritikutekar](https://github.com/hritikutekar) on 2026-10-21T13:40:45Z. --- Ghost of Yōtei (PPSA26344 v02.002) data for this change, as asked in #675. RX 9070 XT, RADV Mesa 26.2.4 (plus an unrelated ACO spill fix), Linux 7.2.9. Build: Celegans12's `yotei/best` plus the same filter (only `VK_ERROR_OUT_OF_HOST_MEMORY` / `VK_ERROR_OUT_OF_DEVICE_MEMORY` lower the budget, https://github.com/hritikutekar/AnyPS5/commit/5b4669400). Each run: boot → title menu → load → about 12 min of open-world gameplay. Every failed import is logged, so these are exact counts. **Filter on, three runs:** | Run | `INVALID_EXTERNAL_HANDLE` failures | distinct base+size spans | most failures of one span | budget reductions | | --- | --- | --- | --- | --- | | 1 | 3,789 | 3,780 | 2 | 0 | | 2 | 3,767 | 3,764 | 2 | 0 | | 3 | 3,785 | 3,782 | 2 | 0 | - All of them fall in two bursts: ~1,500 during boot and ~2,280 during the world load. There are **zero in the menu and zero in gameplay**. - Only three spans fail twice (`0x8000800000+0x800000`, `0x8002800000+0x800000`, `0x8002800000+0x400000`). No span recurs beyond that, so Yōtei has no retry loop like the one in Lodoss. - Sizes are 256 KiB (~1,140), 512 KiB (~1,080), 1 MiB (~700), 2 MiB (~410) and 4 MiB (~250). Requests split about evenly between `map` and `build`. - No other error code appeared. **Filter off (main's behaviour), one run:** only 199 invalid-handle failures, but the budget was lowered 126 times. Once it collapsed, later imports were refused before `vkAllocateMemory`, so they never failed. That's where the "~110 per run" in my #675 comment came from; the true count with imports allowed is ~3,780. That run stalled in the world load with 47k+ refused imports, ~13 ms draws and swap. The three filter-on runs reached gameplay with zero faults. So for Yōtei the cost is one failed attempt per span, all at load time, and nothing per frame. That points to the Lodoss retry cost being specific to that title. I can't give a frame-time pair against unmodified main, since main doesn't reach gameplay here.
JJenkx commented 2026-10-21 13:47:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T13:47:41Z.


Thanks for separating attempts from budget refusals and checking the spans. I checked 5b4669400e0d5ce1a2040073a88bec58a0ab7760: with APS5_NO_IMPORT_OOM_FILTER unset, its allocation-result predicate matches this PR's OUT_OF_HOST_MEMORY / OUT_OF_DEVICE_MEMORY filter. Its filter-off switch restores counting every allocation failure; the commit also contains integration build fixes.

Your three filter-on runs report 3,767–3,789 invalid-handle failures, confined to boot/world load, no span failing more than twice, and no such failures during the reported gameplay. The filter-off run's 199 failures and 126 budget reductions are therefore not evidence of fewer unsuitable spans: the subsequent 47k+ budget refusals prevent attempts from reaching the driver. This supports keeping invalid external handles separate from OOM, and distinguishes this report from Lodoss's repeated-attempt cost.

I'll retain this as your Ghost of Yōtei result on yotei/best with the filter, RADV 26.2.4 and the separate ACO spill fix. It is not an unmodified-main comparison or a gameplay frame-time improvement measurement. The Stellar Blade pressure/termination report above remains unresolved; this result does not establish pressure-safe default admission on smaller GTT heaps.

Could you attach the per-run logs or compact summaries and the exact common integration SHA used for both switch settings? That would make the paired evidence reproducible without treating this integration as current main.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6317687173 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6317687173). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-21T13:47:41Z. --- Thanks for separating attempts from budget refusals and checking the spans. I checked `5b4669400e0d5ce1a2040073a88bec58a0ab7760`: with `APS5_NO_IMPORT_OOM_FILTER` unset, its allocation-result predicate matches this PR's OUT_OF_HOST_MEMORY / OUT_OF_DEVICE_MEMORY filter. Its filter-off switch restores counting every allocation failure; the commit also contains integration build fixes. Your three filter-on runs report 3,767–3,789 invalid-handle failures, confined to boot/world load, no span failing more than twice, and no such failures during the reported gameplay. The filter-off run's 199 failures and 126 budget reductions are therefore not evidence of fewer unsuitable spans: the subsequent 47k+ budget refusals prevent attempts from reaching the driver. This supports keeping invalid external handles separate from OOM, and distinguishes this report from Lodoss's repeated-attempt cost. I'll retain this as your Ghost of Yōtei result on `yotei/best` with the filter, RADV 26.2.4 and the separate ACO spill fix. It is not an unmodified-main comparison or a gameplay frame-time improvement measurement. The Stellar Blade pressure/termination report above remains unresolved; this result does not establish pressure-safe default admission on smaller GTT heaps. Could you attach the per-run logs or compact summaries and the exact common integration SHA used for both switch settings? That would make the paired evidence reproducible without treating this integration as current main.
hritikutekar commented 2026-10-21 14:18:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hritikutekar on 2026-10-21T14:18:36Z.


Thanks for separating attempts from budget refusals and checking the spans. I checked 5b4669400e0d5ce1a2040073a88bec58a0ab7760: with APS5_NO_IMPORT_OOM_FILTER unset, its allocation-result predicate matches this PR's OUT_OF_HOST_MEMORY / OUT_OF_DEVICE_MEMORY filter. Its filter-off switch restores counting every allocation failure; the commit also contains integration build fixes.

Your three filter-on runs report 3,767–3,789 invalid-handle failures, confined to boot/world load, no span failing more than twice, and no such failures during the reported gameplay. The filter-off run's 199 failures and 126 budget reductions are therefore not evidence of fewer unsuitable spans: the subsequent 47k+ budget refusals prevent attempts from reaching the driver. This supports keeping invalid external handles separate from OOM, and distinguishes this report from Lodoss's repeated-attempt cost.

I'll retain this as your Ghost of Yōtei result on yotei/best with the filter, RADV 26.2.4 and the separate ACO spill fix. It is not an unmodified-main comparison or a gameplay frame-time improvement measurement. The Stellar Blade pressure/termination report above remains unresolved; this result does not establish pressure-safe default admission on smaller GTT heaps.

Could you attach the per-run logs or compact summaries and the exact common integration SHA used for both switch settings? That would make the paired evidence reproducible without treating this integration as current main.

@JJenkx one correction first: the filter-off run was not the same build with the switch flipped. Exact builds (branch hritikutekar/AnyPS5@yotei/linux-best-u1):

Run Filter Driver build
filter-off n/a (before the filter existed) 36b2a8e35 (merge of Celegans12 yotei/best on main 2026-10-20) plus uncommitted local changes (including the Linux build fixes), without the filter, i.e. main's import-budget behaviour
filter-on 1 on the working tree before 5b4669400…835fedbcf were committed, already with the filter
filter-on 2, 3 on 9b2bbdfff (contains 5b4669400)

So the 199 vs ~3,780 contrast compares two builds, not two switch settings on one SHA. The filter-on counts stand on their own.

Compact per-run summaries (every [gpu] host import of … failed line; phases per run: boot until the title menu was detected (present 704–710; present 700 in the filter-off run, whose menu point was not recorded), menu until the cross press (present 1,290–1,353; 1,483 in the filter-off run), load from the press to gameplay (present ~1,740, checked by screenshots))
filter-off (36b2a8e35 + local changes): invalid-handle failures 199, distinct spans 196, budget lowered 126 (stalled in the world load, last present 1693)
   by phase: boot 71, menu 0, load 128; by requester: build 109, map 45, access 45
filter-on 1: failures 3,789, distinct spans 3,780, budget lowered 0
   by phase: boot 1,504, load 2,285, menu 0, gameplay 0; by requester: map 1,957, build 1,832
filter-on 2 (9b2bbdfff): failures 3,767, distinct spans 3,764, budget lowered 0
   by phase: boot 1,502, load 2,265, menu 0, gameplay 0; by requester: map 1,952, build 1,815
filter-on 3 (9b2bbdfff): failures 3,785, distinct spans 3,782, budget lowered 0
   by phase: boot 1,505, load 2,280, menu 0, gameplay 0; by requester: map 2,207, build 1,578
spans failing twice: runs 2, 3 and filter-off: 0x8000800000+0x800000, 0x8002800000+0x800000, 0x8002800000+0x400000;
   run 1: those three plus six more (e.g. 0x937e200000+0x100000); no span failed more than twice in any run
only result code seen: vkAllocateMemory -1000072003

The full logs are 22 MB (filter-off) and 875–978 MB (filter-on, profiling output), so I've summarised rather than attached them.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6318353824 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6318353824). Originally posted by [hritikutekar](https://github.com/hritikutekar) on 2026-10-21T14:18:36Z. --- > Thanks for separating attempts from budget refusals and checking the spans. I checked `5b4669400e0d5ce1a2040073a88bec58a0ab7760`: with `APS5_NO_IMPORT_OOM_FILTER` unset, its allocation-result predicate matches this PR's OUT_OF_HOST_MEMORY / OUT_OF_DEVICE_MEMORY filter. Its filter-off switch restores counting every allocation failure; the commit also contains integration build fixes. > > Your three filter-on runs report 3,767–3,789 invalid-handle failures, confined to boot/world load, no span failing more than twice, and no such failures during the reported gameplay. The filter-off run's 199 failures and 126 budget reductions are therefore not evidence of fewer unsuitable spans: the subsequent 47k+ budget refusals prevent attempts from reaching the driver. This supports keeping invalid external handles separate from OOM, and distinguishes this report from Lodoss's repeated-attempt cost. > > I'll retain this as your Ghost of Yōtei result on `yotei/best` with the filter, RADV 26.2.4 and the separate ACO spill fix. It is not an unmodified-main comparison or a gameplay frame-time improvement measurement. The Stellar Blade pressure/termination report above remains unresolved; this result does not establish pressure-safe default admission on smaller GTT heaps. > > Could you attach the per-run logs or compact summaries and the exact common integration SHA used for both switch settings? That would make the paired evidence reproducible without treating this integration as current main. @JJenkx one correction first: the filter-off run was not the same build with the switch flipped. Exact builds (branch [`hritikutekar/AnyPS5@yotei/linux-best-u1`](https://github.com/hritikutekar/AnyPS5/tree/yotei/linux-best-u1)): | Run | Filter | Driver build | | --- | --- | --- | | filter-off | n/a (before the filter existed) | `36b2a8e35` (merge of Celegans12 `yotei/best` on main 2026-10-20) plus uncommitted local changes (including the Linux build fixes), without the filter, i.e. main's import-budget behaviour | | filter-on 1 | on | the working tree before `5b4669400`…`835fedbcf` were committed, already with the filter | | filter-on 2, 3 | on | `9b2bbdfff` (contains `5b4669400`) | So the 199 vs ~3,780 contrast compares two builds, not two switch settings on one SHA. The filter-on counts stand on their own. <details><summary>Compact per-run summaries (every <code>[gpu] host import of … failed</code> line; phases per run: boot until the title menu was detected (present 704–710; present 700 in the filter-off run, whose menu point was not recorded), menu until the cross press (present 1,290–1,353; 1,483 in the filter-off run), load from the press to gameplay (present ~1,740, checked by screenshots))</summary> ``` filter-off (36b2a8e35 + local changes): invalid-handle failures 199, distinct spans 196, budget lowered 126 (stalled in the world load, last present 1693) by phase: boot 71, menu 0, load 128; by requester: build 109, map 45, access 45 filter-on 1: failures 3,789, distinct spans 3,780, budget lowered 0 by phase: boot 1,504, load 2,285, menu 0, gameplay 0; by requester: map 1,957, build 1,832 filter-on 2 (9b2bbdfff): failures 3,767, distinct spans 3,764, budget lowered 0 by phase: boot 1,502, load 2,265, menu 0, gameplay 0; by requester: map 1,952, build 1,815 filter-on 3 (9b2bbdfff): failures 3,785, distinct spans 3,782, budget lowered 0 by phase: boot 1,505, load 2,280, menu 0, gameplay 0; by requester: map 2,207, build 1,578 spans failing twice: runs 2, 3 and filter-off: 0x8000800000+0x800000, 0x8002800000+0x800000, 0x8002800000+0x400000; run 1: those three plus six more (e.g. 0x937e200000+0x100000); no span failed more than twice in any run only result code seen: vkAllocateMemory -1000072003 ``` </details> The full logs are 22 MB (filter-off) and 875–978 MB (filter-on, profiling output), so I've summarised rather than attached them.
JJenkx commented 2026-10-21 14:34:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T14:34:04Z.


Thanks for the correction and compact summaries. I withdraw the same-build/switch interpretation in my previous reply. The filter-off run used 36b2a8e35 plus uncommitted local changes; filter-on run 1 used an uncommitted working tree, and runs 2–3 used 9b2bbdfff. There is no common pinned build across the two settings.

I will retain the per-run counts as your observations on those integrations. They do not isolate the filter’s effect on loading, memory pressure or frame time. The filter-on runs report only invalid-external-handle allocation failures, no budget reductions, and no such failures during the observed gameplay; those observations alone do not establish that the default admission policy is pressure-safe.

The separate Stellar Blade pressure/termination report remains unresolved. No source change or new local test is claimed in this correction.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6318650496 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6318650496). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-21T14:34:04Z. --- Thanks for the correction and compact summaries. I withdraw the same-build/switch interpretation in my previous reply. The filter-off run used `36b2a8e35` plus uncommitted local changes; filter-on run 1 used an uncommitted working tree, and runs 2–3 used `9b2bbdfff`. There is no common pinned build across the two settings. I will retain the per-run counts as your observations on those integrations. They do not isolate the filter’s effect on loading, memory pressure or frame time. The filter-on runs report only invalid-external-handle allocation failures, no budget reductions, and no such failures during the observed gameplay; those observations alone do not establish that the default admission policy is pressure-safe. The separate Stellar Blade pressure/termination report remains unresolved. No source change or new local test is claimed in this correction. AI-assisted: yes
JJenkx commented 2026-10-21 21:46:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T21:46:27Z.


@3mro777o thanks, this matches what I see on a machine where GTT is not a factor.

What -1000072003 means on RADV. In Mesa 26.2.4, radv_amdgpu_winsys_bo_from_ptr returns VK_ERROR_INVALID_EXTERNAL_HANDLE for any failure of the userptr ioctl. libdrm 2.4.134 amdgpu_create_bo_from_user_mem passes AMDGPU_GEM_USERPTR_ANONONLY | REGISTER | VALIDATE. So the kernel refusing a file-backed range, refusing a range it can't pin for write, and running out of GTT or pinnable memory all come back as the same code. Before this PR, three failures in a row, or one within an eighth of the budget, collapsed the import budget to what was live, whatever the cause. This PR stops reacting to them, so they cover both cases.

Would applying the heap report on these failures have helped? effectiveBudget only uses the VK_EXT_memory_budget cap after allocationFailed, and this PR no longer sets that for -1000072003. I considered setting it again while keeping the budget collapse for the two out-of-memory codes. The report wouldn't bind in either case:

  • On my machine (64 GiB GTT), the host heap reports about 53 GiB with a few MiB used.
  • From your numbers (7869 MiB budget, 5133 MiB used with about 3965 MiB of imports live), HostImportBudgetFor gives about 7869 − 1168 − 983 ≈ 5718 MiB, above the 3965 MiB default.
    So I'm not proposing that.

Crashes. Your runs 1 and 3 crashed at 4.4 and 5.6 GiB GTT, below your 85 % guard, and run 2 was stopped by the guard. I see the same pattern with JUMANJI (PPSA03973) on a Radeon RX 6650 XT, RADV Mesa 26.2.4, with 64 GiB of GTT and 11 GiB of it in use:

  • base 7ab4b2e561: 0 crashes in 4 runs, each running the full 188 s, with 13–16 -1000072003 failures each;
  • this PR 71d29197ff: SIGSEGV in 4 of 5 runs (two of those under GDB), at 26–146 s; most fire just after the first input on the publisher logos. The runs I counted (jc1, jc2, jg1) log 1666–2263 -1000072003 failures each, on distinct ranges. The one run that didn't crash had frame p50 27.2 ms over seconds 150–175, against 310–333 ms on base.
  • Just before the crash the process has 7529 memory mappings and 28 open fds, far below its limits.

Where it crashes. I ran this PR's side under GDB, passing the write-watch SIGSEGVs through and logging each one with its registers and stack. Each run intercepts exactly one SIGSEGV, so the write-watch path never fires:

  • run jg5, 26 s: a read of address 0 inside the title's own sce_module/libc.prx (converted with the title), called from its executable;
  • run jg6, 146 s: a read of address 0 in the title's executable, mov (%rdi),%r8 with rdi = 0 at app.elf+0x11c77a4.

Both are on the same guest thread, and no AnyPS5 library is on the faulting frame. So the title's own code ends up with a null pointer when this PR is in. I haven't found what produces it. I ruled out three causes: the process running out of mappings or fds, the write-watch fallback, and ImportWatched writing saved pages back (it only compares them). Your 0x7FC0000000-byte allocation and libc read look like the same kind of failure: the title's own code acting on a bad value.

So on this title the frame-time gain from this PR comes with a crash I can't yet explain or attribute to a specific change in the import path. I'd treat that as a blocker until it's understood.

Traces with SHA256SUMS (four base runs and the PR run that didn't crash), the gzipped logs of the crashing runs (jc2, jg1, jg5, jg6, the last three with GDB output and jg6 with the full memory map), the GDB scripts and the process samples: 20261021-pr8091-PPSA03973-crash.tar.gz (sha256 92d1bc579b64aa4ef8426b59a59f5766843dc74161eadc2c6a2fb84ad9bf4538).

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6327264256 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6327264256). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-21T21:46:27Z. --- @3mro777o thanks, this matches what I see on a machine where GTT is not a factor. **What `-1000072003` means on RADV.** In Mesa 26.2.4, [`radv_amdgpu_winsys_bo_from_ptr`](https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-26.2.4/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c#L819) returns `VK_ERROR_INVALID_EXTERNAL_HANDLE` for any failure of the userptr ioctl. libdrm 2.4.134 [`amdgpu_create_bo_from_user_mem`](https://gitlab.freedesktop.org/mesa/drm/-/blob/libdrm-2.4.134/amdgpu/amdgpu_bo.c#L587) passes `AMDGPU_GEM_USERPTR_ANONONLY | REGISTER | VALIDATE`. So the kernel refusing a file-backed range, refusing a range it can't pin for write, and running out of GTT or pinnable memory all come back as the same code. Before this PR, three failures in a row, or one within an eighth of the budget, collapsed the import budget to what was live, whatever the cause. This PR stops reacting to them, so they cover both cases. **Would applying the heap report on these failures have helped?** `effectiveBudget` only uses the `VK_EXT_memory_budget` cap after `allocationFailed`, and this PR no longer sets that for `-1000072003`. I considered setting it again while keeping the budget collapse for the two out-of-memory codes. The report wouldn't bind in either case: - On my machine (64 GiB GTT), the host heap reports about 53 GiB with a few MiB used. - From your numbers (7869 MiB budget, 5133 MiB used with about 3965 MiB of imports live), `HostImportBudgetFor` gives about 7869 − 1168 − 983 ≈ 5718 MiB, above the 3965 MiB default. So I'm not proposing that. **Crashes.** Your runs 1 and 3 crashed at 4.4 and 5.6 GiB GTT, below your 85 % guard, and run 2 was stopped by the guard. I see the same pattern with JUMANJI (PPSA03973) on a Radeon RX 6650 XT, RADV Mesa 26.2.4, with 64 GiB of GTT and 11 GiB of it in use: - base `7ab4b2e561`: 0 crashes in 4 runs, each running the full 188 s, with 13–16 `-1000072003` failures each; - this PR `71d29197ff`: SIGSEGV in 4 of 5 runs (two of those under GDB), at 26–146 s; most fire just after the first input on the publisher logos. The runs I counted (jc1, jc2, jg1) log 1666–2263 `-1000072003` failures each, on distinct ranges. The one run that didn't crash had frame p50 27.2 ms over seconds 150–175, against 310–333 ms on base. - Just before the crash the process has 7529 memory mappings and 28 open fds, far below its limits. **Where it crashes.** I ran this PR's side under GDB, passing the write-watch SIGSEGVs through and logging each one with its registers and stack. Each run intercepts exactly one SIGSEGV, so the write-watch path never fires: - run jg5, 26 s: a read of address 0 inside the title's own `sce_module/libc.prx` (converted with the title), called from its executable; - run jg6, 146 s: a read of address 0 in the title's executable, `mov (%rdi),%r8` with `rdi = 0` at `app.elf+0x11c77a4`. Both are on the same guest thread, and no AnyPS5 library is on the faulting frame. So the title's own code ends up with a null pointer when this PR is in. I haven't found what produces it. I ruled out three causes: the process running out of mappings or fds, the write-watch fallback, and `ImportWatched` writing saved pages back (it only compares them). Your 0x7FC0000000-byte allocation and libc read look like the same kind of failure: the title's own code acting on a bad value. So on this title the frame-time gain from this PR comes with a crash I can't yet explain or attribute to a specific change in the import path. I'd treat that as a blocker until it's understood. Traces with `SHA256SUMS` (four base runs and the PR run that didn't crash), the gzipped logs of the crashing runs (jc2, jg1, jg5, jg6, the last three with GDB output and jg6 with the full memory map), the GDB scripts and the process samples: [20261021-pr8091-PPSA03973-crash.tar.gz](https://github.com/JJenkx/AnyPS5/releases/download/game-library-checks-20261016/20261021-pr8091-PPSA03973-crash.tar.gz) (sha256 `92d1bc579b64aa4ef8426b59a59f5766843dc74161eadc2c6a2fb84ad9bf4538`). AI-assisted: yes (Claude Code).
JJenkx commented 2026-10-21 23:12:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T23:12:06Z.


Scope of the crash in my reply above: every run of head 71d29197ff I've made, by title. "Full duration" means the run reached its scheduled end with no crash.

Title Engine Runs Crashes
Minecraft Dungeons II (PPSA16064) Unreal Engine 9 (to 132–142 s) 0
Super Meat Boy 3D (PPSA31162) Unity 3 (to 189 s) 0
Afterimage (PPSA14053) Unreal Engine 4 2 (to 189 s) 0
JUMANJI: The Video Game (PPSA03973) Unreal Engine 4 5 4 (26–146 s)

So on this machine it's one title, plus your Stellar Blade runs. Both are Unreal titles, but Minecraft Dungeons II and Afterimage are too, and those don't crash, so the engine alone doesn't explain it.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6328629966 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6328629966). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-21T23:12:06Z. --- Scope of the crash in my reply above: every run of head `71d29197ff` I've made, by title. "Full duration" means the run reached its scheduled end with no crash. | Title | Engine | Runs | Crashes | |---|---|---|---| | Minecraft Dungeons II (PPSA16064) | Unreal Engine | 9 (to 132–142 s) | 0 | | Super Meat Boy 3D (PPSA31162) | Unity | 3 (to 189 s) | 0 | | Afterimage (PPSA14053) | Unreal Engine 4 | 2 (to 189 s) | 0 | | JUMANJI: The Video Game (PPSA03973) | Unreal Engine 4 | 5 | 4 (26–146 s) | So on this machine it's one title, plus your Stellar Blade runs. Both are Unreal titles, but Minecraft Dungeons II and Afterimage are too, and those don't crash, so the engine alone doesn't explain it. AI-assisted: yes (Claude Code).
JJenkx commented 2026-10-21 23:43:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T23:43:22Z.


AMD/Linux composition data for the Lodoss regression noted in this PR. With #7465 alongside, it goes away on this title.

Setup

  • Record of Lodoss War (PPSA05347), tutorial scene, Linux 7.2.9, RX 6650 XT, RADV (Mesa 26.2.4).
  • main b5d763770a against main + this PR (71d29197ff, local merge 3bbce96100) and main + this PR + #7465 (local merge d837e51897).
  • Same cache and save seed, same inputs, 280 s per run, APS5_TRACE_SECONDS=200:30 with 2097152 events.
  • Order: main, this PR, PR + #7465, PR + #7465, this PR, main.
  • Every trace reports dirty false and dropped false.
Run FPS frame p50 / p99 ms map-time imports made / failed compilers in window
main 40.85 25.8 / 59.3 4,572 / 49 (869,942 refused) up to 22
this PR 30.70 31.8 / 47.7 726,907 / 498,533 up to 5
this PR + #7465 59.94 16.7 / 16.7 170 / 112 0
this PR + #7465 59.94 16.7 / 16.7 170 / 112 up to 5
this PR 33.48 29.2 / 39.7 769,812 / 368,382 0
main 51.71 18.8 / 27.1 4,634 / 6,362 (1,089,494 refused) 0

On main, the collapsed import budget refuses about a million map-time imports per run. This title maps and unmaps small direct-memory ranges continuously, and the copies happen to be cheaper here. With this PR the budget holds, so each of those mappings is attempted: ~730–770k imports per run, of which 370–500k fail. That costs about 35–40 % of the frame rate against the clean main run.
#7465 defers small imports to their first GPU use. With it on top, the map-time imports drop to 170 and both runs hold the 60 FPS cap.

So for map-churning titles like this one, this PR wants #7465 (or a similar map-time policy) with it. On the build/access-bound titles measured above (Afterimage, Super Meat Boy 3D, Minecraft Dungeons II, Jumanji), refusals are mostly by build/access, and this PR stands on its own. Earlier main-only and #7465-only numbers on the same scene are on #7465.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6329061223 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6329061223). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-21T23:43:22Z. --- AMD/Linux composition data for the Lodoss regression noted in this PR. With #7465 alongside, it goes away on this title. **Setup** - Record of Lodoss War (PPSA05347), tutorial scene, Linux 7.2.9, RX 6650 XT, RADV (Mesa 26.2.4). - `main` b5d763770a against `main` + this PR (71d29197ff, local merge 3bbce96100) and `main` + this PR + #7465 (local merge d837e51897). - Same cache and save seed, same inputs, 280 s per run, `APS5_TRACE_SECONDS=200:30` with 2097152 events. - Order: `main`, this PR, PR + #7465, PR + #7465, this PR, `main`. - Every trace reports dirty false and dropped false. | Run | FPS | frame p50 / p99 ms | map-time imports made / failed | compilers in window | |---|---|---|---|---| | `main` | 40.85 | 25.8 / 59.3 | 4,572 / 49 (869,942 refused) | up to 22 | | this PR | 30.70 | 31.8 / 47.7 | 726,907 / 498,533 | up to 5 | | this PR + #7465 | **59.94** | 16.7 / 16.7 | 170 / 112 | 0 | | this PR + #7465 | **59.94** | 16.7 / 16.7 | 170 / 112 | up to 5 | | this PR | 33.48 | 29.2 / 39.7 | 769,812 / 368,382 | 0 | | `main` | 51.71 | 18.8 / 27.1 | 4,634 / 6,362 (1,089,494 refused) | 0 | On `main`, the collapsed import budget refuses about a million map-time imports per run. This title maps and unmaps small direct-memory ranges continuously, and the copies happen to be cheaper here. With this PR the budget holds, so each of those mappings is attempted: ~730–770k imports per run, of which 370–500k fail. That costs about 35–40 % of the frame rate against the clean `main` run. #7465 defers small imports to their first GPU use. With it on top, the map-time imports drop to 170 and both runs hold the 60 FPS cap. So for map-churning titles like this one, this PR wants #7465 (or a similar map-time policy) with it. On the build/access-bound titles measured above (Afterimage, Super Meat Boy 3D, Minecraft Dungeons II, Jumanji), refusals are mostly by build/access, and this PR stands on its own. Earlier `main`-only and #7465-only numbers on the same scene are on #7465. AI-assisted: yes (Claude Code); results above were run on this machine.
JJenkx commented 2026-10-22 08:01:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-22T08:01:48Z.


Narrowing the JUMANJI (PPSA03973) crash with this PR. Same head 71d29197ff, same seeded cache, saves and input schedule as before; only environment variables change:

condition runs SIGSEGV notes
default 9 8 mostly at 26–28 s, one at 146 s
APS5_WRITE_WATCH_IMPORTS=watch 4 4 the log confirms "host imports stay watched"; 3 crash at 28.2 s
APS5_HOST_IMPORT_MIB=16 3 0 all reach the 188 s end; 3 MiB of imports live, frame p50 329–334 ms (base speed)

What this rules out:

  • The -1000072003 handling itself. The 16 MiB runs still go through 627–727 failed imports each, and none crashes.
  • The compared, unwatched treatment of imported ranges. On RADV the probe reports that host-pointer imports resolve write protection, so they're compared by default. Forcing them watched doesn't change the crash rate. The beforeUnwatch/SaveBeforeUnwatch path isn't taken for watched imports either.

So the crash needs a large amount of guest memory imported zero-copy. That points at the imports themselves: an import covering a range it shouldn't, or GPU accesses through an import that reach title data. I haven't found which import yet. Next: a budget bisection between 16 MiB and the default, and a GDB capture with APS5_TRACE_HOST_IMPORT on, to check whether the null object pointer the title reads (in guest heap, for example rbx = 0x1220e1e758 in run jg6) lies inside an imported range.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6335830460 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6335830460). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-22T08:01:48Z. --- Narrowing the JUMANJI (PPSA03973) crash with this PR. Same head `71d29197ff`, same seeded cache, saves and input schedule as before; only environment variables change: | condition | runs | SIGSEGV | notes | |---|---|---|---| | default | 9 | 8 | mostly at 26–28 s, one at 146 s | | `APS5_WRITE_WATCH_IMPORTS=watch` | 4 | 4 | the log confirms "host imports stay watched"; 3 crash at 28.2 s | | `APS5_HOST_IMPORT_MIB=16` | 3 | 0 | all reach the 188 s end; 3 MiB of imports live, frame p50 329–334 ms (base speed) | What this rules out: - **The `-1000072003` handling itself.** The 16 MiB runs still go through 627–727 failed imports each, and none crashes. - **The compared, unwatched treatment of imported ranges.** On RADV the probe reports that host-pointer imports resolve write protection, so they're compared by default. Forcing them watched doesn't change the crash rate. The `beforeUnwatch`/`SaveBeforeUnwatch` path isn't taken for watched imports either. So the crash needs a large amount of guest memory imported zero-copy. That points at the imports themselves: an import covering a range it shouldn't, or GPU accesses through an import that reach title data. I haven't found which import yet. Next: a budget bisection between 16 MiB and the default, and a GDB capture with `APS5_TRACE_HOST_IMPORT` on, to check whether the null object pointer the title reads (in guest heap, for example `rbx = 0x1220e1e758` in run jg6) lies inside an imported range. AI-assisted: yes (Claude Code).
JJenkx commented 2026-10-22 09:21:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-22T09:21:49Z.


More narrowing on the JUMANJI crash with this PR, following https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6335830460. Same head 71d29197ff, same seed, saves and inputs; only environment variables change:

condition runs SIGSEGV frame p50 (runs that finished)
default 9 8 ~27 ms
APS5_HOST_IMPORT_MIB=16 3 0 329–334 ms
APS5_HOST_IMPORT_MIB=256 2 0 182–184 ms
APS5_HOST_IMPORT_MIB=1024 2 1 (84 s) 121 ms
APS5_WRITE_WATCH_IMPORTS=watch 4 4 –
APS5_BDA_DWORD_STORES=1 4 4 –

Each budget run reports its budget fully live ("256 MiB live of 256 MiB" and so on). The speed-up and the crash both grow with the amount of guest memory imported zero-copy.

A GDB capture at the default budget, with APS5_TRACE_HOST_IMPORT and APS5_TRACE_MEMORY on, crashed on the same guest thread as every earlier capture, but this time not on a null read. It's a byte store in the title's code, mov %al,0x20(%rbx,%r14,1) at app.elf+0x39f511f. With rbx = 0x10c0e1a790 and the fault at 0x10c0f50000, the loop index is about 1.27 MB past its array: a bad loop bound in title data.

  • Every guest address in the registers lies inside a successful import. rbx is in a 64 KiB build import, 0x10c0e10000+0x10000.
  • No traced unmap or remap touches any of those imports after it was made, so stale pinned pages after a remap don't explain it.

So far this rules out:

  • the -1000072003 handling (hundreds of failures in the 16 MiB runs, no crash);
  • the compared rather than watched treatment of imported ranges;
  • stale imports after a remap, at least in this capture;
  • wide multi-dword BDA stores.

What's left is something about large numbers of live imports: GPU writes reaching title data in the same import unit through another path (dword BDA stores, storage write-backs, descriptor writes), or a visibility or ordering difference between imported and copied memory. Finding which needs per-write tracing that I haven't done. Until then I'd keep treating this as a blocker for JUMANJI. Notes and the capture are in my private evidence and can be attached.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6337318873 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6337318873). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-22T09:21:49Z. --- More narrowing on the JUMANJI crash with this PR, following https://github.com/boykopovar/AnyPS5/pull/8091#issuecomment-6335830460. Same head `71d29197ff`, same seed, saves and inputs; only environment variables change: | condition | runs | SIGSEGV | frame p50 (runs that finished) | |---|---|---|---| | default | 9 | 8 | ~27 ms | | `APS5_HOST_IMPORT_MIB=16` | 3 | 0 | 329–334 ms | | `APS5_HOST_IMPORT_MIB=256` | 2 | 0 | 182–184 ms | | `APS5_HOST_IMPORT_MIB=1024` | 2 | 1 (84 s) | 121 ms | | `APS5_WRITE_WATCH_IMPORTS=watch` | 4 | 4 | – | | `APS5_BDA_DWORD_STORES=1` | 4 | 4 | – | Each budget run reports its budget fully live ("256 MiB live of 256 MiB" and so on). The speed-up and the crash both grow with the amount of guest memory imported zero-copy. A GDB capture at the default budget, with `APS5_TRACE_HOST_IMPORT` and `APS5_TRACE_MEMORY` on, crashed on the same guest thread as every earlier capture, but this time not on a null read. It's a byte store in the title's code, `mov %al,0x20(%rbx,%r14,1)` at `app.elf+0x39f511f`. With `rbx = 0x10c0e1a790` and the fault at `0x10c0f50000`, the loop index is about 1.27 MB past its array: a bad loop bound in title data. - Every guest address in the registers lies inside a successful import. `rbx` is in a 64 KiB `build` import, `0x10c0e10000+0x10000`. - No traced unmap or remap touches any of those imports after it was made, so stale pinned pages after a remap don't explain it. So far this rules out: - the `-1000072003` handling (hundreds of failures in the 16 MiB runs, no crash); - the compared rather than watched treatment of imported ranges; - stale imports after a remap, at least in this capture; - wide multi-dword BDA stores. What's left is something about large numbers of live imports: GPU writes reaching title data in the same import unit through another path (dword BDA stores, storage write-backs, descriptor writes), or a visibility or ordering difference between imported and copied memory. Finding which needs per-write tracing that I haven't done. Until then I'd keep treating this as a blocker for JUMANJI. Notes and the capture are in my private evidence and can be attached. AI-assisted: yes (Claude Code).
Sign in to join this conversation.
No reviewers
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!8091
No description provided.