fix(videoout): leave a host thread that cannot unwind shutdown #12113
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12113"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by wanderingbug on 2026-10-27T21:25:14Z.
What
ProcessShutdownthrown on a host thread whose root isthread_startnever reaches the catch inDriver::runor the presenter loop. On the confirmed hang, the sync-flip worker was insideFlipRequest::GpuReady, waiting on vblank withcfg->mutexheld. A later join, or a frame dump that locks that mutex or the GPU mutex, never returns.On a
thread_startmiss the host thread setshostShutdownAbandoned, logs, and pauses. It does not call_Unwind_ForcedUnwindorpthread_exit. Exit frames are copied while the config mutex is already held. Shutdown dumps that snapshot without taking the config mutex or the GPU mutex, then ends the process before joining the abandoned thread. A guest-frame miss that is notthread_startstill runs shutdown and_Exit.LibcTerminatekeeps the existing 8 second exit drain and skips the end flush once the flag is set.Upstream main already includes #11048 (
MainThreadMacOs.cppandOnMainThreadin libSceVideoOut) and #7814. This PR sits on that presenter. Open PRs #11447 and #11554 cover macOS compile and Vulkan loader fixes inLifecycle.cppandVulkanDevice.cpp, and those hunks are left out of this diff.Tested
Linux, gcc 13, Release, against upstream main
e0cd1259a9. Rebuilt libc, libSceVideoOut, and libSceAgcDriver. Passed exception_runtime, exception_personality, exception_c_cleanup, and video_out_output_mode_policy.python3 tools/check_conventions.py --base upstream/mainpassed.Square frame dump and clean exit were confirmed on the combined reference f91b74b1c, Apple M1 Max, macOS 27, Rosetta 2, MoltenVK 1.4.2.
Checklist
main(e0cd1259a9). Open PRs #11447 and #11554 edit Lifecycle.cpp and VulkanDevice.cpp for macOS compile and loader fixes; they do not implement this abandoned-thread exit.NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt filePull request closed