GNOME Bugzilla – Bug 793481
gstreamer deadlocks when starting and quickly stopping playback
Last modified: 2018-02-16 14:36:58 UTC
The summary is a bit of a guess, don't get angry if i'm wrong ;) Long-ish story. KNotification uses phonon_gstreamer to play notification sounds. In Okular I have an autotest that triggers messageboxes (that trigger a sound) that then i programatically cancel. This autotest used to work fine but now that i've updated to a newer gstreamer i get what looks like a deadlock. If i wait for the sound to be played (i.e. i delay the programatic cancel 3 seconds) it all works fine. I don't think it's phonon-gstreamer fault since its code hasn't been changed in like years (though it may be a hidden problem that has now surfaced). This is the backtrace i get https://paste.kde.org/pjughgaap It seems to my totally uneducated eye that thread 1 and thread 52 deadlocked. If there's any interest i can try: a) get a debug gstreamer to get line numbers in that backtrace b) try to produce something easier to reproduce than "compile okular and run this autotest"
Thanks for the bug report. Please could you get a stack trace with full debugging symbols on the GStreamer/GLib side? What version of GStreamer is this with? (gst-inspect-1.0 --version) If you have a small test program that'd be fantastic of course. We have fixed quite a few playbin/decodebin related deadlocks like this recently for what it's worth, so it might already be fixed in the upcoming 1.13/1.14 release (git master).
Ok, so here is the one with debug symbols https://paste.kde.org/p79mzdlts This is built from _commit=505a24ff6843a04e4f75c5e03caa7b2774806fc3 that as far as i understand is 1.12.4 (gst-inspect-1.0 --version reports the same). I'll see if master fixes it in a minute
Hmmm, i may have speaked too soon for "check if master fixes it in a minute", the trick i did with the other build of setting the LD_LIBRARY_PATH to point to the new place doesn't seem to be working. It complains about gst-plugin-scanner not being found. Do you have any documentation on "how to build gstreamer trunk without breaking your system?" :D Also would i need to recompile all the plugins too?
Ok, so i rebuild 1.13.1 properly now and it seems the deadlock is gone (or at least i can't reproduce it 100% of the times like before). So i guess we can close the bug unless there's any hope to get those deadlock fixes to get backported to 1.12.x. But seeing "It is scheduled for release in late February / early March 2018." in https://gstreamer.freedesktop.org/releases/1.14/ makes me happy enough i guess :)
Thanks a lot for testing master! I know it's a bit of a pain to set up. For what it's worth, there's a "gst-uninstalled" setup for autotools, and gst-build for Meson (with uninstalled target) to help with that. I think some fixes have been backported to 1.12, but possibly not all. There are plans for a 1.12.5 release, but don't ask me when. Let's close it then, and please re-open if there are still issues with 1.14 once it's out, thanks!
Also, note that we have backport some fixes for similar issue. But we'll need a 1.12.5 release to fix this. That regression came in 1.12.3.