[Bug 655268] New: decodebin2: deadlock after multi-stream chains change

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Jul 25 07:54:05 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=655268
  GStreamer | gst-plugins-base | git

           Summary: decodebin2: deadlock after multi-stream chains change
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: philipj at opera.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


This commit introduced a deadlock:

commit c91928f7a2461aba57f64e014f507bcb62d7adc6
Author: Edward Hervey <edward.hervey at collabora.co.uk>
Date:   Mon Jul 25 10:41:04 2011 +0200

    decodebin2: Properly handle multi-stream chains

    When we have a multi-stream (i.e. audio and video) input and the demuxer
    adds/removes pads for a new stream (common in a mpeg-ts stream when the
    program stream mapping is updated), the algorithm for EOS handling was
    previously wrong (it would only drop the EOS of the *last* pad but would
    let the EOS on the other pads go through).

    The logic has only been changed a tiny bit for EOS handling resulting in:
    * If there is no next group, let the EOS go through
    * If there is a next group, but not all pads are drained in the active
      group, drop the EOS event
    * If there is a next group and all pads are drained, then the ghostpads
      will be removed and the EOS event will be dropped automatically.

All I need to reproduce the deadlock is this <video> test case:

<video src="svt2-44100Hz.ogv" controls></video>
<script>
var v = document.querySelector('video');
v.onsuspend = function() {
  v.currentTime = v.duration;
};
v.preload = "auto";
</script>

What this does is to simply seek to the end of the file once it is has stopped
loading. Seeking to somewhere other than the end does not reproduce the issue.
You need an Ogg file with both audio and video to reproduce and it helps if
it's fairly small. It will deadlock when leaving the page, as Opera is stuck in
a gst_element_get_state call that never returns. Full backtrace:

