fix(libc): name a guest abort() in the crash report #5957

Merged
xXPBSXx merged 2 commits from upstream-pr/5957 into main 2026-10-19 02:24:37 +00:00
xXPBSXx commented 2026-10-14 17:04:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-14T17:04:34Z.


What

The guest libc ends abort() in int 0x45; nop; ud2. Windows reports the int 0x45 as an access violation: a read of 0xffffffffffffffff. The crash report printed that as a generic FATAL: unhandled exception 0xc0000005 with read of 0xffffffffffffffff, which looks like a bad pointer.

Title: Sifu (PPSA03001), 300 s run, Windows 10, MinGW GCC 15.2, Release, the run ends after about 224 s: PPSA03001_rN/run_183839.err line 40 FATAL: unhandled exception 0xc0000005, line 41 rip 0x00007ffd424b4270 libc.prx.guest.prx+0x14270, line 42 read of 0xffffffffffffffff; the title's stdout log (run_183839.out lines 3295-3296) has just before it the Unreal Engine message LowLevelFatalError [File:Unknown] [Line: 1214] / GameThread timed out waiting for RenderThread after 120.00 secs, so the title called abort() after its own watchdog fired.

The report now adds one line, guest abort() (int 0x45), when the access violation is a read of 0xffffffffffffffff and the two bytes at rip are cd 45. In the run above it is line 43 of run_183839.err. Nothing else in the report changes and the process still ends the same way. The windows_exception_tests child-process test gets a second child that executes int 0x45.

This does not fix the stalled render thread; it only makes such logs sortable. Related, closed: #3209 (the same title's RenderThread).

Tested

Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs), Release, on main e34c479210c78d7b160d7054f3e72de422b23d7a + this commit (f4b45af04, git status clean):

  • windows_exception_tests (target built and run alone): with the fix exit code 0; without the fix (the same tree with CrashReport.cpp taken back from main) exit code 0xC0000409 (fast fail from abort()).
  • Title run (Sifu, PPSA03001, 300 s limit): on a tree that is main e34c47921 plus this commit and three unrelated local commits that are not part of this pull request (mmap, pthread attribute and clock id checks in libkernel); full libs and relinker rebuilt from that tree, title relinked with it; the log shows guest abort() (int 0x45) as above. I did not repeat the title run on the tree with this commit alone.
  • python tools/check_conventions.py --base upstream/main with this title and body passes ("All conventions checks passed.").
  • Not tested: Linux, a console, any other ctest test.

Checklist

  • Based on current main (e34c47921); 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); no silent stubs added
  • 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: none
  • Unblocks: none (diagnostic only; evidence title PPSA03001 Sifu)
  • GPUs tested: n/a (crash report text; the title run used an NVIDIA GeForce RTX 4080 SUPER, Windows 10)
  • AI-assisted: yes (Claude Code)

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4861488941 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5957). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-14T17:04:34Z. --- ### What The guest libc ends `abort()` in `int 0x45; nop; ud2`. Windows reports the `int 0x45` as an access violation: a read of `0xffffffffffffffff`. The crash report printed that as a generic `FATAL: unhandled exception 0xc0000005` with `read of 0xffffffffffffffff`, which looks like a bad pointer. Title: Sifu (PPSA03001), 300 s run, Windows 10, MinGW GCC 15.2, Release, the run ends after about 224 s: `PPSA03001_rN/run_183839.err` line 40 `FATAL: unhandled exception 0xc0000005`, line 41 `rip 0x00007ffd424b4270 libc.prx.guest.prx+0x14270`, line 42 `read of 0xffffffffffffffff`; the title's stdout log (`run_183839.out` lines 3295-3296) has just before it the Unreal Engine message `LowLevelFatalError [File:Unknown] [Line: 1214]` / `GameThread timed out waiting for RenderThread after 120.00 secs`, so the title called `abort()` after its own watchdog fired. The report now adds one line, `guest abort() (int 0x45)`, when the access violation is a read of `0xffffffffffffffff` and the two bytes at `rip` are `cd 45`. In the run above it is line 43 of `run_183839.err`. Nothing else in the report changes and the process still ends the same way. The `windows_exception_tests` child-process test gets a second child that executes `int 0x45`. This does not fix the stalled render thread; it only makes such logs sortable. Related, closed: #3209 (the same title's RenderThread). ### Tested Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs), Release, on `main` `e34c479210c78d7b160d7054f3e72de422b23d7a` + this commit (`f4b45af04`, `git status` clean): - `windows_exception_tests` (target built and run alone): with the fix exit code `0`; without the fix (the same tree with `CrashReport.cpp` taken back from `main`) exit code `0xC0000409` (fast fail from `abort()`). - Title run (Sifu, PPSA03001, 300 s limit): on a tree that is `main` `e34c47921` plus this commit and three unrelated local commits that are not part of this pull request (mmap, pthread attribute and clock id checks in `libkernel`); full `libs` and relinker rebuilt from that tree, title relinked with it; the log shows `guest abort() (int 0x45)` as above. I did not repeat the title run on the tree with this commit alone. - `python tools/check_conventions.py --base upstream/main` with this title and body passes ("All conventions checks passed."). - Not tested: Linux, a console, any other ctest test. ### Checklist - [x] Based on current `main` (`e34c47921`); 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`); no silent stubs added - [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: none - [x] Unblocks: none (diagnostic only; evidence title PPSA03001 Sifu) - [x] GPUs tested: n/a (crash report text; the title run used an NVIDIA GeForce RTX 4080 SUPER, Windows 10) - [x] AI-assisted: yes (Claude Code) AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-15 12:12:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:12:16Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6044 core/libs/tests/WindowsExceptions.cpp
PR 7192 core/libs/prx/libc/src/specifics/windows/CrashReport.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6191751338 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5957#issuecomment-6191751338). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T12:12:16Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/WindowsExceptions.cpp` | | [PR 7192](https://www.github.com/boykopovar/AnyPS5/pull/7192) | `core/libs/prx/libc/src/specifics/windows/CrashReport.cpp` |
xXPBSXx commented 2026-10-15 17:14:19 +00:00 (Migrated from github.com)

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


