Repository navigation
fix(videoout): leave a host thread that cannot unwind shutdown - #12113
Closed
wanderingbug wants to merge 1 commit into
Closed
wanderingbug wants to merge 1 commit into
wanderingbug wants to merge 1 commit into
Conversation
Co-authored-by: devindevsec <devindevsec@users.noreply.github.com>
|
Thank you for your contribution! Authors with no pull requests merged into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 e0cd125. 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 f91b74b, Apple M1 Max, macOS 27, Rosetta 2, MoltenVK 1.4.2.
Checklist
main(e0cd125). Open PRs build(agc): compile Lifecycle, GuestMemory and GuestBufferMemory on macOS #11447 and fix(agc): load the Vulkan loader and list MoltenVK on macOS #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 file