[gstreamer-bugs] [Bug 579416] New: Nasty gst-python deadlock

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sat Apr 18 07:35:30 PDT 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=579416

  GStreamer | gst-python | Ver: git
           Summary: Nasty gst-python deadlock
           Product: GStreamer
           Version: git
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-python
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: thaytan at mad.scientist.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Just encountered this nasty deadlock with gst-python and Thomas' jukebox code.
It looks like one thread is calling gst_object_get_parent (holding the object
lock), which triggers a toggle_refs_notify into Python code. In another thread,
Python is trying to call gst_object_get_name() on the same object, while
holding the Python lock.

Patch coming...

Thread 2 (Thread 0xb7c92b70 (LWP 16763)):
#0  0x00549424 in __kernel_vsyscall ()
#1  0x00bd02e5 in sem_wait@@GLIBC_2.1 ()
    at ../nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S:80
#2  0x0397e668 in PyThread_acquire_lock (lock=0x9487550, waitflag=1)
    at Python/thread_pthread.h:349
#3  0x03957008 in PyEval_RestoreThread (tstate=0xb7103a38)
    at Python/ceval.c:334
#4  0x039715c3 in PyGILState_Ensure () at Python/pystate.c:592
#5  0x0078ab69 in pyglib_gil_state_ensure () from /usr/lib/libpyglib-2.0.so.0
#6  0x0064961f in ?? ()
   from /usr/lib/python2.6/site-packages/gtk-2.0/gobject/_gobject.so
#7  0x00d0d36b in toggle_refs_notify (object=<value optimized out>, 
    is_last_ref=0) at gobject.c:2192
#8  0x00d0d6e7 in IA__g_object_ref (_object=0x94ca038) at gobject.c:2351
#9  0x0038662d in gst_object_ref (object=0x94ca038) at gstobject.c:299
#10 0x00386d42 in gst_object_get_parent (object=0x94cd068) at gstobject.c:805
#11 0x00388220 in gst_object_dispatch_properties_changed (object=0x9507488, 
    n_pspecs=1, pspecs=0xb7c91870) at gstobject.c:499
#12 0x00d0c0df in g_object_notify_dispatcher (object=0x9507488, n_pspecs=1, 
    pspecs=0xb7c91870) at gobject.c:312
#13 0x00d111f3 in g_object_notify_queue_thaw (nqueue=<value optimized out>, 
    object=<value optimized out>) at gobjectnotifyqueue.c:125
#14 IA__g_object_notify (nqueue=<value optimized out>, 
    object=<value optimized out>) at gobject.c:857
#15 0x003b823b in gst_pad_set_caps (pad=0x9507488, caps=0x932aba0)
    at gstpad.c:2519
#16 0x003b8d64 in gst_pad_configure_sink (pad=0x9507488, caps=0x932aba0)
    at gstpad.c:2560
#17 0x003b8faa in gst_pad_chain_unchecked (pad=0x9507488, 
    buffer=<value optimized out>) at gstpad.c:3962
#18 0x003ba1fa in gst_pad_push (pad=0x94d5700, buffer=0x94de668)
    at gstpad.c:4144
#19 0x00f0984d in gst_mp3parse_emit_frame (mp3parse=0x95065f0, size=417, 
    mode=1, crc=0) at gstmpegaudioparse.c:835
#20 0x00f0b820 in gst_mp3parse_chain (pad=0x94d5640, buf=0x9516948)
    at gstmpegaudioparse.c:1349
#21 0x003b8ecb in gst_pad_chain_unchecked (pad=0x94d5640, 
    buffer=<value optimized out>) at gstpad.c:3977
#22 0x003ba1fa in gst_pad_push (pad=0x94d5580, buffer=0x9516948)
    at gstpad.c:4144
#23 0x0024f1c7 in gst_tag_demux_chain (pad=0x94d54c0, buf=0x9516948)
    at gsttagdemux.c:692
#24 0x003b8ecb in gst_pad_chain_unchecked (pad=0x94d54c0, 
    buffer=<value optimized out>) at gstpad.c:3977
#25 0x003ba1fa in gst_pad_push (pad=0x94d5400, buffer=0x9516948)
    at gstpad.c:4144