@adriadam10 a short request for review of this PR. Head f4b45af04 is MERGEABLE, the Conventions, Eligibility and Intake checks are green, and the description names the title (Sifu, PPSA03001), the log line and the test that fails without the change. It is a diagnostic-only change (the crash report names a guest abort()). If a review or a full Build run is possible, I will answer any finding the same day.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6197918574 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5957#issuecomment-6197918574). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-15T17:14:19Z. --- @adriadam10 a short request for review of this PR. Head `f4b45af04` is `MERGEABLE`, the Conventions, Eligibility and Intake checks are green, and the description names the title (Sifu, PPSA03001), the log line and the test that fails without the change. It is a diagnostic-only change (the crash report names a guest `abort()`). If a review or a full Build run is possible, I will answer any finding the same day. AI-assisted (Claude Code).
adriadam10 commented 2026-10-16 19:01:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T19:01:22Z.


Checked the diff: the int 0x45 detection reads the two bytes at rip through ReadCode and only fires for a read of 0xffffffffffffffff, so other access violations are unchanged; the new guest-abort child in windows_exception_tests pins the report line. Windows-only, so the Windows Build run is the gate; merging once it is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6222660317 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5957#issuecomment-6222660317). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-16T19:01:22Z. --- Checked the diff: the `int 0x45` detection reads the two bytes at `rip` through `ReadCode` and only fires for a read of `0xffffffffffffffff`, so other access violations are unchanged; the new `guest-abort` child in `windows_exception_tests` pins the report line. Windows-only, so the Windows Build run is the gate; merging once it is green.
adriadam10 commented 2026-10-16 21:26:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T21:26:06Z.

Review: CHANGES_REQUESTED


The full Build (windows, run 38967687206) fails windows_exceptions with this PR: Exit code 0xc0000409, unhandled exception 'St13runtime_error', what(): child process setup failed. The same test passes on the recent main push builds, so it comes from this change.

  • core/libs/tests/WindowsExceptions.cpp testGuestAbortReport: the exit code check goes through RequireHandle, whose message is generic, so the log doesn't say which assertion failed. On the runner the guest-abort child probably doesn't exit with 0xC0000005 or doesn't print the new line. Please make the failure report the child's exit code and output (a dedicated throw std::runtime_error with both), then fix what it shows. The runner is not the Windows 10 machine the test was tried on, so compare there before assuming int 0x45 behaves the same.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5553874500 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5957#pullrequestreview-5553874500). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-16T21:26:06Z. **Review:** CHANGES_REQUESTED --- The full Build (windows, run 38967687206) fails `windows_exceptions` with this PR: `Exit code 0xc0000409`, `unhandled exception 'St13runtime_error'`, `what(): child process setup failed`. The same test passes on the recent `main` push builds, so it comes from this change. - `core/libs/tests/WindowsExceptions.cpp` `testGuestAbortReport`: the exit code check goes through `RequireHandle`, whose message is generic, so the log doesn't say which assertion failed. On the runner the `guest-abort` child probably doesn't exit with `0xC0000005` or doesn't print the new line. Please make the failure report the child's exit code and output (a dedicated `throw std::runtime_error` with both), then fix what it shows. The runner is not the Windows 10 machine the test was tried on, so compare there before assuming `int 0x45` behaves the same.
xXPBSXx commented 2026-10-19 01:56:36 +00:00 (Migrated from github.com)

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


Thanks for the run link. Pushed 3050c8932 on top (no amend): testGuestAbortReport now throws one std::runtime_error that carries the child's exit code and its full output when the exit code is not 0xC0000005 or the line guest abort() (int 0x45) is missing, so the next Full Build log shows which of the two it was and what the child printed.

Local check (Windows 10 19045, MinGW GCC 15.2.0, Release, 5d9dcc42d + both commits of this PR): windows_exceptions passes (1.41 s), so the child exits with 0xC0000005 and names the abort there. I have not reproduced the runner failure and am not assuming int 0x45 behaves the same on it; the fix, if one is needed, follows from the new message.

Could you dispatch the Full Build for this PR once more? The failure message now carries the exit code and output of the child, and that tells us what to fix on the runner.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6258007852 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5957#issuecomment-6258007852). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-19T01:56:36Z. --- Thanks for the run link. Pushed 3050c8932 on top (no amend): `testGuestAbortReport` now throws one `std::runtime_error` that carries the child's exit code and its full output when the exit code is not `0xC0000005` or the line `guest abort() (int 0x45)` is missing, so the next Full Build log shows which of the two it was and what the child printed. Local check (Windows 10 19045, MinGW GCC 15.2.0, Release, `5d9dcc42d` + both commits of this PR): `windows_exceptions` passes (1.41 s), so the child exits with `0xC0000005` and names the abort there. I have not reproduced the runner failure and am not assuming `int 0x45` behaves the same on it; the fix, if one is needed, follows from the new message. Could you dispatch the Full Build for this PR once more? The failure message now carries the exit code and output of the child, and that tells us what to fix on the runner. AI-assisted (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!5957
No description provided.