Thread 8 (Thread 0x7fffdeb21700 (LWP 29174)):
#0  0x00007ffff6aaebac in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffec61c699 in gst_queue_loop (pad=0x5122df0) at gstqueue.c:1251
#2  0x00007fffee1914f3 in gst_task_func (task=0x413bd70) at gsttask.c:318
#3  0x00007fffee192646 in default_func (tdata=0x413adc0, pool=0x5aaa000) at
gsttaskpool.c:70
#4  0x00007fffeed0db16 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fffeed0b3e4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007ffff6aa9d8c in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007ffff606604d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7fffe3373700 (LWP 29173)):
#0  0x00007ffff6058f03 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff3d1732f in ?? () from /usr/lib/libpulse.so.0
#2  0x00007ffff3d09116 in pa_mainloop_poll () from /usr/lib/libpulse.so.0
#3  0x00007ffff3d09749 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#4  0x00007ffff3d09800 in pa_mainloop_run () from /usr/lib/libpulse.so.0
#5  0x00007ffff3d172df in ?? () from /usr/lib/libpulse.so.0
#6  0x00007ffff308da88 in ?? () from /usr/lib/libpulsecommon-0.9.22.so
#7  0x00007ffff6aa9d8c in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007ffff606604d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7fffe89ef700 (LWP 29172)):
#0  0x00007ffff6aaebac in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffed73e4d6 in gst_base_sink_wait_preroll (sink=0x7fffe4087800) at
gstbasesink.c:2270
#2  0x00007fffed73e828 in gst_base_sink_do_preroll (sink=0x7fffe4087800,
obj=0x4170140) at gstbasesink.c:2347
#3  0x00007fffed73f05a in gst_base_sink_do_sync (basesink=0x7fffe4087800,
pad=0x5309980, obj=0x4170140, late=0x7fffe89ee868, step_end=0x7fffe89ee864,
obj_type=8 '\b') at gstbasesink.c:2533
#4  0x00007fffed741ea1 in gst_base_sink_render_object (basesink=0x7fffe4087800,
pad=0x5309980, obj_type=8 '\b', obj=0x4170140) at gstbasesink.c:2978
#5  0x00007fffed7433f8 in gst_base_sink_queue_object_unlocked
(basesink=0x7fffe4087800, pad=0x5309980, obj_type=8 '\b', obj=0x4170140,
prerollable=1) at gstbasesink.c:3295
#6  0x00007fffed743a46 in gst_base_sink_event (pad=0x5309980, event=0x4170140)
at gstbasesink.c:3458
#7  0x00007fffee1628e1 in gst_pad_send_event (pad=0x5309980, event=0x4170140)
at gstpad.c:5399
#8  0x00007fffee16221a in gst_pad_push_event (pad=0x5309c80, event=0x4170140)
at gstpad.c:5251
#9  0x00007fffed758c23 in gst_base_transform_sink_event (pad=0x5309b00,
event=0x4170140) at gstbasetransform.c:2037
#10 0x00007fffee1628e1 in gst_pad_send_event (pad=0x5309b00, event=0x4170140)
at gstpad.c:5399
#11 0x00007fffee16221a in gst_pad_push_event (pad=0x5122070, event=0x4170140)
at gstpad.c:5251
#12 0x00007fffec61c257 in gst_queue_push_one (queue=0x530cae0) at
gstqueue.c:1204
#13 0x00007fffec61cb28 in gst_queue_loop (pad=0x5122070) at gstqueue.c:1263
#14 0x00007fffee1914f3 in gst_task_func (task=0x413bc70) at gsttask.c:318
#15 0x00007fffee192646 in default_func (tdata=0x7fffe400e730, pool=0x5aaa000)
at gsttaskpool.c:70
#16 0x00007fffeed0db16 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007fffeed0b3e4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007ffff6aa9d8c in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#19 0x00007ffff606604d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#20 0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7fffe96b6700 (LWP 29171)):
#0  0x00007ffff6aaebac in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffed76a58b in gst_data_queue_pop (queue=0x53b8180,
item=0x7fffe96b5cb8) at gstdataqueue.c:501
#2  0x00007fffec6146a9 in gst_multi_queue_loop (pad=0x5309500) at
gstmultiqueue.c:1196
#3  0x00007fffee1914f3 in gst_task_func (task=0x413b770) at gsttask.c:318
#4  0x00007fffee192646 in default_func (tdata=0x413ad00, pool=0x5aaa000) at
gsttaskpool.c:70
#5  0x00007fffeed0db16 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007fffeed0b3e4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ffff6aa9d8c in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007ffff606604d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7fffea576700 (LWP 29170)):
#0  0x00007ffff6aaebac in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffed76a58b in gst_data_queue_pop (queue=0x53b8080,
item=0x7fffea575cb8) at gstdataqueue.c:501
#2  0x00007fffec6146a9 in gst_multi_queue_loop (pad=0x412bda0) at
gstmultiqueue.c:1196
#3  0x00007fffee1914f3 in gst_task_func (task=0x413b670) at gsttask.c:318
#4  0x00007fffee192646 in default_func (tdata=0x413ac40, pool=0x5aaa000) at
gsttaskpool.c:70
#5  0x00007fffeed0db16 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007fffeed0b3e4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ffff6aa9d8c in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007ffff606604d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fffeadc7700 (LWP 29169)):
#0  0x00007ffff6aaebac in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffee191440 in gst_task_func (task=0x413b070) at gsttask.c:303
#2  0x00007fffee192646 in default_func (tdata=0x44e02b0, pool=0x5aaa000) at
gsttaskpool.c:70
#3  0x00007fffeed0db16 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fffeed0b3e4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff6aa9d8c in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007ffff606604d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fffec3e7700 (LWP 29168)):
#0  0x00007ffff6aaebac in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffee3ff3ab in ?? () from
/usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0
#2  0x00007fffee13911f in gst_element_get_state_func (element=0x44db060,
state=0x0, pending=0x0, timeout=18446744073709551615) at gstelement.c:2158
#3  0x00007fffee11c9b1 in gst_bin_get_state_func (element=0x44db060, state=0x0,
pending=0x0, timeout=18446744073709551615) at gstbin.c:1785
#4  0x00007fffee139507 in gst_element_get_state (element=0x44db060, state=0x0,
pending=0x0, timeout=18446744073709551615) at gstelement.c:2262
#5  0x000000000276e238 in GstMediaPlayer::ThreadFunc (data=0x44d8670) at
../platforms/media_backends/gst/gstmediaplayer.cpp:421
#6  0x00007fffeed0b3e4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ffff6aa9d8c in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007ffff606604d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9  0x0000000000000000 in ?? ()

-- 
Configure bugmail: https://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