[GAME STATUS]: Ghost of Yotei (v2.002.000) Stack Overflow: Part 2 #2151

Closed
opened 2026-11-26 10:16:03 +00:00 by github-bot · 6 comments
Owner

@⁠Ben-Dash on GitHub · 2026-11-07 15:24 UTC · original

Game title

Ghost of Yotei

Game ID / serial

PPSA26344

KytyPS5 version

Version 0.3.0, git=589bd14

Compatibility status

Logo

Last working build / first broken build

No response

Result details

Note that this is an extension of #1599. While nothing has changed in any signifcant degree, I wanted to post some new tests with TSC on/off, proper logs for information, and an update on Ghost of Yotei's boot progress. I will most likely close #1599 as a duplicate after publishing this one.

While testing Ghost of Yōtei, a stack overflow (0xC00000FD) occurs after the 309-block compute shader translates; PS5 TSC rate on avoids it but stalls on the loading spinner. A couple related issues are #1599 (stack overflow in the 309-block compute shader) and #1609 (commit 497020a, makes it translate). With PS5 TSC rate off, the official builds still crash deterministically in the 309-block compute shader, but now after translation succeeds. The log ends in the "native IR before resource tracking" dump, before the shader finishes resource tracking and SPIR-V emit. The exit code is -1073741571 (0xC00000FD, STATUS_STACK_OVERFLOW). With PS5 TSC rate on there is no crash, but the game stalls on the loading spinner with a healthy emulator.

