Windows: since d9852df2a every frame waits out a title's 1 s frame timeout #5842

Open
opened 2026-10-14 13:31:03 +00:00 by poonasor · 5 comments
poonasor commented 2026-10-14 13:31:03 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by poonasor on 2026-10-14T13:31:03Z.


What happens

On main e33258a64 the title runs its intro at about 22 FPS up to frame ~1000, then drops to
0.85-0.95 FPS and stays there. Every frame the title logs
Failure in SubmissionManagerPs5::waitForFrame with error code 0x8002003C followed by an
"RC2 BreadCrumbs report" whose first incomplete breadcrumb is in the main graphics queue
(sssConvHorizontal / mainOpaque). 2,500-4,000 of these reports per run, against 25-40 on the
previous base ce5c83953.

APS5_PROFILE_GPU=1 shows the GPU busy for about 1.4 s of every 10 s, with recorded batches
spanning ~2.5 s from first to last command: the work is done, but the title does not see its
completion before its own 1 s timeout.

Bisect

Reverting these two commits on top of e33258a64 restores the previous behaviour (37 FPS through
frame ~1100, 6 timeout reports in 3.5 minutes, title-stage speed identical to ce5c83953):

  • 71da166a1 fix(libc): keep resident mappings to direct memory backings on Windows
  • d9852df2a fix(libc): track writes to singly mapped direct memory without faults on Windows

Not yet narrowed to which part of d9852df2a; my guess is that labels the GPU writes into a singly
mapped direct memory page (now private MEM_WRITE_WATCH memory) reach the title only on a later
copy-back instead of in place.

Setup

Windows 11 23H2, i7-7700K, RX 6700 XT (Adrenalin 25.10.45.05, amdvlk64), WinLibs GCC 15.2.0 r7,
Release. Launch: ANYPS5_OUTPUT_4K=1 APS5_COARSE_TIMED_WAITS=1 APS5_LOOP_GUARD=200000 APS5_NO_SNAPSHOT_CHECK=1 (fork-only switches off for the comparison).

