Repository navigation
APS5_HANG_DUMP_SECS on Linux #1285
fisherjoey
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
#406 and #521 added the all-threads dump and the
APS5_HANG_DUMP_SECSwatchdog incore/libs/prx/libc/src/specifics/windows/CrashReport.cpp. Linux has neither: there is no Linux crash reporter inlibc/src/specifics/, andAPS5_HANG_DUMP_SECSis read only in that Windows file. When a title stops presenting on Linux, the stacks come from attachinggdboreu-stackby hand, which assumes the person is at the machine when it happens and has the tools installed. Bug reports from Linux users then have no stacks.Proposal
A Linux counterpart with the same variable and the same behaviour: with
APS5_HANG_DUMP_SECS=N, a watcher thread sleeps N seconds, writes every thread's stack to stderr in the same format as the Windows report (thread id, name, registers, module+offset frames) and aborts./proc/self/task. The watcher sends each one a real-time signal withtgkill; the handler records its context and frames into a preallocated slot and returns. The watcher waits for each slot with a timeout, so a thread that can't run the handler is reported as such instead of hanging the dump.dladdr, outside any signal handler./proc/self/task/<tid>/comm.core/libs/prx/libc/src/specifics/linux/CrashReport.cpp, built only on Linux.Not in scope: an all-threads dump on fatal signals on Linux. That is the natural follow-up and can reuse the same collection code, but it interacts with the guest signal delivery discussed in #727, so it would be a separate pull request.
What we have
An external script that does the same from outside the process (
eu-stackover every task, frames mapped to the title's ELF as app+offset). We used it to diagnose a title that hangs at its menu. The in-process version is not written yet.Questions
AI-assisted: yes
All reactions