GNOME Bugzilla – Bug 608179
caps filter appearing after adder results in deadlock
Last modified: 2010-01-28 16:54:14 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.
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 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 ;-)
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