Repository navigation
Conversation
retroarch_main_quit_finish() freed the SMB and NFS pools before main_exit() deinitialised the core, so a core that closes files it has open on a share in its unload or deinit (Vita3K, through FILE* streams over the VFS) closed them on a freed connection: SIGSEGV in retro_vfs_file_close_smb() on quit.
Contributor
|
Thanks! Merged into master with your authorship kept. I added a small follow-up on top: smb_shutdown() and nfs_shutdown() now unhook the pool first and only free it when no connection is still in use. Two things can still hold one at that point: an SMB file nobody closed (an open SMB stream keeps its slot for its whole lifetime), and a background task the exit's 3-second drain left stuck on a dead share. Either would have hit the same freed-connection crash. If something is still holding the pool it's left alone, since the process is exiting anyway. The shutdown stays where you put it, before frontend_driver_deinit(), because the Switch tears its sockets down there. |
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.
On quit,
retroarch_main_quit_finish()freed the SMB and NFS connection pools beforemain_exit()deinitialised the core. A core that closes files it has open on a share when it unloads then closed them on a freed connection and RetroArch crashed on the way out.Seen with the Vita3K core on Android, which reads its games through
FILE*streams over the VFS (fopencookie) and closes them in its deinit:The shutdown now runs in
main_exit()right afterRARCH_CTL_MAIN_DEINIT, when no core is left to use the pools. Closing content without quitting is unchanged: the pools stayed up then before as well.