| Source 8415235 (#1609 / 497020a test build) | no Guest TSC line | Compiles all 108 CS including the 309-block shader and submits ~453 flips, then hard-stalls: no frames, ~782K write-tracking faults/s, page table 13853/2048, direct memory 13.35/13.35 GB |
| Official 2026-10-28-c528324 | no Guest TSC line | Exits inside the 309-block shader after ~418 flips |
| Official 2026-11-06-9a29dc6 | off | ~903 flips, log ends after 105 compute shaders (shader logging was off, and output is buffered) |
| Official 2026-11-06-182161e | off | 105 CS compiled, exits in the 309-block shader |
| Official 2026-11-07-589bd14 | off, readback and tiled readback on | ~985 flips, 105 CS compiled, exits in the 309-block shader, exit code -1073741571 |
| Official 2026-11-06 builds | on | No crash. Stalls on the spinner; see below |

Crash details (TSC off)

  • The game boots and plays the PlayStation and Sucker Punch logos.
  • The 309-block shader (7 loops, hash 0xe4a433b4298b813e on 182161e/589bd14, 0xd0bbff78032edd55 on c528324) completes CFG Structurize (1 ms) and IR TranslateProgram (9–10 ms, 310 blocks), then the log ends inside the "native IR before resource tracking" dump.
  • The log is buffered, so the real death point may be slightly later. My guess, not confirmed, is that resource tracking or emit recurses deeply over this shader's loop-carried Phis.
  • The same site on three builds suggests it is deterministic. I could not get a debugger attached, so there is no stack trace.

Stall details (TSC on)

  • The game plays the PlayStation and Sucker Punch logos, then sits on a spinning loading circle. Loading stops after cache_ps5/load_menu_catalog.log.
  • The emulator is healthy: steady 30 FPS, 0 hitches, 26 draws and 68 dispatches per frame, flip queue never full, disk I/O ~0.1 MB/s.
  • Shader totals stay at VS 8 / PS 24 / CS 87, so the later shaders (including the 309-block one) are never reached.
  • Write-tracking faults are ~3.7K/s (vs ~782K/s on the Source build), page table is 7824/7376 of 16384, and texture transfers are a steady ~1.2 GB/s.
  • The guest TSC patch reports RDTSC/RDTSCP: native=165, skipped=51. The 51 skipped sites may leave the game reading two different clocks.
  • The three NpSessionSignaling_v1 stubs are called once at startup.

Settings that made no difference

Shader logging, accurate texture synchronization, readback, tiled readback, tessellation, occlusion queries, HDR, and present mode (Fifo vs Immediate).

Steps to reproduce the result

  1. Open KytyPS5
  2. Boot Game
  3. Watch logos
  4. Crash

Expected behavior

The game should successfully boot to the main menu.

OS

Windows 11 Pro 25H2 (Build 26200.9711)

CPU

AMD Ryzen 9700x

GPU

NVIDIA Geforce 2070 Super (Driver Version 621.01)

RAM / VRAM

32 GB DDR5 RAM / 8 GB VRAM

Log file upload

TSC_testing - Ghost_of_Yotei_November_7th_2026.zip

VirusTotal Hash for anyone who doesn't trust me: 977a1728c3112379a9e263d3533c06b063103bddbeb71541d50c18bb8e19b434

Ghost of Yotei _StackOverflowTest5.txt

Screenshots/video

Image

Extra notes

AMD CPU patch turned on
Windows SysV red zone crash protection turned on
Screen Resolution: 2560x1440
Present Mode: Fifo
Vblank Frequency: 60
GPU: 2070 Super
Enable Readback turned on
Enable Tiled Readback turned on
Enable Tessellation Support turned on
Enable Occlusion Queries turned on
Enable HDR Display Support turned on
Cache Shaders turned off
PS5 Pro Mode turned off
Network Connection turned off
Emulate PSN turned off
Accurate Texture Synchronization turned on

**@⁠Ben-Dash** on GitHub · 2026-11-07 15:24 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/2151) ### Game title Ghost of Yotei ### Game ID / serial PPSA26344 ### KytyPS5 version Version 0.3.0, git=589bd14 ### Compatibility status Logo ### Last working build / first broken build _No response_ ### Result details Note that this is an extension of #1599. While nothing has changed in any signifcant degree, I wanted to post some new tests with TSC on/off, proper logs for information, and an update on Ghost of Yotei's boot progress. I will most likely close #1599 as a duplicate after publishing this one. While testing Ghost of Yōtei, a stack overflow (0xC00000FD) occurs after the 309-block compute shader translates; PS5 TSC rate on avoids it but stalls on the loading spinner. A couple related issues are #1599 (stack overflow in the 309-block compute shader) and #1609 (commit 497020a, makes it translate). With PS5 TSC rate off, the official builds still crash deterministically in the 309-block compute shader, but now after translation succeeds. The log ends in the "native IR before resource tracking" dump, before the shader finishes resource tracking and SPIR-V emit. The exit code is `-1073741571` (0xC00000FD, STATUS_STACK_OVERFLOW). With PS5 TSC rate on there is no crash, but the game stalls on the loading spinner with a healthy emulator. | Source 8415235 (#1609 / 497020a test build) | no Guest TSC line | Compiles all 108 CS including the 309-block shader and submits ~453 flips, then hard-stalls: no frames, ~782K write-tracking faults/s, page table 13853/2048, direct memory 13.35/13.35 GB | | Official 2026-10-28-c528324 | no Guest TSC line | Exits inside the 309-block shader after ~418 flips | | Official 2026-11-06-9a29dc6 | off | ~903 flips, log ends after 105 compute shaders (shader logging was off, and output is buffered) | | Official 2026-11-06-182161e | off | 105 CS compiled, exits in the 309-block shader | | Official 2026-11-07-589bd14 | off, readback and tiled readback on | ~985 flips, 105 CS compiled, exits in the 309-block shader, exit code -1073741571 | | Official 2026-11-06 builds | **on** | No crash. Stalls on the spinner; see below | ### Crash details (TSC off) - The game boots and plays the PlayStation and Sucker Punch logos. - The 309-block shader (7 loops, hash 0xe4a433b4298b813e on 182161e/589bd14, 0xd0bbff78032edd55 on c528324) completes CFG Structurize (1 ms) and IR TranslateProgram (9–10 ms, 310 blocks), then the log ends inside the "native IR before resource tracking" dump. - The log is buffered, so the real death point may be slightly later. My guess, not confirmed, is that resource tracking or emit recurses deeply over this shader's loop-carried Phis. - The same site on three builds suggests it is deterministic. I could not get a debugger attached, so there is no stack trace. ### Stall details (TSC on) - The game plays the PlayStation and Sucker Punch logos, then sits on a spinning loading circle. Loading stops after `cache_ps5/load_menu_catalog.log`. - The emulator is healthy: steady 30 FPS, 0 hitches, 26 draws and 68 dispatches per frame, flip queue never full, disk I/O ~0.1 MB/s. - Shader totals stay at VS 8 / PS 24 / CS 87, so the later shaders (including the 309-block one) are never reached. - Write-tracking faults are ~3.7K/s (vs ~782K/s on the Source build), page table is 7824/7376 of 16384, and texture transfers are a steady ~1.2 GB/s. - The guest TSC patch reports `RDTSC/RDTSCP: native=165, skipped=51`. The 51 skipped sites may leave the game reading two different clocks. - The three `NpSessionSignaling_v1` stubs are called once at startup. ### Settings that made no difference Shader logging, accurate texture synchronization, readback, tiled readback, tessellation, occlusion queries, HDR, and present mode (Fifo vs Immediate). ### Steps to reproduce the result 1. Open KytyPS5 2. Boot Game 3. Watch logos 4. Crash ### Expected behavior The game should successfully boot to the main menu. ### OS Windows 11 Pro 25H2 (Build 26200.9711) ### CPU AMD Ryzen 9700x ### GPU NVIDIA Geforce 2070 Super (Driver Version 621.01) ### RAM / VRAM 32 GB DDR5 RAM / 8 GB VRAM ### Log file upload [TSC_testing - Ghost_of_Yotei_November_7th_2026.zip](https://github.com/user-attachments/files/34521800/TSC_testing.-.Ghost_of_Yotei_November_7th_2026.zip) VirusTotal Hash for anyone who doesn't trust me: 977a1728c3112379a9e263d3533c06b063103bddbeb71541d50c18bb8e19b434 [Ghost of Yotei _StackOverflowTest5.txt](https://github.com/user-attachments/files/34521918/Ghost.of.Yotei._StackOverflowTest5.txt) ### Screenshots/video <img width="1881" height="835" alt="Image" src="https://github.com/user-attachments/assets/718aa6e9-c117-4dff-9752-6391caba37bb" /> ### Extra notes AMD CPU patch turned on Windows SysV red zone crash protection turned on Screen Resolution: 2560x1440 Present Mode: Fifo Vblank Frequency: 60 GPU: 2070 Super Enable Readback turned on Enable Tiled Readback turned on Enable Tessellation Support turned on Enable Occlusion Queries turned on Enable HDR Display Support turned on Cache Shaders turned off PS5 Pro Mode turned off Network Connection turned off Emulate PSN turned off Accurate Texture Synchronization turned on
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:16:03 +00:00
Author
Owner

