GNOME Bugzilla – Bug 721943
easytag hangs during startup
Last modified: 2014-01-21 20:13:12 UTC
If I try to start easytag most of the time it hangs during the startup. Most of the time I only get it running if I get all of my 6 CPU's busy and slow down the startup. It seems to be a race condition. I can't even call 'easytag --help' it hangs forever ...
I use easytag-2.1.8
Created attachment 265936 [details] strace of easytag startup
Thanks for the bug report, and especially the strace output. The symptoms and trace makes me think that it might be related to qtcurve. I remember reading a bug report where updating qtcurve fixed the problem: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711738 https://bugs.kde.org/show_bug.cgi?id=318891 Can you check that you have a version of qtcurve that has the patch in the Debian bug, or that you are using a recent version of glib that does not have the problem (I think that 2.36.2 should be fine)?
Yes, you are right. The problem is the use of popen and that something registers a SIGCHLD handler which doesn't work with popen(). https://github.com/QtCurve/qtcurve/issues/41
Good to know, thanks.
Well, it looks like easytag setups up a SIGCHILD handler for rccexternal. So if a library forks and exec's another process it hangs forever. If I send a TERM signal to the rccexternal process easytag starts.
I removed the signal handlers in commit b698dad4c31ffc702121cc06200ff1a0e1e89864 on master. In the two following commits I switched the two uses of fork() in EasyTAG to instead use g_spawn_async() and g_child_add_watch() followed by g_child_watch_add() and g_spawn_close_pid().