fix(libc): leave a range that a mutation waits for out of new leases #6565

Merged
xXPBSXx merged 7 commits from upstream-pr/6565 into main 2026-11-02 16:12:25 +00:00
xXPBSXx commented 2026-10-15 20:51:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-15T20:51:03Z.


What

Brigandine Abyss (PPSA27752) aborts 5 to 6 minutes after start with

[gpu] leased allocation 0x11a4000000+0xea00000 still pinned after 8 recorder syncs
what():  guest allocation 0x11a4000000+0xea00000 is still pinned by GPU work or an import (waited 60000 ms for the lease (APS5_PIN_WAIT_MS))

(lines 132 and 135 of the stderr of the first run and lines 131 and 136 of the second show it for 0x11a6000000+0x1a00000, after [gpu] storage image …: memory no longer registered; 1 pending ranges dropped. Storage images listed at lines 124-128 of the first run lie inside the pinned allocation.)

GuestAllocationsRequireUnpinned waits for the GPU work that leases a range through the driver's waiter. GuestAllocationsAcquireAll and GuestAllocationsAcquire copy every registered range into each new lease, including the range that is being released. A driver worker that starts an address-based build between the waiter's return and the re-lock therefore pins the range again; the comment in RequireUnpinned describes this as rare. A title that draws every frame repeats it each round, and after APS5_PIN_WAIT_MS the free fails.

  • A mutation that finds a pinned range records it as retiring until the wait ends (also when the wait throws).
  • Acquire and AcquireAll leave retiring ranges out and do not cache the lease while one is recorded; the caches are cleared when the record is removed.
  • GuestAllocationsAcquireRegistered returns a readable lease that still lists the ranges a mutation waits on; RegisteredReadableCovers, RegisteredReadableEnd and the two retire loops in GuestBufferMemory.cpp use it, because the new lease without the range hid it from code that only asks what is registered (the host_import lifetime test and agc_unit_shadow saw it). The mutation race test now asserts that an import of the waiting extent is refused.
  • Debt entry: the leases taken by GuestAllocationsAcquire and GuestAllocationsAcquireAll leave out a range a mutation waits on, while GuestAllocationsAcquireRegistered still lists it; whether the console keeps that memory visible is unknown.
  • GuestAllocationsAcquireMapped_nid_no_patch, added to main after this change was written, builds its lease without the retiring check, so ImportMappedRanges can still lease a range a mutation waits on; this pull request does not change it.

guest_memory gains CheckPinnedRangeIsLeftOutOfNewLeases: a pin waiter replaces the lease with a new AcquireAll lease the way a worker does, and the range is unmapped. Without the change the unmap fails with the line above (still pinned after 8 recorder syncs, see Tested); with it the unmap succeeds, the old lease no longer holds the range, and a later AcquireAll lease holds a new mapping.