@⁠Ben-Dash on GitHub · 2026-11-07 15:26 UTC · original · edited 2026-11-07 16:05 UTC

The screenshot is from a test conducted while TSC was on. The Stack Overflow .txt file was from a test conducted with TSC off.

**@⁠Ben-Dash** on GitHub · 2026-11-07 15:26 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/2151#issuecomment-6708974575) · edited 2026-11-07 16:05 UTC The screenshot is from a test conducted while TSC was on. The Stack Overflow .txt file was from a test conducted with TSC off.
Author
Owner

@⁠Nawid3333 on GitHub · 2026-11-07 17:06 UTC · original

The 0xC00000FD with TSC off is a native recursion in resource tracking: IR::Tracker::CollectScalarRead
(ResourceTracking.cpp) calls itself once per value along an operand chain, so a long chain overflows the thread's
stack. As you guessed, the log is buffered, so the last line is earlier than the real stop.

I counted the frames on the overflowed stack for the same stop on my copy (an older game version, so the hash
differs; RX 9070 XT, Windows 11; CS 0xc7d37e2ca4c818a4, 309 blocks after structurization, 7 loops): 1191 nested
CollectScalarRead frames.

PR #1967 replaces that recursion with an explicit stack, and I linked it to this issue. With it, the same shader
translates (310 blocks) and the game goes past this point. On 589bd14 the PR still merges cleanly, and its test
deep scalar read dependencies exits with 0xC00000FD when only the test is added and passes with the PR.

**@⁠Nawid3333** on GitHub · 2026-11-07 17:06 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/2151#issuecomment-6710411890) The 0xC00000FD with TSC off is a native recursion in resource tracking: `IR::Tracker::CollectScalarRead` (`ResourceTracking.cpp`) calls itself once per value along an operand chain, so a long chain overflows the thread's stack. As you guessed, the log is buffered, so the last line is earlier than the real stop. I counted the frames on the overflowed stack for the same stop on my copy (an older game version, so the hash differs; RX 9070 XT, Windows 11; CS `0xc7d37e2ca4c818a4`, 309 blocks after structurization, 7 loops): 1191 nested `CollectScalarRead` frames. PR #1967 replaces that recursion with an explicit stack, and I linked it to this issue. With it, the same shader translates (310 blocks) and the game goes past this point. On 589bd14 the PR still merges cleanly, and its test `deep scalar read dependencies` exits with 0xC00000FD when only the test is added and passes with the PR.
Author
Owner

@⁠Nawid3333 on GitHub · 2026-11-09 14:40 UTC · original

