[Bug 652562] New: basesink: stuck in GST_PAD_PREROLL_WAIT

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Jun 14 06:30:58 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=652562
  GStreamer | gstreamer (core) | git

           Summary: basesink: stuck in GST_PAD_PREROLL_WAIT
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: philipj at opera.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


This is a bug that I'm seeing with Opera's GStreamer integration on certain
test cases, and it appears like it might be a GStreamer bug. The test case
loads two <audio> elements with a very short (2 samples of silence) WAVE file,
which I'll attach.

The pipeline constructed is like this:

$ gst-launch-0.10 filesrc location=2samples.wav ! wavparse ! queue !
audioconvert ! audioresample ! volume ! autoaudiosink

At random, one such pipeline will fail to preroll, getting stuck in
gst_base_sink_wait_preroll. The full backtrace at that point is:

(gdb) thread apply all bt

Thread 911 (Thread 0x7fffe3338700 (LWP 3875)):
#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 910 (Thread 0x7fffdd409700 (LWP 3874)):
#0  0x00007ffff6aaebac in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffee43f3ab in ?? () from
/usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0
#2  0x00007fffee166651 in gst_bus_timed_pop_filtered (bus=0x7fffe403c610,
timeout=18446744073709551615, types=GST_MESSAGE_ANY) at gstbus.c:534
#3  0x00007fffee1667e3 in gst_bus_timed_pop (bus=0x7fffe403c610,
timeout=18446744073709551615) at gstbus.c:575
#4  0x000000000266bb1a in GstMediaPlayer::ThreadFunc (data=0x7fffcc1d00c0) at
../platforms/media_backends/gst/gstmediaplayer.cpp:269
#5  0x00007fffeedbb3e4 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 909 (Thread 0x7fffe05ef700 (LWP 3873)):
#0  0x00007ffff6aaebac in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffee43f3ab in ?? () from
/usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0
#2  0x00007fffee166651 in gst_bus_timed_pop_filtered (bus=0x3e15600,
timeout=18446744073709551615, types=GST_MESSAGE_ANY) at gstbus.c:534
#3  0x00007fffee1667e3 in gst_bus_timed_pop (bus=0x3e15600,
timeout=18446744073709551615) at gstbus.c:575
#4  0x000000000266bb1a in GstMediaPlayer::ThreadFunc (data=0x7fffcc9132f0) at
../platforms/media_backends/gst/gstmediaplayer.cpp:269
#5  0x00007fffeedbb3e4 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 892 (Thread 0x7fffdecfc700 (LWP 3856)):
#0  0x00007ffff6aaebac in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffee1d1440 in gst_task_func (task=0x3ddbd00) at gsttask.c:303
#2  0x00007fffee1d2646 in default_func (tdata=0x441af60, pool=0x3bb7000) at
gsttaskpool.c:70
#3  0x00007fffeedbdb16 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fffeedbb3e4 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 884 (Thread 0x7fffe2ae7700 (LWP 3848)):
#0  0x00007ffff6aaebac in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffee1d1440 in gst_task_func (task=0x7fffd88aa210) at gsttask.c:303
#2  0x00007fffee1d2646 in default_func (tdata=0x4671090, pool=0x3bb7000) at
gsttaskpool.c:70
#3  0x00007fffeedbdb16 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fffeedbb3e4 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 881 (Thread 0x7fffdfd9e700 (LWP 3845)):
#0  0x00007ffff6aaebac in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffee1d1440 in gst_task_func (task=0x7fffd88aa010) at gsttask.c:303
#2  0x00007fffee1d2646 in default_func (tdata=0x7fffd80c6a00, pool=0x3bb7000)
at gsttaskpool.c:70
#3  0x00007fffeedbdb16 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fffeedbb3e4 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 880 (Thread 0x7fffde4ab700 (LWP 3844)):
#0  0x00007ffff6aaebac in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffed77e48a in gst_base_sink_wait_preroll (sink=0x44935b0) at
gstbasesink.c:2268
#2  0x00007fffed77e7dc in gst_base_sink_do_preroll (sink=0x44935b0,
obj=0x7fffe45fb990) at gstbasesink.c:2345
#3  0x00007fffed77f00e in gst_base_sink_do_sync (basesink=0x44935b0,
pad=0x3e03da0, obj=0x7fffe45fb990, late=0x7fffde4aa4c8,
step_end=0x7fffde4aa4c4, obj_type=8 '\b') at gstbasesink.c:2531
#4  0x00007fffed781e55 in gst_base_sink_render_object (basesink=0x44935b0,
pad=0x3e03da0, obj_type=8 '\b', obj=0x7fffe45fb990) at gstbasesink.c:2976
#5  0x00007fffed7833ac in gst_base_sink_queue_object_unlocked
(basesink=0x44935b0, pad=0x3e03da0, obj_type=8 '\b', obj=0x7fffe45fb990,
prerollable=1) at gstbasesink.c:3293
#6  0x00007fffed7839fa in gst_base_sink_event (pad=0x3e03da0,
event=0x7fffe45fb990) at gstbasesink.c:3456
#7  0x00007fffee1a28e1 in gst_pad_send_event (pad=0x3e03da0,
event=0x7fffe45fb990) at gstpad.c:5399
#8  0x00007fffee1a221a in gst_pad_push_event (pad=0x7fffcc311a30,
event=0x7fffe45fb990) at gstpad.c:5251
#9  0x00007fffee1821a4 in gst_proxy_pad_event_default (pad=0x7fffe4cedc40,
event=0x7fffe45fb990) at gstghostpad.c:143
#10 0x00007fffee1a28e1 in gst_pad_send_event (pad=0x7fffe4cedc40,
event=0x7fffe45fb990) at gstpad.c:5399
#11 0x00007fffee1a221a in gst_pad_push_event (pad=0x3dc2940,
event=0x7fffe45fb990) at gstpad.c:5251
#12 0x00007fffed798aab in gst_base_transform_sink_event (pad=0x3dc2ac0,
event=0x7fffe45fb990) at gstbasetransform.c:2037
#13 0x00007fffee1a28e1 in gst_pad_send_event (pad=0x3dc2ac0,
event=0x7fffe45fb990) at gstpad.c:5399
#14 0x00007fffee1a221a in gst_pad_push_event (pad=0x7fffe4a60a80,
event=0x7fffe45fb990) at gstpad.c:5251
#15 0x00007fffed798aab in gst_base_transform_sink_event (pad=0x7fffe4a60480,
event=0x7fffe45fb990) at gstbasetransform.c:2037
#16 0x00007fffee1a28e1 in gst_pad_send_event (pad=0x7fffe4a60480,
event=0x7fffe45fb990) at gstpad.c:5399
#17 0x00007fffee1a221a in gst_pad_push_event (pad=0x3e031a0,
event=0x7fffe45fb990) at gstpad.c:5251
#18 0x00007fffed798aab in gst_base_transform_sink_event (pad=0x5098530,
event=0x7fffe45fb990) at gstbasetransform.c:2037
#19 0x00007fffee1a28e1 in gst_pad_send_event (pad=0x5098530,
event=0x7fffe45fb990) at gstpad.c:5399
#20 0x00007fffee1a221a in gst_pad_push_event (pad=0x3dc24c0,
event=0x7fffe45fb990) at gstpad.c:5251
#21 0x00007fffec65c257 in gst_queue_push_one (queue=0x50cf9b0) at
gstqueue.c:1204
#22 0x00007fffec65cb28 in gst_queue_loop (pad=0x3dc24c0) at gstqueue.c:1263
#23 0x00007fffee1d14f3 in gst_task_func (task=0x7fffd88aa410) at gsttask.c:318
#24 0x00007fffee1d2646 in default_func (tdata=0x4671330, pool=0x3bb7000) at
gsttaskpool.c:70
#25 0x00007fffeedbdb16 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007fffeedbb3e4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007ffff6aa9d8c in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#28 0x00007ffff606604d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#29 0x0000000000000000 in ?? ()

As you can see there are two pipelines here, of which 1 is waiting for preroll.
GstMediaPlayer::ThreadFunc (part of our integration) is not doing anything
interesting at this point, only waiting for messages from GStreamer.

In thread 880, the event being processed is a GST_EVENT_EOS.

I have a few main suspects:

1. The WAVE file is exceptionally short, so it seems likely that there is
somewhere a race condition triggered by the EOS event being fired much earlier
than it usually is. I haven't looked in wavparse, but that might be a good
place to look around.

2. We normally post a seek to position 0 immediately after reaching
GST_STATE_PAUSED. This is because we sometimes want to seek to some non-zero
offset and just haven't special-cased the typical case to avoid the seek. Doing
this seek triggers the GST_PAD_PREROLL_SIGNAL in
gst_base_sink_preroll_queue_flush. I presume this is rather atypical use of the
API, and that there may be race conditions hidden here.

3. pulsesink itself is failing randomly due to something with PulseAudio. I
have no particular reason to suspect this, the pulsesink has been less than
reliable in the past.

-- 
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