AI-assisted: investigated and written with Claude Code; measurements are from runs on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5848731990 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5842). Originally posted by [poonasor](https://github.com/poonasor) on 2026-10-14T13:31:03Z. --- ## What happens On `main` `e33258a64` the title runs its intro at about 22 FPS up to frame ~1000, then drops to 0.85-0.95 FPS and stays there. Every frame the title logs `Failure in SubmissionManagerPs5::waitForFrame with error code 0x8002003C` followed by an "RC2 BreadCrumbs report" whose first incomplete breadcrumb is in the main graphics queue (`sssConvHorizontal` / `mainOpaque`). 2,500-4,000 of these reports per run, against 25-40 on the previous base `ce5c83953`. `APS5_PROFILE_GPU=1` shows the GPU busy for about 1.4 s of every 10 s, with recorded batches spanning ~2.5 s from first to last command: the work is done, but the title does not see its completion before its own 1 s timeout. ## Bisect Reverting these two commits on top of `e33258a64` restores the previous behaviour (37 FPS through frame ~1100, 6 timeout reports in 3.5 minutes, title-stage speed identical to `ce5c83953`): - 71da166a1 fix(libc): keep resident mappings to direct memory backings on Windows - d9852df2a fix(libc): track writes to singly mapped direct memory without faults on Windows Not yet narrowed to which part of d9852df2a; my guess is that labels the GPU writes into a singly mapped direct memory page (now private `MEM_WRITE_WATCH` memory) reach the title only on a later copy-back instead of in place. ## Setup Windows 11 23H2, i7-7700K, RX 6700 XT (Adrenalin 25.10.45.05, amdvlk64), WinLibs GCC 15.2.0 r7, Release. Launch: `ANYPS5_OUTPUT_4K=1 APS5_COARSE_TIMED_WAITS=1 APS5_LOOP_GUARD=200000 APS5_NO_SNAPSHOT_CHECK=1` (fork-only switches off for the comparison). AI-assisted: investigated and written with Claude Code; measurements are from runs on this machine.
MarcZX10 commented 2026-10-14 13:33:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-14T13:33:01Z.


The two-commit revert shows a real regression, but it does not yet identify the failing change. Before changing the write-watch path, could you compare four runs on the same current base and title setup: stock; revert only 71da166a1; revert only d9852df2a; revert both? Please capture the per-frame timeout count and queue completion timing for each. That should distinguish the resident-mapping change from the singly-mapped MEM_WRITE_WATCH/copy-back change. If only one revert restores the prior behavior, a focused Windows regression can then exercise that specific mapping type and its GPU-written completion label.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6169570873 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5842#issuecomment-6169570873). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-14T13:33:01Z. --- The two-commit revert shows a real regression, but it does not yet identify the failing change. Before changing the write-watch path, could you compare four runs on the same current base and title setup: stock; revert only `71da166a1`; revert only `d9852df2a`; revert both? Please capture the per-frame timeout count and queue completion timing for each. That should distinguish the resident-mapping change from the singly-mapped `MEM_WRITE_WATCH`/copy-back change. If only one revert restores the prior behavior, a focused Windows regression can then exercise that specific mapping type and its GPU-written completion label.
poonasor commented 2026-10-14 14:33:34 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by poonasor on 2026-10-14T14:33:34Z.


Thanks. Same base for all runs: main e33258a64 plus my fork's workarounds for the title (fork-only speed switches off), same title setup, 240 s of the intro each with APS5_PROFILE_GPU=1. Timeout reports are the title's SubmissionManagerPs5::waitForFrame ... 0x8002003C lines; [gputime] lines are 10 s windows.

Configuration FPS after intro frame ~1000 Timeout reports in 240 s Presents per 10 s GPU time per 10 s First-to-last command span per 10 s
stock (both commits) 0.83-0.85 125 8-9 1.31-1.44 s 2.40-2.55 s
revert only 71da166a1 crashed at ~70 s (see below) - - - -
revert only d9852df2a not buildable: 71da166a1 edits code d9852df2a adds and does not apply without it - - - -
revert both 2.37-2.46 3 23-25 3.1-3.2 s 4.55-4.70 s

Before the frame-1000 point both stock and revert-both run at 21-33 FPS, so the difference starts at the same scene in both.

Revert only 71da166a1 (d9852df2a kept) dies about 70 s in with an access violation in the driver, reading 0x00000011c0800000 from a memcpy of a 0x1fe0000-byte texture at 0x11c0000000 (libSceAgcDriver.prx+0x2181c6 <- +0x23ef3f <- +0x242bf3), i.e. a page of a direct-memory surface that is no longer readable. So 71da166a1 is a required fix for d9852df2a on this title, and the frame-timeout regression comes with d9852df2a itself.

In the stock run the GPU is busy only ~14 % of the time, yet the title waits out its 1 s timeout on most frames, which fits a completion label in singly mapped direct memory reaching the CPU late. I have not instrumented label writes yet; if a specific trace switch would help, tell me which and I'll rerun.

Logs and per-run summaries: happy to attach if useful.

AI-assisted: runs and write-up with Claude Code.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6170820051 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5842#issuecomment-6170820051). Originally posted by [poonasor](https://github.com/poonasor) on 2026-10-14T14:33:34Z. --- Thanks. Same base for all runs: `main` `e33258a64` plus my fork's workarounds for the title (fork-only speed switches off), same title setup, 240 s of the intro each with `APS5_PROFILE_GPU=1`. Timeout reports are the title's `SubmissionManagerPs5::waitForFrame ... 0x8002003C` lines; `[gputime]` lines are 10 s windows. | Configuration | FPS after intro frame ~1000 | Timeout reports in 240 s | Presents per 10 s | GPU time per 10 s | First-to-last command span per 10 s | |---|---|---|---|---|---| | stock (both commits) | 0.83-0.85 | 125 | 8-9 | 1.31-1.44 s | 2.40-2.55 s | | revert only 71da166a1 | crashed at ~70 s (see below) | - | - | - | - | | revert only d9852df2a | not buildable: 71da166a1 edits code d9852df2a adds and does not apply without it | - | - | - | - | | revert both | 2.37-2.46 | 3 | 23-25 | 3.1-3.2 s | 4.55-4.70 s | Before the frame-1000 point both stock and revert-both run at 21-33 FPS, so the difference starts at the same scene in both. Revert only 71da166a1 (d9852df2a kept) dies about 70 s in with an access violation in the driver, reading `0x00000011c0800000` from a `memcpy` of a 0x1fe0000-byte texture at `0x11c0000000` (`libSceAgcDriver.prx+0x2181c6` <- `+0x23ef3f` <- `+0x242bf3`), i.e. a page of a direct-memory surface that is no longer readable. So 71da166a1 is a required fix for d9852df2a on this title, and the frame-timeout regression comes with d9852df2a itself. In the stock run the GPU is busy only ~14 % of the time, yet the title waits out its 1 s timeout on most frames, which fits a completion label in singly mapped direct memory reaching the CPU late. I have not instrumented label writes yet; if a specific trace switch would help, tell me which and I'll rerun. Logs and per-run summaries: happy to attach if useful. AI-assisted: runs and write-up with Claude Code.
nikowolf123 commented 2026-10-14 17:13:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by nikowolf123 on 2026-10-14T17:13:11Z.


@poonasor this may be the same cost as #5692. Since #5596, singly mapped direct memory on Windows is private write-watched memory. The AGC driver imports it for the GPU without an alias, and on Windows an import without an alias is compared instead of write-tracked: decideImportWatch sets unwatchImports, and only an aliased import stays watched. If your log has [write-watch] Windows direct host imports use comparisons, your runs take that path. #5851 (@Pipodi, still open) sends imports that hold resident direct memory through the section alias, so they stay write-tracked. Could you add it to your table?

The same drop on other titles, and what #5851 does there:

  • Astro Bot on an RX 9070 XT with #5596 reverted: 15-17 → 56-106 presents per 10 s, [guestmem] compares ~31,000 MiB per 10 s → 0 (@SoRadGaming)
  • Astro Bot with #5851: 1.3-1.9 → 8.5-10.6 presents per second (@Sevthered)
  • Resident Evil Village with #5851 at 22091410a: mean 10.0 presents per 10 s against 1.7 with #5688 instead, and nothing compared (@EagleBearerYS)
  • Sifu with #5851: 0.47 → 2.94 FPS at the title screen (@kjhq)

Your stock row has the GPU busy ~14 % of the time and frames slower than 1 s (0.83-0.85 FPS). That would also fit a CPU-side cost rather than a late label, but it is a guess until the row exists.

The rows:

  • Base: ideally current main (763ad20fc), stock and with #5851. Your base e33258a64 predates #4878 (mine), which skips some of these compares until a write-watch mark; @oneandonlydean asked for current main on #5692 for that reason. If your title workarounds don't apply there, e33258a64 with #5851 next to your stock row still answers it.
  • Commits: git fetch https://github.com/boykopovar/AnyPS5 pull/5851/head then git cherry-pick ddeaa32b1 2d8de2d18 22091410a. They apply without conflicts on both bases. Take all three: 22091410a closes the race behind the failed APR read in Pipodi's long run with the earlier head.
  • Columns: the same as before (FPS after frame ~1000, timeout reports in 240 s, presents per 10 s, GPU time per 10 s). Optionally, one run of each with APS5_PROFILE_DRAW=1 and the [guestmem] compare per 10 s. Its counters are running totals, so take the difference of two reports.
  • Memory: Sevthered saw the first frame 36-50 s later and ~11 GB more working set with the PR. A note on memory use would help if your machine is tighter.

If the timeouts stay with #5851, that would point back at the label path you suspected, and @MarcZX100's focused regression for a GPU-written completion label in singly mapped memory would be the next step.

AI-assisted: written with Claude Code; I checked #5851's diff against importRunAt and decideImportWatch on main 763ad20fc and e33258a64 and read the reports on #5851 and #5692; I ran git cherry-pick of the three commits onto 763ad20fc and e33258a64 (both clean, and git range-diff shows the same changes). I did not build or run the title.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6174003385 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5842#issuecomment-6174003385). Originally posted by [nikowolf123](https://github.com/nikowolf123) on 2026-10-14T17:13:11Z. --- @poonasor this may be the same cost as #5692. Since #5596, singly mapped direct memory on Windows is private write-watched memory. The AGC driver imports it for the GPU without an alias, and on Windows an import without an alias is compared instead of write-tracked: [`decideImportWatch`](https://github.com/boykopovar/AnyPS5/blob/763ad20fc1927a3f677d544537618b17e061fc9f/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp#L636-L640) sets `unwatchImports`, and only an [aliased import stays watched](https://github.com/boykopovar/AnyPS5/blob/763ad20fc1927a3f677d544537618b17e061fc9f/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp#L1029). If your log has `[write-watch] Windows direct host imports use comparisons`, your runs take that path. #5851 (@Pipodi, still open) [sends imports that hold resident direct memory through the section alias](https://github.com/boykopovar/AnyPS5/blob/22091410a602030a23d9dc33819f57cc38daab69/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp#L980-L982), so they stay write-tracked. Could you add it to your table? The same drop on other titles, and what #5851 does there: - Astro Bot on an RX 9070 XT with #5596 reverted: 15-17 → 56-106 presents per 10 s, `[guestmem]` compares ~31,000 MiB per 10 s → 0 ([@SoRadGaming](https://github.com/boykopovar/AnyPS5/issues/5692#issuecomment-6169755100)) - Astro Bot with #5851: 1.3-1.9 → 8.5-10.6 presents per second ([@Sevthered](https://github.com/boykopovar/AnyPS5/pull/5851#issuecomment-6170460039)) - Resident Evil Village with #5851 at `22091410a`: mean 10.0 presents per 10 s against 1.7 with #5688 instead, and nothing compared ([@EagleBearerYS](https://github.com/boykopovar/AnyPS5/pull/5851#issuecomment-6172272192)) - Sifu with #5851: 0.47 → 2.94 FPS at the title screen ([@kjhq](https://github.com/boykopovar/AnyPS5/pull/5851#issuecomment-6172099943)) Your stock row has the GPU busy ~14 % of the time and frames slower than 1 s (0.83-0.85 FPS). That would also fit a CPU-side cost rather than a late label, but it is a guess until the row exists. The rows: - **Base:** ideally current `main` (`763ad20fc`), stock and with #5851. Your base `e33258a64` predates #4878 (mine), which skips some of these compares until a write-watch mark; @oneandonlydean [asked for current main on #5692](https://github.com/boykopovar/AnyPS5/issues/5692#issuecomment-6165150799) for that reason. If your title workarounds don't apply there, `e33258a64` with #5851 next to your stock row still answers it. - **Commits:** `git fetch https://github.com/boykopovar/AnyPS5 pull/5851/head` then `git cherry-pick ddeaa32b1 2d8de2d18 22091410a`. They apply without conflicts on both bases. Take all three: 22091410a [closes the race](https://github.com/boykopovar/AnyPS5/pull/5851#issuecomment-6171032777) behind the [failed APR read](https://github.com/boykopovar/AnyPS5/pull/5851#issuecomment-6170467887) in Pipodi's long run with the earlier head. - **Columns:** the same as before (FPS after frame ~1000, timeout reports in 240 s, presents per 10 s, GPU time per 10 s). Optionally, one run of each with `APS5_PROFILE_DRAW=1` and the `[guestmem]` compare per 10 s. Its counters are running totals, so take the difference of two reports. - **Memory:** Sevthered saw the first frame 36-50 s later and ~11 GB more working set with the PR. A note on memory use would help if your machine is tighter. If the timeouts stay with #5851, that would point back at the label path you suspected, and @MarcZX100's focused regression for a GPU-written completion label in singly mapped memory would be the next step. AI-assisted: written with Claude Code; I checked #5851's diff against `importRunAt` and `decideImportWatch` on `main` `763ad20fc` and `e33258a64` and read the reports on #5851 and #5692; I ran `git cherry-pick` of the three commits onto `763ad20fc` and `e33258a64` (both clean, and `git range-diff` shows the same changes). I did not build or run the title.
screamm commented 2026-10-15 00:53:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-15T00:53:53Z.


Windows data point on the mechanism, NVIDIA RTX 4070 (so not the AMD symptom itself): on ccleste (PPSA59322) main 6239ceffc byte-compares its 4K framebuffers every frame since #5596 ([guestmem] 1,032 compares, 30.2 GiB in 10 s; AGC submit 2.8–4.2 ms versus 0.7–0.8 ms on c2565f014), costing about a third of the frame rate here (73–83 FPS against 108 before #5596). Both open fixes, #6060 and #5851, bring the compares to 0 and the frame rate back (110–120 and 106 FPS). Full numbers and test results are on #6060. The single-graphics-queue path that an RX 6700 XT takes is not covered by my runs.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6181849387 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5842#issuecomment-6181849387). Originally posted by [screamm](https://github.com/screamm) on 2026-10-15T00:53:53Z. --- Windows data point on the mechanism, NVIDIA RTX 4070 (so not the AMD symptom itself): on ccleste (PPSA59322) `main` `6239ceffc` byte-compares its 4K framebuffers every frame since #5596 (`[guestmem]` 1,032 compares, 30.2 GiB in 10 s; AGC submit 2.8–4.2 ms versus 0.7–0.8 ms on `c2565f014`), costing about a third of the frame rate here (73–83 FPS against 108 before #5596). Both open fixes, #6060 and #5851, bring the compares to 0 and the frame rate back (110–120 and 106 FPS). Full numbers and test results are on #6060. The single-graphics-queue path that an RX 6700 XT takes is not covered by my runs. AI-assisted: yes (Claude Code)
poonasor commented 2026-10-15 02:08:35 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by poonasor on 2026-10-15T02:08:35Z.


@nikowolf123 thanks, that was it. Rows on current main ab9a47684 (contains #4878 / 763ad20fc) plus my fork's workarounds for the title (fork-only speed switches off), same title setup, intro with APS5_PROFILE_DRAW=1. My log has [write-watch] Windows direct host imports use comparisons in both runs.

Configuration FPS after intro frame ~1300 Timeout reports Notes
stock main 0.36-0.76 56 in 300 s
+ #5851 (ddeaa32b1 2d8de2d18 22091410a), cold shader cache 1.27-1.43 15 in 300 s
+ #5851, warm cache 1.26-1.46, steady 4 in 420 s
for reference: e33258a64 with d9852df2a + 71da166a1 reverted (earlier table) 2.37-2.46 3 in 240 s different base

The three commits applied cleanly. Before frame ~1300 every configuration runs at 33-37 FPS. With #5851, [guestmem] totals after 420 s: compare 3353 calls / 50483 MiB / 1.4 s; read 472857 calls / 288148 MiB / 28.8 s; write-changed 4171 calls / 37412 MiB / 46.7 s. I did not see a longer first frame or a memory problem on this machine (64 GB).

So #5851 removes most of the timeouts here, but this title is still at roughly 60 % of the rate it had with the two commits reverted on the older base. I have not split that remaining gap by commit; write-changed looks like the largest remaining CPU item in these counters. A revert of d9852df2a no longer applies on current main, so I can't repeat the old reference row on the same base.

AI-assisted: runs and write-up with Claude Code.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6182777333 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5842#issuecomment-6182777333). Originally posted by [poonasor](https://github.com/poonasor) on 2026-10-15T02:08:35Z. --- @nikowolf123 thanks, that was it. Rows on current `main` `ab9a47684` (contains #4878 / `763ad20fc`) plus my fork's workarounds for the title (fork-only speed switches off), same title setup, intro with `APS5_PROFILE_DRAW=1`. My log has `[write-watch] Windows direct host imports use comparisons` in both runs. | Configuration | FPS after intro frame ~1300 | Timeout reports | Notes | |---|---|---|---| | stock `main` | 0.36-0.76 | 56 in 300 s | | | + #5851 (`ddeaa32b1 2d8de2d18 22091410a`), cold shader cache | 1.27-1.43 | 15 in 300 s | | | + #5851, warm cache | 1.26-1.46, steady | 4 in 420 s | | | for reference: `e33258a64` with `d9852df2a` + `71da166a1` reverted (earlier table) | 2.37-2.46 | 3 in 240 s | different base | The three commits applied cleanly. Before frame ~1300 every configuration runs at 33-37 FPS. With #5851, `[guestmem]` totals after 420 s: compare 3353 calls / 50483 MiB / 1.4 s; read 472857 calls / 288148 MiB / 28.8 s; write-changed 4171 calls / 37412 MiB / 46.7 s. I did not see a longer first frame or a memory problem on this machine (64 GB). So #5851 removes most of the timeouts here, but this title is still at roughly 60 % of the rate it had with the two commits reverted on the older base. I have not split that remaining gap by commit; `write-changed` looks like the largest remaining CPU item in these counters. A revert of `d9852df2a` no longer applies on current `main`, so I can't repeat the old reference row on the same base. AI-assisted: runs and write-up with Claude Code.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#5842
No description provided.