#26 0x00deacf7 in gst_type_find_element_chain (pad=0x94d5340, buffer=0x9516948)
    at gsttypefindelement.c:688
#27 0x003b8ecb in gst_pad_chain_unchecked (pad=0x94d5340, 
    buffer=<value optimized out>) at gstpad.c:3977
---Type <return> to continue, or q <return> to quit---
#28 0x003ba1fa in gst_pad_push (pad=0x94e5038, buffer=0x9516948)
    at gstpad.c:4144
#29 0x003a994d in gst_proxy_pad_do_chain (pad=0x94e4800, buffer=0x9516948)
    at gstghostpad.c:193
#30 0x003b8ecb in gst_pad_chain_unchecked (pad=0x94e4800, 
    buffer=<value optimized out>) at gstpad.c:3977
#31 0x003ba1fa in gst_pad_push (pad=0x94d5280, buffer=0x9516948)
    at gstpad.c:4144
#32 0x001f7236 in gst_base_src_loop (pad=0x94d5280) at gstbasesrc.c:2279
#33 0x003dd9fd in gst_task_func (task=0x94f1ae8, tclass=0x9219448)
    at gsttask.c:172
#34 0x00c822cf in g_thread_pool_thread_proxy (data=0x92194d8)
    at gthreadpool.c:265
#35 0x00c80c7f in g_thread_create_proxy (data=0x9328fd8) at gthread.c:635
#36 0x00bc9965 in start_thread (arg=0xb7c92b70) at pthread_create.c:297
#37 0x00afdfee in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb80836c0 (LWP 16761)):
#0  0x00549424 in __kernel_vsyscall ()
#1  0x00bd0bd9 in __lll_lock_wait ()
    at ../nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S:142
#2  0x00bcbf1b in _L_lock_752 () from /lib/libpthread.so.0
#3  0x00bcbd31 in __pthread_mutex_lock (mutex=0x93363b0)
    at pthread_mutex_lock.c:61
#4  0x003872b3 in gst_object_get_name (object=0x94cd068) at gstobject.c:670
#5  0x001b9ad2 in ?? ()
   from /usr/lib/python2.6/site-packages/gst-0.10/gst/_gst.so
#6  0x038fb8d5 in PyObject_Repr (v=0xb8043d28) at Objects/object.c:366
#7  0x0390bc10 in PyString_Format (format=0xb8025d40, args=0x944512c)
    at Objects/stringobject.c:4851
#8  0x0390cdbf in string_mod (v=0xfffffe00, w=0x944512c)
    at Objects/stringobject.c:4116
#9  0x038b8fa3 in binary_op1 (v=0xb8025d40, w=0x944512c, op_slot=16)
    at Objects/abstract.c:914
#10 0x038b9afb in binary_op (v=0xb8025d40, w=0x93363b0, op_slot=16, 
    op_name=0x3999062 "%") at Objects/abstract.c:966
#11 0x03951a56 in PyEval_EvalFrameEx (f=0x9197e1c, throwflag=0)
    at Python/ceval.c:1152
#12 0x03955fa1 in fast_function (nk=<value optimized out>, 
    na=<value optimized out>, n=<value optimized out>, 
    pp_stack=<value optimized out>, func=<value optimized out>)
    at Python/ceval.c:3765
#13 call_function (nk=<value optimized out>, na=<value optimized out>, 
    n=<value optimized out>, pp_stack=<value optimized out>, 
    func=<value optimized out>) at Python/ceval.c:3700
#14 PyEval_EvalFrameEx (nk=<value optimized out>, na=<value optimized out>, 
    n=<value optimized out>, pp_stack=<value optimized out>, 
    func=<value optimized out>) at Python/ceval.c:2370
#15 0x03956e21 in PyEval_EvalCodeEx (co=0xb8070458, globals=0xb806702c, 
    locals=0xb806702c, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, 
    defcount=0, closure=0x0) at Python/ceval.c:2942
#16 0x03956f83 in PyEval_EvalCode (co=0xb8070458, globals=0xb806702c,


-- 
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=579416.




More information about the Gstreamer-bugs mailing list