fix hang with gdk-pixbuf >=2.44 Glycin: don't set SIGCHLD to IGNORE - #266
Open
yennor wants to merge 4 commits into
Open
fix hang with gdk-pixbuf >=2.44 Glycin: don't set SIGCHLD to IGNORE#266yennor wants to merge 4 commits into
yennor wants to merge 4 commits into
Conversation
added 2 commits
March 19, 2026 09:37
gdk-pixbuf 2.44 introduced Glycin, which decodes images in sandboxed
child processes (bwrap). Setting $SIG{CHLD}='IGNORE' caused the kernel
to auto-reap these children before GLib's GSubprocess could collect
their exit status, making every gdk-pixbuf image load hang indefinitely.
Fix by removing $SIG{CHLD}='IGNORE' and instead properly reaping child
processes at each fork site:
- forksystem and SaveTags: use Glib::child_watch_add
- metadata readers and simple_http_wget: use waitpid after completion
- mpv/mplayer _Kill_timeout: use waitpid(WNOHANG) to reap zombies
Also fix a pre-existing bug in forksystem where fork failure (undef)
fell through into the child branch because undef==0 in numeric context.
Fixes: squentin#262
Same fix as mpv/mplayer backends (7399e16): use waitpid(WNOHANG) in _Kill_timeout to reap finished children before checking if still running. Also add waitpid in iceserver _eos_cb to reap the child on normal exit.
|
Which GLib bindings are you using? Mine don't feature |
and adjust argument order
Author
|
You are completely right. As I said above. I didn't really do those changes myself. I just tested them, and told the model to test them, but as it seems, we never entered that code path... I know sooner or later I'll have to change my music player, so I didn't really invest too much time into it ;-) |
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.
Disclaimer: I'm not a Perl developper. I did the whole thing using a LLM. It looks sound to me, also passed tests and everything. But probably a seasoned perl developer should take a look at it @squentin ;-)
gdk-pixbuf 2.44 introduced Glycin, which decodes images in sandboxed child processes (bwrap). Setting $SIG{CHLD}='IGNORE' caused the kernel to auto-reap these children before GLib's GSubprocess could collect their exit status, making every gdk-pixbuf image load hang indefinitely.
Fix by removing $SIG{CHLD}='IGNORE' and instead properly reaping child processes at each fork site:
Also fix a pre-existing bug in forksystem where fork failure (undef) fell through into the child branch because undef==0 in numeric context.
Fixes: #262