@⁠Ben-Dash main now has its own fix for this recursion: 26ad49a66 collects the scalar reads on an explicit stack, and #1967's test for it (20,000 chained values on a 1 MiB stack) passes there. The official build KytyPS5-2026-11-09-f399d48 contains it.

Could you run Ghost of Yotei with that build, TSC off? Does the 0xC00000FD stack overflow go away? If it stops somewhere else, please attach _kyty.txt.

**@⁠Nawid3333** on GitHub · 2026-11-09 14:40 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/2151#issuecomment-6742811840) @⁠Ben-Dash main now has its own fix for this recursion: 26ad49a66 collects the scalar reads on an explicit stack, and #1967's test for it (20,000 chained values on a 1 MiB stack) passes there. The official build KytyPS5-2026-11-09-f399d48 contains it. Could you run Ghost of Yotei with that build, TSC off? Does the 0xC00000FD stack overflow go away? If it stops somewhere else, please attach `_kyty.txt`.
Author
Owner

@⁠Ben-Dash on GitHub · 2026-11-10 02:58 UTC · original

@⁠Ben-Dash main now has its own fix for this recursion: 26ad49a collects the scalar reads on an explicit stack, and #1967's test for it (20,000 chained values on a 1 MiB stack) passes there. The official build KytyPS5-2026-11-09-f399d48 contains it.

Could you run Ghost of Yotei with that build, TSC off? Does the 0xC00000FD stack overflow go away? If it stops somewhere else, please attach _kyty.txt.

Things are working now! Completely different error and exit code(321), so it seems like the stack overflow might be fixed. Unless there is more to be gained here, I'll probably close this issue and open a new one with the information, as this issue was mostly about the stack overflow more than anything else.

**@⁠Ben-Dash** on GitHub · 2026-11-10 02:58 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/2151#issuecomment-6757705378) > [@⁠Ben-Dash](https://github.com/Ben-Dash) main now has its own fix for this recursion: [26ad49a](https://github.com/KytyPS5/KytyPS5/commit/26ad49a662a17a252579bbe7cc7e170a745bf3c2) collects the scalar reads on an explicit stack, and [#1967](https://git.gtahub.st/github/KytyPS5--KytyPS5/pulls/1967)'s test for it (20,000 chained values on a 1 MiB stack) passes there. The official build KytyPS5-2026-11-09-f399d48 contains it. > > Could you run Ghost of Yotei with that build, TSC off? Does the 0xC00000FD stack overflow go away? If it stops somewhere else, please attach `_kyty.txt`. Things are working now! Completely different error and exit code(321), so it seems like the stack overflow might be fixed. Unless there is more to be gained here, I'll probably close this issue and open a new one with the information, as this issue was mostly about the stack overflow more than anything else.
Author
Owner

@⁠Nawid3333 on GitHub · 2026-11-10 17:27 UTC · original

Thanks for testing, good to know the stack overflow is gone.

Exit code 321 is KytyPS5's own fatal exit: when one of its EXIT / EXIT_IF / EXIT_NOT_IMPLEMENTED checks fires, it writes a --- Error --- or --- Fatal Error --- block with the message and the source file and line, then calls std::_Exit(321) (src/common/assert.cpp). So the last lines of _kyty.txt (and of the console) name the exact stop. If you put those lines or the whole log into the new issue, it can be matched to the code right away.

**@⁠Nawid3333** on GitHub · 2026-11-10 17:27 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/2151#issuecomment-6774317861) Thanks for testing, good to know the stack overflow is gone. Exit code 321 is KytyPS5's own fatal exit: when one of its `EXIT` / `EXIT_IF` / `EXIT_NOT_IMPLEMENTED` checks fires, it writes a `--- Error ---` or `--- Fatal Error ---` block with the message and the source file and line, then calls `std::_Exit(321)` (`src/common/assert.cpp`). So the last lines of `_kyty.txt` (and of the console) name the exact stop. If you put those lines or the whole log into the new issue, it can be matched to the code right away.
Author
Owner

@⁠Ben-Dash on GitHub · 2026-11-10 21:43 UTC · original

With the release of commit 26ad49a, this issue is now resolved. Thanks for the help provided!

**@⁠Ben-Dash** on GitHub · 2026-11-10 21:43 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/2151#issuecomment-6780053745) With the release of commit 26ad49a, this issue is now resolved. Thanks for the help provided!
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/KytyPS5--KytyPS5#2151
No description provided.