This shows the mechanism, not that Brigandine hangs this way: a diagnostic run of the title ended earlier in a different stop (the engine's 120 s watchdog on the render thread) and did not reach the pin, so the lease source in the title is not measured.

Tested

Windows 10 Pro (19045), WinLibs GCC 15.2.0 r7, Release, on main b54849f5a0 + these 4 commits rebased onto it (head 2e9dcf0e35; four conflicts in the first rebase: docs/dev/debt/libc.md three times, and GuestAllocations.cpp once, where main's GuestAllocationsAcquireMapped_nid_no_patch and this change's GuestAllocationsAcquireRegistered_nid_postfix are both kept); ninja exit code 0 read for each arm:

  • ctest -R ^guest_memory$: passes with the change (3 of 3 runs); fails without it in 3 of 3 runs (GuestAllocations.hpp, GuestAllocations.cpp and GuestBufferMemory.cpp taken back to main b54849f5a0, tests kept): [gpu] leased allocation 0x200f70000+0x8000 still pinned after 8 recorder syncs, Guest memory check failed at core/libs/tests/GuestMemory.cpp:2404, exit code 0xc0000409.
  • ctest -R '^guest_memory$|agc_host_import|agc_driver_host_import|agc_unit_shadow|agc_driver_unit_shadow' (18 tests), on an NVIDIA GeForce RTX 4080 SUPER with ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1, one run each on main 66d362c782 and on the head: ctest reports 0 failed out of 18 in both, agc_host_import_sparse is skipped (udmabuf imports are Linux only), and agc_host_import_cut_lifetime passes in both.
  • Vulkan validation comparison: not established. This host has no validation layer installed and the run above did not request one. An earlier run on main and on the previous head that did set VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation without a layer printed no was not found but was requested line and no VUID- line, which says nothing about validation. A locally built VkLayer_khronos_validation.dll loaded through VK_LAYER_PATH crashes 11 of the 18 tests inside the layer during device creation (VkLayer_khronos_validation.dll+0xe66a41) on main and on this head alike, so no VUID- comparison exists from it either.
  • python tools/check_conventions.py --base upstream/main passes; git merge-tree of the head against current main b54849f5a0 is clean.
  • Not tested: Linux and macOS (the guest_memory test now sets APS5_PIN_WAIT_MS there too, not built), a console, the title with this change. Measured by others on earlier heads: jotitadev on Ubuntu 26.04 (Intel i7-8700, GCC 15.2, Release) at head 46d11782e: guest_memory passes 3 of 3 with the change and aborts at GuestMemory.cpp:1497 with GuestAllocations.cpp of main; blawesom on CachyOS (kernel 7.2.9, GCC 16.2.1, AMD RX 9070 XT / RADV) at the rebased head a850691ed: full suite 1338 of 1339, the failure is agc_driver_tessellation (#4727) as on main; TheSovietWaffle on Windows 10 Pro 22H2 (RTX 3080, NVIDIA 617.42) with #6182 and #6565 merged together: a title run that aborted on the lease wait after about 7 minutes without them ran about 2 h 14 min without that abort with them, which does not show which of the two PRs is needed. hugodearaujo on Linux 7.2.11 (RX 9070 XT, RADV, Mesa 26.2.5, GCC 16.2.1, Release) with ASTRO BOT (PPSA21567): the same lease-wait stop on main and on main plus this PR (one run), because the range is held by window imports and not by a lease; with #6182 the title got past the wait in 2 of 2 runs.

Checklist

  • Based on current main; no other open PR implements the same change
  • 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 in TechnicalDebt (docs/dev/debt/libc.md)
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: #12586 (landing order only; both add an entry to docs/dev/debt/libc.md)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a (registry logic; the agc tests and the title runs used an NVIDIA GeForce RTX 4080 SUPER, Windows 10)
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4879673811 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-15T20:51:03Z. --- ### What Brigandine Abyss (PPSA27752) aborts 5 to 6 minutes after start with [gpu] leased allocation 0x11a4000000+0xea00000 still pinned after 8 recorder syncs what(): guest allocation 0x11a4000000+0xea00000 is still pinned by GPU work or an import (waited 60000 ms for the lease (APS5_PIN_WAIT_MS)) (lines 132 and 135 of the stderr of the first run and lines 131 and 136 of the second show it for `0x11a6000000+0x1a00000`, after `[gpu] storage image …: memory no longer registered; 1 pending ranges dropped`. Storage images listed at lines 124-128 of the first run lie inside the pinned allocation.) `GuestAllocationsRequireUnpinned` waits for the GPU work that leases a range through the driver's waiter. `GuestAllocationsAcquireAll` and `GuestAllocationsAcquire` copy every registered range into each new lease, including the range that is being released. A driver worker that starts an address-based build between the waiter's return and the re-lock therefore pins the range again; the comment in `RequireUnpinned` describes this as rare. A title that draws every frame repeats it each round, and after `APS5_PIN_WAIT_MS` the free fails. - A mutation that finds a pinned range records it as retiring until the wait ends (also when the wait throws). - `Acquire` and `AcquireAll` leave retiring ranges out and do not cache the lease while one is recorded; the caches are cleared when the record is removed. - `GuestAllocationsAcquireRegistered` returns a readable lease that still lists the ranges a mutation waits on; `RegisteredReadableCovers`, `RegisteredReadableEnd` and the two retire loops in `GuestBufferMemory.cpp` use it, because the new lease without the range hid it from code that only asks what is registered (the `host_import` lifetime test and `agc_unit_shadow` saw it). The mutation race test now asserts that an import of the waiting extent is refused. - Debt entry: the leases taken by `GuestAllocationsAcquire` and `GuestAllocationsAcquireAll` leave out a range a mutation waits on, while `GuestAllocationsAcquireRegistered` still lists it; whether the console keeps that memory visible is unknown. - `GuestAllocationsAcquireMapped_nid_no_patch`, added to `main` after this change was written, builds its lease without the retiring check, so `ImportMappedRanges` can still lease a range a mutation waits on; this pull request does not change it. `guest_memory` gains `CheckPinnedRangeIsLeftOutOfNewLeases`: a pin waiter replaces the lease with a new `AcquireAll` lease the way a worker does, and the range is unmapped. Without the change the unmap fails with the line above (`still pinned after 8 recorder syncs`, see Tested); with it the unmap succeeds, the old lease no longer holds the range, and a later `AcquireAll` lease holds a new mapping. This shows the mechanism, not that Brigandine hangs this way: a diagnostic run of the title ended earlier in a different stop (the engine's 120 s watchdog on the render thread) and did not reach the pin, so the lease source in the title is not measured. ### Tested Windows 10 Pro (19045), WinLibs GCC 15.2.0 r7, Release, on `main` `b54849f5a0` + these 4 commits rebased onto it (head `2e9dcf0e35`; four conflicts in the first rebase: `docs/dev/debt/libc.md` three times, and `GuestAllocations.cpp` once, where `main`'s `GuestAllocationsAcquireMapped_nid_no_patch` and this change's `GuestAllocationsAcquireRegistered_nid_postfix` are both kept); ninja exit code 0 read for each arm: - `ctest -R ^guest_memory$`: passes with the change (3 of 3 runs); fails without it in 3 of 3 runs (`GuestAllocations.hpp`, `GuestAllocations.cpp` and `GuestBufferMemory.cpp` taken back to `main` `b54849f5a0`, tests kept): `[gpu] leased allocation 0x200f70000+0x8000 still pinned after 8 recorder syncs`, `Guest memory check failed at core/libs/tests/GuestMemory.cpp:2404`, exit code `0xc0000409`. - `ctest -R '^guest_memory$|agc_host_import|agc_driver_host_import|agc_unit_shadow|agc_driver_unit_shadow'` (18 tests), on an NVIDIA GeForce RTX 4080 SUPER with `ANYPS5_REQUIRE_VULKAN=1` and `ANYPS5_NO_SHADER_CACHE=1`, one run each on `main` `66d362c782` and on the head: ctest reports 0 failed out of 18 in both, `agc_host_import_sparse` is skipped (udmabuf imports are Linux only), and `agc_host_import_cut_lifetime` passes in both. - Vulkan validation comparison: not established. This host has no validation layer installed and the run above did not request one. An earlier run on `main` and on the previous head that did set `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` without a layer printed no `was not found but was requested` line and no `VUID-` line, which says nothing about validation. A locally built `VkLayer_khronos_validation.dll` loaded through `VK_LAYER_PATH` crashes 11 of the 18 tests inside the layer during device creation (`VkLayer_khronos_validation.dll+0xe66a41`) on `main` and on this head alike, so no `VUID-` comparison exists from it either. - `python tools/check_conventions.py --base upstream/main` passes; `git merge-tree` of the head against current `main` `b54849f5a0` is clean. - Not tested: Linux and macOS (the `guest_memory` test now sets `APS5_PIN_WAIT_MS` there too, not built), a console, the title with this change. Measured by others on earlier heads: jotitadev on Ubuntu 26.04 (Intel i7-8700, GCC 15.2, Release) at head `46d11782e`: `guest_memory` passes 3 of 3 with the change and aborts at `GuestMemory.cpp:1497` with `GuestAllocations.cpp` of `main`; blawesom on CachyOS (kernel 7.2.9, GCC 16.2.1, AMD RX 9070 XT / RADV) at the rebased head `a850691ed`: full suite 1338 of 1339, the failure is `agc_driver_tessellation` (#4727) as on `main`; TheSovietWaffle on Windows 10 Pro 22H2 (RTX 3080, NVIDIA 617.42) with #6182 and #6565 merged together: a title run that aborted on the lease wait after about 7 minutes without them ran about 2 h 14 min without that abort with them, which does not show which of the two PRs is needed. hugodearaujo on Linux 7.2.11 (RX 9070 XT, RADV, Mesa 26.2.5, GCC 16.2.1, Release) with ASTRO BOT (PPSA21567): the same lease-wait stop on `main` and on `main` plus this PR (one run), because the range is held by window imports and not by a lease; with #6182 the title got past the wait in 2 of 2 runs. ### Checklist - [x] Based on current `main`; no other open PR implements the same change - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt (`docs/dev/debt/libc.md`) - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: #12586 (landing order only; both add an entry to `docs/dev/debt/libc.md`) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a (registry logic; the agc tests and the title runs used an NVIDIA GeForce RTX 4080 SUPER, Windows 10) - [x] AI-assisted: yes AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jotitadev commented 2026-10-15 21:48:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-15T21:48:32Z.

Review: COMMENTED


Linux run, since the description lists Linux as not built.

Ubuntu 26.04, Intel i7-8700, GCC 15.2, Ninja, Release, BUILD_TESTING=ON, full build. main 31cbb55d7 with head 46d11782e merged on top.

  • With the PR: guest_memory passes 3 runs of 3 (0.6 s each).
  • Test kept, core/libs/prx/libc/src/GuestAllocations.cpp reverted to main: guest_memory aborts with the same failure as on Windows:
    [gpu] leased allocation 0x200d68000+0x8000 still pinned after 8 recorder syncs
    Guest memory check failed at core/libs/tests/GuestMemory.cpp:1497
    
    It fails in about 2 s, so the new setenv("APS5_PIN_WAIT_MS", "1000", 1) for non-Windows hosts is what keeps it short.
  • Non-GPU suite (ctest -E "^agc|gpu|vulkan|video_out" -j8): 648/650, same as main on this machine. The 2 failures (file_writer_binary, file_writer_text) also fail on main here.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5540354414 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565#pullrequestreview-5540354414). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-15T21:48:32Z. **Review:** COMMENTED --- Linux run, since the description lists Linux as not built. Ubuntu 26.04, Intel i7-8700, GCC 15.2, Ninja, Release, `BUILD_TESTING=ON`, full build. `main` 31cbb55d7 with head 46d11782e merged on top. - With the PR: `guest_memory` passes 3 runs of 3 (0.6 s each). - Test kept, `core/libs/prx/libc/src/GuestAllocations.cpp` reverted to `main`: `guest_memory` aborts with the same failure as on Windows: ``` [gpu] leased allocation 0x200d68000+0x8000 still pinned after 8 recorder syncs Guest memory check failed at core/libs/tests/GuestMemory.cpp:1497 ``` It fails in about 2 s, so the new `setenv("APS5_PIN_WAIT_MS", "1000", 1)` for non-Windows hosts is what keeps it short. - Non-GPU suite (`ctest -E "^agc|gpu|vulkan|video_out" -j8`): 648/650, same as `main` on this machine. The 2 failures (`file_writer_binary`, `file_writer_text`) also fail on `main` here. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
xXPBSXx commented 2026-10-16 03:33:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-16T03:33:32Z.


@adriadam10 a short request for review of this PR. Head 46d11782e is MERGEABLE / CLEAN, the Conventions, Eligibility and Intake checks are green. The new guest_memory case CheckPinnedRangeIsLeftOutOfNewLeases passes with the change and fails without it (still pinned after 8 recorder syncs). The description names the title (Brigandine Abyss, PPSA27752) and the log lines, and says what is shown (the mechanism) and what is not (that the title hangs this way). The overlap bot lists #6499 near GuestAllocations.cpp L40-L47; the topics differ, and I will rebase whichever of the two lands second if asked.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6207476812 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565#issuecomment-6207476812). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-16T03:33:32Z. --- @adriadam10 a short request for review of this PR. Head `46d11782e` is `MERGEABLE` / `CLEAN`, the Conventions, Eligibility and Intake checks are green. The new `guest_memory` case `CheckPinnedRangeIsLeftOutOfNewLeases` passes with the change and fails without it (`still pinned after 8 recorder syncs`). The description names the title (Brigandine Abyss, PPSA27752) and the log lines, and says what is shown (the mechanism) and what is not (that the title hangs this way). The overlap bot lists #6499 near `GuestAllocations.cpp` L40-L47; the topics differ, and I will rebase whichever of the two lands second if asked. AI-assisted (Claude Code).
blawesom commented 2026-10-17 11:31:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-17T11:31:54Z.


Rebase handoff — rebased onto current main (authorship unchanged). One docs-debt conflict, unioned.

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV):

  • builds; tools/check_conventions.py --base origin/main passes
  • full suite: 1338/1339 — the only failure is the known main regression (agc_driver_tessellation segfault, #4727), not this PR

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/6565
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is a850691ed.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233382041 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565#issuecomment-6233382041). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-17T11:31:54Z. --- **Rebase handoff** — rebased onto current `main` (authorship unchanged). One docs-debt conflict, unioned. Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): - builds; `tools/check_conventions.py --base origin/main` passes - **full suite: 1338/1339** — the only failure is the known `main` regression (`agc_driver_tessellation` segfault, #4727), not this PR **To pick it up:** ``` git fetch https://github.com/blawesom/AnyPS5 rebase/6565 git checkout <your branch> git merge --ff-only FETCH_HEAD ``` Head is `a850691ed`.
xXPBSXx commented 2026-10-19 01:58:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-19T01:58:52Z.


Rebased onto main 324e0e48e; the only conflict was in docs/dev/debt/libc.md (both lines kept). The code is unchanged: the patch id of the changes to GuestAllocations.cpp and GuestMemory.cpp is 89ba80ecc119, the same as before the rebase and as in blawesom's rebase/6565 (thanks for the handoff; it is based on an older main, so I rebased the same commit myself instead of fast-forwarding).

Tested on main 324e0e48e + head 95fabdbef (Windows 10, MinGW-w64 GCC 15.2.0, Release, rebuilt after the submodules of main were fetched): ctest -R ^guest_memory$ passes with the change (4.0 s) and fails without it (GuestAllocations.cpp taken from main, test kept): [gpu] leased allocation 0x200d60000+0x8000 still pinned after 8 recorder syncs, Guest memory check failed at core/libs/tests/GuestMemory.cpp:1622, exit code 8. The earlier run on 4eb91eacd gave the same result. The head commit author address is the account's noreply address.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6258030311 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565#issuecomment-6258030311). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-19T01:58:52Z. --- Rebased onto `main` `324e0e48e`; the only conflict was in `docs/dev/debt/libc.md` (both lines kept). The code is unchanged: the patch id of the changes to `GuestAllocations.cpp` and `GuestMemory.cpp` is `89ba80ecc119`, the same as before the rebase and as in blawesom's `rebase/6565` (thanks for the handoff; it is based on an older `main`, so I rebased the same commit myself instead of fast-forwarding). Tested on `main` `324e0e48e` + head `95fabdbef` (Windows 10, MinGW-w64 GCC 15.2.0, Release, rebuilt after the submodules of `main` were fetched): `ctest -R ^guest_memory$` passes with the change (4.0 s) and fails without it (`GuestAllocations.cpp` taken from `main`, test kept): `[gpu] leased allocation 0x200d60000+0x8000 still pinned after 8 recorder syncs`, `Guest memory check failed at core/libs/tests/GuestMemory.cpp:1622`, exit code 8. The earlier run on `4eb91eacd` gave the same result. The head commit author address is the account's noreply address. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-19 05:35:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-19T05:35:19Z.


Rebased onto main 4ffb0cd12 (new head b2dbb48bb). One conflict, in core/libs/prx/libc/src/GuestAllocations.cpp: #6917 made the registry keep its lease snapshots (std::shared_ptr) until the registry changes, where this change had std::weak_ptr. I kept the shared snapshots and added the list of retiring ranges next to them. A retiring range is only added after the snapshots were reset in the scan loop and no snapshot is stored while that list is not empty; unmark resets them again, so a snapshot never holds a range that is being waited for.

Tested on main 4ffb0cd12 + head b2dbb48bb (Windows 10, NVIDIA GeForce RTX 4080 SUPER, driver 610.74, MinGW-w64 GCC 15.2.0, Release): ctest -R ^guest_memory$ passes with the change (4.9 s). Without it (GuestAllocations.cpp taken from main, test kept) the test aborts (exit code 0xc0000409) after [gpu] leased allocation 0x200d60000+0x8000 still pinned after 8 recorder syncs. python tools/check_conventions.py --base upstream/main passes. The head commit author address is the account's noreply address; the previous head 95fabdbef is kept as tag backup/6565-95fabdbef on the fork.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6260449802 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565#issuecomment-6260449802). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-19T05:35:19Z. --- Rebased onto `main` `4ffb0cd12` (new head `b2dbb48bb`). One conflict, in `core/libs/prx/libc/src/GuestAllocations.cpp`: #6917 made the registry keep its lease snapshots (`std::shared_ptr`) until the registry changes, where this change had `std::weak_ptr`. I kept the shared snapshots and added the list of retiring ranges next to them. A retiring range is only added after the snapshots were reset in the scan loop and no snapshot is stored while that list is not empty; `unmark` resets them again, so a snapshot never holds a range that is being waited for. Tested on `main` `4ffb0cd12` + head `b2dbb48bb` (Windows 10, NVIDIA GeForce RTX 4080 SUPER, driver 610.74, MinGW-w64 GCC 15.2.0, Release): `ctest -R ^guest_memory$` passes with the change (4.9 s). Without it (`GuestAllocations.cpp` taken from `main`, test kept) the test aborts (exit code 0xc0000409) after `[gpu] leased allocation 0x200d60000+0x8000 still pinned after 8 recorder syncs`. `python tools/check_conventions.py --base upstream/main` passes. The head commit author address is the account's noreply address; the previous head `95fabdbef` is kept as tag `backup/6565-95fabdbef` on the fork. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-19 07:45:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-19T07:45:11Z.


Rebased again onto main fb0dc118f (new head b10615d5e; merge-tree against the newer main d8d0222d0 is clean). The conflict was in core/libs/prx/libc/src/GuestAllocations.cpp, in three places: #6917-follow-up f9caa0974 added backingSerials / renewBacking next to the lease snapshots, and RequireUnpinned now records state->unpinned. I kept those and added the list of retiring ranges beside them; the range is removed again (unmark) before unpinned is recorded, so the snapshots are reset and never hold a range that is being waited for.

Tested on main fb0dc118f + head b10615d5e (Windows 10, NVIDIA GeForce RTX 4080 SUPER, driver 610.74, MinGW-w64 GCC 15.2.0, Release): ctest -R ^guest_memory$ passes with the change (3.1 s). Without it (GuestAllocations.cpp taken from main, test kept) the test aborts (exit code 0xc0000409) after [gpu] leased allocation 0x200d60000+0x8000 still pinned after 8 recorder syncs. python tools/check_conventions.py --base upstream/main passes. The head commit author is the account's noreply address; the previous head b2dbb48bb is kept as tag backup/6565-b2dbb48bb on the fork.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6262279993 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565#issuecomment-6262279993). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-19T07:45:11Z. --- Rebased again onto `main` `fb0dc118f` (new head `b10615d5e`; `merge-tree` against the newer `main` `d8d0222d0` is clean). The conflict was in `core/libs/prx/libc/src/GuestAllocations.cpp`, in three places: #6917-follow-up `f9caa0974` added `backingSerials` / `renewBacking` next to the lease snapshots, and `RequireUnpinned` now records `state->unpinned`. I kept those and added the list of retiring ranges beside them; the range is removed again (`unmark`) before `unpinned` is recorded, so the snapshots are reset and never hold a range that is being waited for. Tested on `main` `fb0dc118f` + head `b10615d5e` (Windows 10, NVIDIA GeForce RTX 4080 SUPER, driver 610.74, MinGW-w64 GCC 15.2.0, Release): `ctest -R ^guest_memory$` passes with the change (3.1 s). Without it (`GuestAllocations.cpp` taken from `main`, test kept) the test aborts (exit code 0xc0000409) after `[gpu] leased allocation 0x200d60000+0x8000 still pinned after 8 recorder syncs`. `python tools/check_conventions.py --base upstream/main` passes. The head commit author is the account's noreply address; the previous head `b2dbb48bb` is kept as tag `backup/6565-b2dbb48bb` on the fork. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-19 08:32:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-19T08:32:33Z.


Pushed 2ca591f5d (docs only, no force): the technical-debt entry for the lease change now states the gap first, per the new CONTRIBUTING rule: whether the console keeps memory visible to GPU work submitted while a release or reprotect is pending is unknown and not measured on hardware; the implemented behaviour (a mutation leaves its leased range out of every lease taken until it ends) follows as far as the gap needs. python tools/check_conventions.py --base upstream/main passes and merge-tree against main 3fdd1f52e is clean; code unchanged since b10615d5e.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6263070649 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565#issuecomment-6263070649). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-19T08:32:33Z. --- Pushed `2ca591f5d` (docs only, no force): the technical-debt entry for the lease change now states the gap first, per the new CONTRIBUTING rule: whether the console keeps memory visible to GPU work submitted while a release or reprotect is pending is unknown and not measured on hardware; the implemented behaviour (a mutation leaves its leased range out of every lease taken until it ends) follows as far as the gap needs. `python tools/check_conventions.py --base upstream/main` passes and `merge-tree` against `main` `3fdd1f52e` is clean; code unchanged since `b10615d5e`. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-19 17:47:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-19T17:47:29Z.


Rebased onto main e90a1d180 (new head 0c5cee488, two commits; merge-tree against the newer main 844450824 is clean). The only conflict was in docs/dev/debt/libc.md, where main added the ios_base standard streams entry in the same place as this change's entry; both are kept. core/libs/prx/libc/src/GuestAllocations.cpp and core/libs/tests/GuestMemory.cpp rebased without conflict (recent main commits touching libc/GuestAllocations: #7878, #7906, #6985, #6975, #7039 — none overlapped the changed lines).

Tested on main e90a1d180 + head 0c5cee488 (Windows 10.0.19045, NVIDIA GeForce RTX 4080 SUPER, driver 610.74, MinGW-w64 GCC 15.2.0, Release): ctest -N -R ^guest_memory$ lists the test, and ctest -R ^guest_memory$ passes with the change (3.3 s). Without it (GuestAllocations.cpp taken from main, test kept) the test aborts (exit code 0xc0000409) after [gpu] leased allocation 0x200d60000+0x8000 still pinned after 8 recorder syncs. python tools/check_conventions.py --base upstream/main passes. Both commits carry the account's noreply address; the previous head 2ca591f5d is kept as tag backup/6565-2ca591f5d on the fork.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6273544358 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565#issuecomment-6273544358). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-19T17:47:29Z. --- Rebased onto `main` `e90a1d180` (new head `0c5cee488`, two commits; `merge-tree` against the newer `main` `844450824` is clean). The only conflict was in `docs/dev/debt/libc.md`, where `main` added the `ios_base standard streams` entry in the same place as this change's entry; both are kept. `core/libs/prx/libc/src/GuestAllocations.cpp` and `core/libs/tests/GuestMemory.cpp` rebased without conflict (recent `main` commits touching libc/GuestAllocations: #7878, #7906, #6985, #6975, #7039 — none overlapped the changed lines). Tested on `main` `e90a1d180` + head `0c5cee488` (Windows 10.0.19045, NVIDIA GeForce RTX 4080 SUPER, driver 610.74, MinGW-w64 GCC 15.2.0, Release): `ctest -N -R ^guest_memory$` lists the test, and `ctest -R ^guest_memory$` passes with the change (3.3 s). Without it (`GuestAllocations.cpp` taken from `main`, test kept) the test aborts (exit code 0xc0000409) after `[gpu] leased allocation 0x200d60000+0x8000 still pinned after 8 recorder syncs`. `python tools/check_conventions.py --base upstream/main` passes. Both commits carry the account's noreply address; the previous head `2ca591f5d` is kept as tag `backup/6565-2ca591f5d` on the fork. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-19 21:58:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-19T21:58:40Z.


Rebased onto main eaa5c9238 (new head 4e57c4c84, two commits; merge-tree against the newer main is clean). The only conflict was in core/libs/tests/GuestMemory.cpp, in the list of test calls in main(): main added the direct-memory release checks (CheckReleaseKeepsPhysicalUntilViewsUnmapped, CheckConcurrentCheckedReleasesUnmapViewsOnce) at the place where this change's CheckPinnedRangeIsLeftOutOfNewLeases() went; both are kept. core/libs/prx/libc/src/GuestAllocations.cpp and docs/dev/debt/libc.md rebased without conflict. The main commits that touched these files since the previous head are #7448 (direct memory release order, libkernel) and #7872 (std::_Throw_bad_optional_access, libc); neither overlaps the changed lines.

Tested on main eaa5c9238 + head 4e57c4c84 (Windows 10.0.19045, NVIDIA GeForce RTX 4080 SUPER, driver 610.74, MinGW-w64 GCC 15.2.0, Release): ctest -N -R ^guest_memory$ lists the test, and ctest -R ^guest_memory$ passes with the change (3.1 s). Without it (GuestAllocations.cpp taken from main, test kept) the test aborts (exit code 0xc0000409) after [gpu] leased allocation 0x200d60000+0x8000 still pinned after 8 recorder syncs. python tools/check_conventions.py --base upstream/main passes. Both commits carry the account's noreply address; the previous head 0c5cee488 is kept as tag backup/6565-0c5cee488 on the fork.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6278304539 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565#issuecomment-6278304539). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-19T21:58:40Z. --- Rebased onto `main` `eaa5c9238` (new head `4e57c4c84`, two commits; `merge-tree` against the newer `main` is clean). The only conflict was in `core/libs/tests/GuestMemory.cpp`, in the list of test calls in `main()`: `main` added the direct-memory release checks (`CheckReleaseKeepsPhysicalUntilViewsUnmapped`, `CheckConcurrentCheckedReleasesUnmapViewsOnce`) at the place where this change's `CheckPinnedRangeIsLeftOutOfNewLeases()` went; both are kept. `core/libs/prx/libc/src/GuestAllocations.cpp` and `docs/dev/debt/libc.md` rebased without conflict. The `main` commits that touched these files since the previous head are #7448 (direct memory release order, `libkernel`) and #7872 (`std::_Throw_bad_optional_access`, `libc`); neither overlaps the changed lines. Tested on `main` `eaa5c9238` + head `4e57c4c84` (Windows 10.0.19045, NVIDIA GeForce RTX 4080 SUPER, driver 610.74, MinGW-w64 GCC 15.2.0, Release): `ctest -N -R ^guest_memory$` lists the test, and `ctest -R ^guest_memory$` passes with the change (3.1 s). Without it (`GuestAllocations.cpp` taken from `main`, test kept) the test aborts (exit code 0xc0000409) after `[gpu] leased allocation 0x200d60000+0x8000 still pinned after 8 recorder syncs`. `python tools/check_conventions.py --base upstream/main` passes. Both commits carry the account's noreply address; the previous head `0c5cee488` is kept as tag `backup/6565-0c5cee488` on the fork. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-21 01:02:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T01:02:12Z.


Rebased onto main 57fdffd91 (new head 4b8125641, two commits, author unchanged). The only conflict was in docs/dev/debt/libc.md, where main changed the std::_Pad, _Thrd_join, ... line next to this change's entry; both are kept. The patch id of the changes under core/ is 7e4fd6dbc235, the same as before the rebase, so the code is unchanged. tools/check_conventions.py --base upstream/main passes; merge-tree against main is clean.

Windows 10.0.19045, MinGW-w64 GCC 15.2.0, Release, on that base: ctest -N -R '^guest_memory$' lists exactly that one test; ctest --no-tests=error -R '^guest_memory$' was run three times per tree.

  • With the change: passes 3 of 3; guest_memory_pool_stats passes.
  • core/libs/prx/libc/src/GuestAllocations.cpp restored to main (the test kept): fails 3 of 3, exit code 0xc0000409.
    Not tested: Linux, a title run.
    AI-assisted (Claude Code).
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6305370545 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565#issuecomment-6305370545). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-21T01:02:12Z. --- Rebased onto `main` `57fdffd91` (new head `4b8125641`, two commits, author unchanged). The only conflict was in `docs/dev/debt/libc.md`, where `main` changed the `std::_Pad, _Thrd_join, ...` line next to this change's entry; both are kept. The patch id of the changes under `core/` is `7e4fd6dbc235`, the same as before the rebase, so the code is unchanged. `tools/check_conventions.py --base upstream/main` passes; `merge-tree` against `main` is clean. Windows 10.0.19045, MinGW-w64 GCC 15.2.0, Release, on that base: `ctest -N -R '^guest_memory$'` lists exactly that one test; `ctest --no-tests=error -R '^guest_memory$'` was run three times per tree. - With the change: passes 3 of 3; `guest_memory_pool_stats` passes. - `core/libs/prx/libc/src/GuestAllocations.cpp` restored to `main` (the test kept): fails 3 of 3, exit code `0xc0000409`. Not tested: Linux, a title run. AI-assisted (Claude Code).
TheSovietWaffle commented 2026-10-21 09:33:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TheSovietWaffle on 2026-10-21T09:33:05Z.


Title data point for this together with #6182: Onimusha: Way of the Sword (PPSA27836), owned, Windows 10 Pro 22H2, RTX 3080 (NVIDIA 617.42), WinLibs GCC 15.2.0, Release, APS5_NO_HOST_IMPORT=1. Tree: main 1d4164552 plus a few open AGC/shader PRs and local workarounds for the #6570 and stencil-mask stops; the only change between the two runs below is #6182 + #6565 merged in.

  • Without them: about 7 minutes in, around the first story-mode load, the title aborts with guest allocation 0xe82bf60000+0x1a0000 is still pinned by GPU work or an import (waited 60000 ms for the lease (APS5_PIN_WAIT_MS)) (from a guest mutation in libc).
  • With both: the same path ran for about 2 hours 14 minutes without that abort or any other error, until the session was closed.

I merged both together, so this does not say which of the two is needed for this title; one run each.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6312741178 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565#issuecomment-6312741178). Originally posted by [TheSovietWaffle](https://github.com/TheSovietWaffle) on 2026-10-21T09:33:05Z. --- Title data point for this together with #6182: Onimusha: Way of the Sword (PPSA27836), owned, Windows 10 Pro 22H2, RTX 3080 (NVIDIA 617.42), WinLibs GCC 15.2.0, Release, `APS5_NO_HOST_IMPORT=1`. Tree: `main` `1d4164552` plus a few open AGC/shader PRs and local workarounds for the #6570 and stencil-mask stops; the only change between the two runs below is #6182 + #6565 merged in. - Without them: about 7 minutes in, around the first story-mode load, the title aborts with `guest allocation 0xe82bf60000+0x1a0000 is still pinned by GPU work or an import (waited 60000 ms for the lease (APS5_PIN_WAIT_MS))` (from a guest mutation in `libc`). - With both: the same path ran for about 2 hours 14 minutes without that abort or any other error, until the session was closed. I merged both together, so this does not say which of the two is needed for this title; one run each. AI-assisted: yes (Claude Code).
xXPBSXx commented 2026-10-21 20:52:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T20:52:10Z.


Linux data point for this PR (data only, from our own run; WSL2 Ubuntu 24.04, GCC 13.3, Release, software Vulkan llvmpipe; a virtualised kernel, not bare-metal Linux). Base 394170059 and head 561f90687a, each built and run 3 times (ctest --repeat until-fail:3):

  • agc_driver_host_import_lifetime passes 3 of 3 on the base and fails on the head with AGC graphics: guest pages became inaccessible before vkFreeMemory returned.
  • agc_driver_host_import_mutation_race passes 3 of 3 on the base and fails on the head.
    I have not found the cause yet. Not tested: Windows for these two tests, bare-metal Linux, the current main tip. We are looking into it and will update this PR.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6326291581 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565#issuecomment-6326291581). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-21T20:52:10Z. --- Linux data point for this PR (data only, from our own run; WSL2 Ubuntu 24.04, GCC 13.3, Release, software Vulkan llvmpipe; a virtualised kernel, not bare-metal Linux). Base `394170059` and head `561f90687a`, each built and run 3 times (`ctest --repeat until-fail:3`): - `agc_driver_host_import_lifetime` passes 3 of 3 on the base and fails on the head with `AGC graphics: guest pages became inaccessible before vkFreeMemory returned`. - `agc_driver_host_import_mutation_race` passes 3 of 3 on the base and fails on the head. I have not found the cause yet. Not tested: Windows for these two tests, bare-metal Linux, the current `main` tip. We are looking into it and will update this PR. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-21 21:09:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T21:09:11Z.


Windows data point for the current head 561f90687, merged onto main 0c6a5bd59 (clean, git merge-tree rc 0): Windows 10.0.19045, MinGW-w64 GCC 15.2.0, Release. For each test, ctest -N lists exactly that one test and ctest --no-tests=error was run three times per tree. This confirms the Linux result B posted above on a second platform:

  • agc_driver_host_import_lifetime: fails 3 of 3 with this PR; passes 3 of 3 on the same tree with core/libs/prx/libc/src/GuestAllocations.cpp restored to main. The failing run's output (kept with ctest -V) has AGC graphics: guest pages became inaccessible before vkFreeMemory returned.
  • agc_driver_host_import_mutation_race: fails 3 of 3 with this PR; passes 3 of 3 with GuestAllocations.cpp restored to main (failure message not kept).
    I have not found the cause. Until it is understood this PR should not be merged; I will follow up here.
    Not tested: other platforms, a title run.
    AI-assisted (Claude Code).
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6326606910 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565#issuecomment-6326606910). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-21T21:09:11Z. --- Windows data point for the current head `561f90687`, merged onto `main` `0c6a5bd59` (clean, `git merge-tree` rc 0): Windows 10.0.19045, MinGW-w64 GCC 15.2.0, Release. For each test, `ctest -N` lists exactly that one test and `ctest --no-tests=error` was run three times per tree. This confirms the Linux result B posted above on a second platform: - `agc_driver_host_import_lifetime`: fails 3 of 3 with this PR; passes 3 of 3 on the same tree with `core/libs/prx/libc/src/GuestAllocations.cpp` restored to `main`. The failing run's output (kept with `ctest -V`) has `AGC graphics: guest pages became inaccessible before vkFreeMemory returned`. - `agc_driver_host_import_mutation_race`: fails 3 of 3 with this PR; passes 3 of 3 with `GuestAllocations.cpp` restored to `main` (failure message not kept). I have not found the cause. Until it is understood this PR should not be merged; I will follow up here. Not tested: other platforms, a title run. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-22 01:20:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-22T01:20:01Z.


Windows data point for the head 1c750d771, merged onto main a6dcea927 (clean, git merge-tree rc 0): Windows 10.0.19045, MinGW-w64 GCC 15.2.0, Release; every test target was rebuilt on this tree, each test run three times (ctest -N lists exactly one test per name). The GPU was not recorded in these logs, so no device is claimed.

  • The two tests that failed on 561f90687 (my Windows comment above): agc_driver_host_import_lifetime and agc_driver_host_import_mutation_race now pass 3 of 3.
  • The second regression named by D: agc_unit_shadow, agc_driver_unit_shadow and agc_driver_unit_shadow_budget pass 3 of 3.
  • All tests that run through agc_driver_recorder_tests (74 in this tree, including the ones above) and guest_memory / guest_memory_pool_stats: all pass 3 of 3.
  • agc_rect_list_position_invariant, agc_command_batch_fence_failure and agc_driver_host_import_failure_handles / _at_map / _teardown / _windows reported "Not Run" in the first pass because their executables were not built; after building them they pass 3 of 3 as well.
    In total 83 tests selected (77 in the first pass, the 6 above in the second), none failed. Not tested: Linux (B's run), other GPUs, a title run.
    AI-assisted (Claude Code).
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6330346975 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565#issuecomment-6330346975). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-22T01:20:01Z. --- Windows data point for the head `1c750d771`, merged onto `main` `a6dcea927` (clean, `git merge-tree` rc 0): Windows 10.0.19045, MinGW-w64 GCC 15.2.0, Release; every test target was rebuilt on this tree, each test run three times (`ctest -N` lists exactly one test per name). The GPU was not recorded in these logs, so no device is claimed. - The two tests that failed on `561f90687` (my Windows comment above): `agc_driver_host_import_lifetime` and `agc_driver_host_import_mutation_race` now pass 3 of 3. - The second regression named by D: `agc_unit_shadow`, `agc_driver_unit_shadow` and `agc_driver_unit_shadow_budget` pass 3 of 3. - All tests that run through `agc_driver_recorder_tests` (74 in this tree, including the ones above) and `guest_memory` / `guest_memory_pool_stats`: all pass 3 of 3. - `agc_rect_list_position_invariant`, `agc_command_batch_fence_failure` and `agc_driver_host_import_failure_handles` / `_at_map` / `_teardown` / `_windows` reported "Not Run" in the first pass because their executables were not built; after building them they pass 3 of 3 as well. In total 83 tests selected (77 in the first pass, the 6 above in the second), none failed. Not tested: Linux (B's run), other GPUs, a title run. AI-assisted (Claude Code).
CnRJay commented 2026-11-01 19:52:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:52:34Z.

Review: COMMENTED


Points on 6565:

  1. Comments in code. GuestAllocations.cpp adds a comment block ("Ranges a mutation is waiting to see unpinned (RequireUnpinned): new leases leave them out..."). The rule is no comments except #endif and namespace ends.

  2. Starvation / ordering. Leaving a range out of new leases while a mutation waits means a caller asking for that range gets a different result (a copy or nothing) than one asking a moment earlier. Please say what a lease taker sees in that case, and whether the mutation wait is bounded; if the pinned holder never releases, does the waiter block forever while new leases keep failing?

  3. Negative control. Does the new test fail with the exclusion removed (i.e. a lease taken while a mutation waits keeps the mutation waiting)? Please show the failing output.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729932333 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6565#pullrequestreview-5729932333). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-11-01T19:52:34Z. **Review:** COMMENTED --- Points on 6565: 1. **Comments in code.** `GuestAllocations.cpp` adds a comment block ("Ranges a mutation is waiting to see unpinned (RequireUnpinned): new leases leave them out..."). The rule is no comments except `#endif` and namespace ends. 2. **Starvation / ordering.** Leaving a range out of new leases while a mutation waits means a caller asking for that range gets a different result (a copy or nothing) than one asking a moment earlier. Please say what a lease taker sees in that case, and whether the mutation wait is bounded; if the pinned holder never releases, does the waiter block forever while new leases keep failing? 3. **Negative control.** Does the new test fail with the exclusion removed (i.e. a lease taken while a mutation waits keeps the mutation waiting)? Please show the failing output.
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!6565
No description provided.