After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 353725 - deadlock linking tee and adder
deadlock linking tee and adder
Status: RESOLVED DUPLICATE of bug 316248
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-31 19:39 UTC by Alessandro Decina
Modified: 2006-09-01 10:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Script to reproduce the bug (1.03 KB, text/x-python)
2006-08-31 19:40 UTC, Alessandro Decina
Details

Description Alessandro Decina 2006-08-31 19:39:27 UTC
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.

Thread 805436224 (LWP 7008)

  • #0 __lll_lock_wait
    from /lib/libpthread.so.0
  • #1 pthread_mutex_lock
    from /lib/libpthread.so.0
  • #2 gst_pad_peer_get_caps
    at gstpad.c line 2008
  • #3 intersect_caps_func
    at gstutils.c line 2394
  • #4 gst_iterator_fold
    at gstiterator.c line 503
  • #5 gst_pad_proxy_getcaps
    at gstutils.c line 2442
  • #6 gst_pad_get_caps_unlocked
    at gstpad.c line 1896
  • #7 gst_pad_get_caps
    at gstpad.c line 1984
  • #8 gst_pad_peer_get_caps
    at gstpad.c line 2019
  • #9 intersect_caps_func
    at gstutils.c line 2394
  • #10 gst_iterator_fold
    at gstiterator.c line 503
  • #11 gst_pad_proxy_getcaps
    at gstutils.c line 2442
  • #12 gst_pad_get_caps_unlocked
    at gstpad.c line 1896
  • #13 gst_pad_link_check_compatible_unlocked
    at gstpad.c line 1585
  • #14 gst_pad_link_prepare
    at gstpad.c line 1713

Comment 1 Alessandro Decina 2006-08-31 19:40:34 UTC
Created attachment 71979 [details]
Script to reproduce the bug
Comment 2 Wim Taymans 2006-09-01 10:17:45 UTC

*** This bug has been marked as a duplicate of 316248 ***