[gstreamer-bugs] [Bug 353725] New: deadlock linking tee and adder

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Thu Aug 31 12:40:02 PDT 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=353725
 GStreamer | gstreamer (core) | Ver: HEAD CVS

           Summary: deadlock linking tee and adder
           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: alessandro at nnva.org
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Someone on IRC was experimenting with linking together elements having multiple
pads with gst-launch syntax and tried something like: gst-launch audiotestsrc !
tee name=t adder name=a ! fakesink t. ! queue ! a. t. ! queue ! a.
This pipeline deadlocks linking the pads.
I've written a small python script to reproduce the bug.
The script deadlocks calling gst_pad_link on tee:src1 and adder:sink1 because
gst_pad_link_prepare locks the pads, then tries to get src1's caps, this causes
gst_pad_proxy_getcaps to be called, which in turns calls gst_pad_peer_get_caps
on src0, which causes gst_pad_proxy_getcaps to be called again, this calls
gst_pad_peer_get_caps on sink1, but sink1 is locked in gst_pad_link_prepare.
... I know, i know, a backtrace is worth a thousand words :)

(gdb) r
Starting program: /usr/bin/python padproxy_deadlock.py
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 805436224 (LWP 7008)]
Program received signal SIGINT, Interrupt.
[Switching to Thread 805436224 (LWP 7008)]
0x0ffd7e58 in __lll_lock_wait () from /lib/libpthread.so.0
(gdb) Quit
(gdb) info threads
* 1 Thread 805436224 (LWP 7008)  0x0ffd7e58 in __lll_lock_wait ()
   from /lib/libpthread.so.0
(gdb) bt
#0  0x0ffd7e58 in __lll_lock_wait () from /lib/libpthread.so.0
#1  0x0ffd2548 in pthread_mutex_lock () from /lib/libpthread.so.0
#2  0x0f9bbccc in gst_pad_peer_get_caps (pad=0x10260d58) at gstpad.c:2008
#3  0x0f9ed1c8 in intersect_caps_func (pad=0x10260d58, ret=0x7f8badf8, 
    orig=0x10260bd8) at gstutils.c:2394
#4  0x0f9b11b4 in gst_iterator_fold (it=0x1026e8e0, 
    func=0xf9ed180 <intersect_caps_func>, ret=0x7f8badf8, user_data=0x10260bd8)
    at gstiterator.c:503
#5  0x0f9ed4b0 in gst_pad_proxy_getcaps (pad=0x10260bd8) at gstutils.c:2442
#6  0x0f9bb5c8 in gst_pad_get_caps_unlocked (pad=0x10260bd8) at gstpad.c:1896
#7  0x0f9bbb78 in gst_pad_get_caps (pad=0x10260bd8) at gstpad.c:1984
#8  0x0f9bbd60 in gst_pad_peer_get_caps (pad=0x10260b18) at gstpad.c:2019
#9  0x0f9ed1c8 in intersect_caps_func (pad=0x10260b18, ret=0x7f8bafd8, 
    orig=0x10260c98) at gstutils.c:2394
#10 0x0f9b11b4 in gst_iterator_fold (it=0x1026e890, 
    func=0xf9ed180 <intersect_caps_func>, ret=0x7f8bafd8, user_data=0x10260c98)
    at gstiterator.c:503
#11 0x0f9ed4b0 in gst_pad_proxy_getcaps (pad=0x10260c98) at gstutils.c:2442
#12 0x0f9bb5c8 in gst_pad_get_caps_unlocked (pad=0x10260c98) at gstpad.c:1896
#13 0x0f9b9da8 in gst_pad_link_check_compatible_unlocked (src=0x10260c98, 
    sink=0x10260d58) at gstpad.c:1585
#14 0x0f9ba530 in gst_pad_link_prepare (srcpad=0x10260c98, sinkpad=0x10260d58)
    at gstpad.c:1713


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list