After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728761 - glimagesink: Deadlock on errors
glimagesink: Deadlock on errors
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal blocker
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-22 22:27 UTC by Nicolas Dufresne (ndufresne)
Modified: 2014-04-23 13:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Backtrace of the deadlock (6.52 KB, text/plain)
2014-04-22 22:29 UTC, Nicolas Dufresne (ndufresne)
Details

Description Nicolas Dufresne (ndufresne) 2014-04-22 22:27:00 UTC
Basically all the time, when something fails early, the element deadlocks. One way to reproduce (all the time for me):

GST_GL_API=opengl3 gst-launch-1.0 videotestsrc ! glimagesink
Comment 1 Nicolas Dufresne (ndufresne) 2014-04-22 22:29:08 UTC
Created attachment 274914 [details]
Backtrace of the deadlock

Notice the unbalanced locks in gst_gl_context_create_thread() and the commented using // unlock that would balance it.
Comment 2 Sebastian Dröge (slomo) 2014-04-23 07:54:39 UTC
It is not unbalanced, but unlocks the mutex from the send_message() below the commented out line. This change was done as part of

commit db1c7a242b2d751be76199524078d99421159ee2
Author: Matthew Waters <ystreet00@gmail.com>
Date:   Wed Sep 25 12:26:57 2013 +1000

    [818/906] window: add send_message_async vmethod
    
    - provide a default synchronous send_message
    - make context creation threadsafe again
Comment 3 Sebastian Dröge (slomo) 2014-04-23 07:55:38 UTC
In your case it should've never ever get to the point where glimagesink sends messages to the window though... as there was an error before already it should've shut down immediately.
Comment 4 Sebastian Dröge (slomo) 2014-04-23 08:01:59 UTC
commit 38ebfb2da874fa601c22cbc83a1cffc357f45276
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Wed Apr 23 10:00:48 2014 +0200

    glimagesink: If creating a context or upload failed, destroy it
    
    Fixes deadlocks in error cases when later code assumes the broken
    context is actually usable.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728761
Comment 5 Nicolas Dufresne (ndufresne) 2014-04-23 13:49:18 UTC
Thanks, I confirm it works for me too.