[gstreamer-bugs] [Bug 566393] New: [deadlock] Setting index on a pipeline

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sat Jan 3 01:10:53 PST 2009


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=566393

  GStreamer | gstreamer (core) | Ver: HEAD CVS
           Summary: [deadlock] Setting index on a pipeline
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: bilboed at gmail.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


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
#0  0x00007f40ecee73f4 in __lll_lock_wait () from /lib/libpthread.so.0
#1  0x00007f40ecee2c50 in _L_lock_102 () from /lib/libpthread.so.0
#2  0x00007f40ecee255e in __pthread_mutex_lock (mutex=0xe27eb0) at
pthread_mutex_lock.c:86
#3  0x00007f40e993fb02 in gst_object_get_parent (object=0xd79040) at
gstobject.c:834
#4  0x00007f40e9940031 in gst_object_get_path_string (object=0xd79040) at
gstobject.c:1080
#5  0x00007f40e995f175 in gst_index_path_resolver (index=<value optimized out>,
writer=0x80, 
    writer_string=0x7f40eceea8e0, data=0xffffffffffffffff) at gstindex.c:626
#6  0x00007f40e995ed7d in gst_index_get_writer_id (index=0xd7a070,
writer=0xd740a0, id=0xd741a8)
    at gstindex.c:695
#7  0x00007f40e8685c7b in gst_flv_demux_set_index (element=0xd740a0,
index=0xd7a070) at gstflvdemux.c:1150
#8  0x00007f40e9947107 in gst_bin_set_index_func (element=<value optimized
out>, index=0xd7a070) at gstbin.c:635
#9  0x00007f40ea486a8f in _wrap_gst_element_set_index (self=0x87db40,
args=<value optimized out>, 
    kwargs=<value optimized out>) at gst.c:4496
#10 0x00007f40ed1a40d5 in PyEval_EvalFrameEx (f=0x61cc70, throwflag=<value
optimized out>) at Python/ceval.c:3573
#11 0x00007f40ed1a4f7d in PyEval_EvalCodeEx (co=0x7f40ed5dd468, globals=<value
optimized out>, 
    locals=<value optimized out>, args=0x0, argcount=0, kws=0x0, kwcount=0,
defs=0x0, defcount=0, closure=0x0)
    at Python/ceval.c:2836
#12 0x00007f40ed1a5097 in PyEval_EvalCode (co=0xe27eb0, globals=0x80,
locals=0x7f40eceea8e0)
    at Python/ceval.c:494
#13 0x00007f40ed1bd0dc in run_mod (mod=<value optimized out>, filename=<value
optimized out>, globals=0x6254f0, 
    locals=0x6254f0, flags=<value optimized out>, arena=<value optimized out>)
at Python/pythonrun.c:1273
#14 0x00007f40ed1bd18c in PyRun_FileExFlags (fp=0x602010,
filename=0x7ffff5669279 "./index1.py", 
    start=<value optimized out>, globals=0x6254f0, locals=0x6254f0, closeit=1,
flags=0x7ffff56684b0)
    at Python/pythonrun.c:1259
#15 0x00007f40ed1be56b in PyRun_SimpleFileExFlags (fp=0x602010,
filename=0x7ffff5669279 "./index1.py", 
    closeit=1, flags=0x7ffff56684b0) at Python/pythonrun.c:879
#16 0x00007f40ed1c6c62 in Py_Main (argc=2, argv=0x7ffff56685c8) at
Modules/main.c:523
#17 0x00007f40ec519486 in __libc_start_main (main=0x400828 <main>, argc=3,
ubp_av=0x7ffff56685c8, 
    init=0x400840 <__libc_csu_init>, fini=<value optimized out>,
rtld_fini=<value optimized out>, 
    stack_end=0x7ffff56685b8) at libc-start.c:226
#18 0x0000000000400789 in _start ()
Current language:  auto; currently asm


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"


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=566393.




More information about the Gstreamer-bugs mailing list