GNOME Bugzilla – Bug 566393
[deadlock] Setting index on a pipeline
Last modified: 2009-01-05 10:14:41 UTC
When setting a GstIndex on a pipeline containing index-aware elements, a deadlock happens. A simplified backtrace is the following (with flvdemux): * gst_bin_set_index_func * acquires the OBJECT_LOCK to iterate children * calls set_index on child * flv_demux_set_index asks for a writer id * gstindex uses gst_object_get_path_string to calculate unique id * gst_object_get_path tries to get the parent of flvdemux ==> DEADLOCK, the parent object lock was already acquired in gst_bin_set_index_func Full backtrace: (gdb) bt
+ Trace 211246
Simple python script to trigger the above: p = gst.parse_launch("filesrc ! flvdemux ! fakesink") i = gst.index_factory_make("memindex") print "Before setting index" p.set_index(i) print "After setting index"
* gst/gstbin.c: (gst_bin_set_index_func), (gst_bin_set_clock_func), (gst_bin_change_state_func): Use an iterator to set the clock and the index so that we can release the object lock appropriately. Fixes #566393.