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 608179 - caps filter appearing after adder results in deadlock
caps filter appearing after adder results in deadlock
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.25
Other Linux
: Normal blocker
: 0.10.26
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-26 18:06 UTC by rob
Modified: 2010-01-28 16:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
adder: don't hold object lock when calling peer elements (2.30 KB, patch)
2010-01-28 16:21 UTC, Wim Taymans
committed Details | Review

Description rob 2010-01-26 18:06:28 UTC
Executing the following pipeline with gst-launch results in a deadlock about one in five times on my system.  Placing the caps filter after audioresample avoids this problem.  

In one thread (the ui thread), update_degree is locking the capsfilter and then the adder.  In another thread (gst_capsfilter_transform_caps near the top of the call stack), gst_adder_sink_get_caps locks the adder and then tries to lock the caps filter in gst_capsfilter_transform_caps.

gst-launch adder name=mix ! capsfilter caps=audio/x-raw-int,rate=48000,channels=2,width=16,depth=16 ! gconfaudiosink \
 filesrc location=junk.wav ! wavparse ! audioconvert ! audioresample ! mix. \
 filesrc location=junk.wav ! wavparse ! audioconvert ! audioresample ! mix. \
 filesrc location=junk.wav ! wavparse ! audioconvert ! audioresample ! mix. \
 filesrc location=junk.wav ! wavparse ! audioconvert ! audioresample ! mix. \
 filesrc location=junk.wav ! wavparse ! audioconvert ! audioresample ! mix. \
 filesrc location=junk.wav ! wavparse ! audioconvert ! audioresample ! mix. \
 filesrc location=junk.wav ! wavparse ! audioconvert ! audioresample ! mix. \
 filesrc location=junk.wav ! wavparse ! audioconvert ! audioresample ! mix. \
 filesrc location=junk.wav ! wavparse ! audioconvert ! audioresample ! mix.
Comment 1 Wim Taymans 2010-01-28 16:21:13 UTC
Created attachment 152494 [details] [review]
adder: don't hold object lock when calling peer elements

Do not hold the object lock while we call methods on peer elements as this can
lead to deadlocks.

Fixes #608179
Comment 2 Tim-Philipp Müller 2010-01-28 16:34:01 UTC
Comment on attachment 152494 [details] [review]
adder: don't hold object lock when calling peer elements

Looks fine. (What could possibly go wrong? etc.) - not a fan of the 'filter' variable name though ;-)
Comment 3 Wim Taymans 2010-01-28 16:53:45 UTC
pushed after renaming the variable to filter_caps.

commit b44a5c8dc769b951a0d02cc55225652fdfc23402
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Thu Jan 28 17:12:34 2010 +0100

    adder: don't hold object lock when calling peer elements
    
    Do not hold the object lock while we call methods on peer elements as this can
    lead to deadlocks.
    
    Fixes #608179