[gstreamer-bugs] [Bug 330748] New: deadlock in base audio sink on playing->paused state change

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Fri Feb 10 19:45:46 PST 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=330748
 GStreamer | gst-plugins-base | Ver: HEAD CVS

           Summary: deadlock in base audio sink on playing->paused state
                    change
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: jonathan at kaolin.wh9.net
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Occasionally I experience deadlocks in rhythmbox when changing songs.  All
rhythmbox is doing is calling gst_element_set_state (playbin, GST_STATE_READY).
 This is with fairly recent (~2 days) CVS checkouts.  It doesn't seem to happen
on a different machine running core 0.10.3, -plugins-base 0.10.2.

[Switching to thread 5 (Thread -1276630096 (LWP 7241))]#0  0xffffe410 in
__kernel_vsyscall ()
(gdb) where
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7941d86 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/tls/i686/cmov/libpthread.so.0
#2  0xb47e642f in wait_segment (buf=0x906f5c8) at gstringbuffer.c:1077
#3  0xb47e68ce in gst_ring_buffer_commit (buf=0x906f5c8, sample=151704,
data=0x94a5850 "", len=1152) at gstringbuffer.c:1179
#4  0xb47e14ac in gst_base_audio_sink_render (bsink=0x823def8, buf=0x92ec8b0)
at gstbaseaudiosink.c:596
#5  0xb7b92c7b in gst_base_sink_render_object (basesink=0x823def8,
pad=0x92b0698, obj=0x92ec8b0) at gstbasesink.c:858
#6  0xb7b93ccb in gst_base_sink_queue_object_unlocked (basesink=0x823def8,
pad=0x92b0698, obj=0x92ec8b0, prerollable=1) at gstbasesink.c:1021
#7  0xb7b94469 in gst_base_sink_chain_unlocked (basesink=0x823def8,
pad=0x92b0698, buf=0x92ec8b0) at gstbasesink.c:1266
#8  0xb7b94a1e in gst_base_sink_chain (pad=0x92b0698, buf=0x92ec8b0) at
gstbasesink.c:1301
#9  0xb7aa2f2d in gst_pad_chain (pad=0x92b0698, buffer=0x92ec8b0) at
gstpad.c:3172
#10 0xb7a92e47 in gst_proxy_pad_do_chain (pad=0xfffffffc, buffer=0xfffffffc) at
gstghostpad.c:205
#11 0xb7aa2f2d in gst_pad_chain (pad=0x8d3bb78, buffer=0x92ec8b0) at
gstpad.c:3172
#12 0xb7aa365a in gst_pad_push (pad=0x8e59958, buffer=0x92ec8b0) at
gstpad.c:3271
#13 0xb7b9e645 in gst_base_transform_chain (pad=0xfffffffc, buffer=0x92ec8b0)
at gstbasetransform.c:1305
#14 0xb7aa2f2d in gst_pad_chain (pad=0x8e3a900, buffer=0x92ec8b0) at
gstpad.c:3172
#15 0xb7aa365a in gst_pad_push (pad=0x8cc8c18, buffer=0x92ec8b0) at
gstpad.c:3271
#16 0xb7b9e645 in gst_base_transform_chain (pad=0xfffffffc, buffer=0x9239e98)
at gstbasetransform.c:1305
#17 0xb7aa2f2d in gst_pad_chain (pad=0x8cedb88, buffer=0x9239e98) at
gstpad.c:3172
#18 0xb7a92e47 in gst_proxy_pad_do_chain (pad=0xfffffffc, buffer=0xfffffffc) at
gstghostpad.c:205
#19 0xb7aa2f2d in gst_pad_chain (pad=0x8ccf340, buffer=0x9239e98) at
gstpad.c:3172
#20 0xb7aa365a in gst_pad_push (pad=0x9264410, buffer=0x9239e98) at
gstpad.c:3271
#21 0xb4935feb in gst_queue_loop (pad=0x9264410) at gstqueue.c:760
#22 0xb7ab777a in gst_task_func (task=0x9067bc8, tclass=0x8e29fc8) at
gsttask.c:186
#23 0xb70f7940 in g_thread_pool_thread_proxy (data=0x838f8d0) at
gthreadpool.c:114
#24 0xb70f5a71 in g_thread_create_proxy (data=0x923aa80) at gthread.c:564
#25 0xb793fe70 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#26 0xb704cbde in clone () from /lib/tls/i686/cmov/libc.so.6

[Switching to thread 1 (Thread -1227061568 (LWP 4819))]#0  0xffffe410 in
__kernel_vsyscall ()
(gdb) where
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb794457e in __lll_mutex_lock_wait () from
/lib/tls/i686/cmov/libpthread.so.0
#2  0xb79410d0 in _L_mutex_lock_29 () from /lib/tls/i686/cmov/libpthread.so.0
#3  0xb7ba1ce3 in __PRETTY_FUNCTION__.16627 () from
/home/jonathan/sw/gstreamer-cvs//lib/libgstbase-0.10.so.0
#4  0xbfeb9ecc in ?? ()
#5  0x083abfd0 in ?? ()
#6  0x00000004 in ?? ()
#7  0x00000003 in ?? ()
#8  0xb7ba55ac in ?? () from
/home/jonathan/sw/gstreamer-cvs//lib/libgstbase-0.10.so.0
#9  0x0823def8 in ?? ()
#10 0xb7b8b1f0 in index_resolver.15692 () from
/home/jonathan/sw/gstreamer-cvs//lib/libgstreamer-0.10.so.0
#11 0xbfeb9ee8 in ?? ()
#12 0xb7b96696 in gst_base_sink_change_state (element=0x9067a88, transition=4)
at gstbasesink.c:1780
#13 0xb7b96696 in gst_base_sink_change_state (element=0x823def8,
transition=GST_STATE_CHANGE_PLAYING_TO_PAUSED) at gstbasesink.c:1780
#14 0xb47e29ca in gst_base_audio_sink_change_state (element=0x823def8,
transition=GST_STATE_CHANGE_PLAYING_TO_PAUSED) at gstbaseaudiosink.c:738
#15 0xb7a8d185 in gst_element_change_state (element=0x823def8,
transition=3079970804) at gstelement.c:2171
#16 0xb7a8d813 in gst_element_set_state_func (element=0x823def8,
state=GST_STATE_PAUSED) at gstelement.c:2133
#17 0xb7a8c3e3 in gst_element_set_state (element=0x823def8, state=4294967292)
at gstelement.c:2043
#18 0xb7a7dd66 in gst_bin_change_state_func (element=0x8d04ce8,
transition=GST_STATE_CHANGE_PLAYING_TO_PAUSED) at gstbin.c:1710
#19 0xb5b05ef6 in gst_gconf_audio_sink_change_state (element=0x8d04ce8,
transition=GST_STATE_CHANGE_PLAYING_TO_PAUSED) at gstgconfaudiosink.c:172
#20 0xb7a8d185 in gst_element_change_state (element=0x8d04ce8,
transition=3079970804) at gstelement.c:2171
#21 0xb7a8d813 in gst_element_set_state_func (element=0x8d04ce8,
state=GST_STATE_PAUSED) at gstelement.c:2133
#22 0xb7a8c3e3 in gst_element_set_state (element=0x8d04ce8, state=4294967292)
at gstelement.c:2043
#23 0xb7a7dd66 in gst_bin_change_state_func (element=0x8cd7aa8,
transition=GST_STATE_CHANGE_PLAYING_TO_PAUSED) at gstbin.c:1710
#24 0xb7a8d185 in gst_element_change_state (element=0x8cd7aa8,
transition=3079970804) at gstelement.c:2171
#25 0xb7a8d813 in gst_element_set_state_func (element=0x8cd7aa8,
state=GST_STATE_PAUSED) at gstelement.c:2133
#26 0xb7a8c3e3 in gst_element_set_state (element=0x8cd7aa8, state=4294967292)
at gstelement.c:2043
#27 0xb7a7dd66 in gst_bin_change_state_func (element=0x8d3f518,
transition=GST_STATE_CHANGE_PLAYING_TO_PAUSED) at gstbin.c:1710
#28 0xb7aa643a in gst_pipeline_change_state (element=0x8d3f518,
transition=GST_STATE_CHANGE_PLAYING_TO_PAUSED) at gstpipeline.c:375
#29 0xb59583ee in gst_play_base_bin_change_state (element=0x8d3f518,
transition=GST_STATE_CHANGE_PLAYING_TO_PAUSED) at gstplaybasebin.c:1793
#30 0xb59542b0 in gst_play_bin_change_state (element=0x8d3f518,
transition=GST_STATE_CHANGE_PLAYING_TO_PAUSED) at gstplaybin.c:1310
#31 0xb7a8d185 in gst_element_change_state (element=0x8d3f518,
transition=3079970804) at gstelement.c:2171
#32 0xb7a8d813 in gst_element_set_state_func (element=0x8d3f518,
state=GST_STATE_READY) at gstelement.c:2133
#33 0xb7a8c3e3 in gst_element_set_state (element=0x8d3f518, state=4294967292)
at gstelement.c:2043

[Switching to thread 2 (Thread -1256969296 (LWP 7248))]#0  0xffffe410 in
__kernel_vsyscall ()
(gdb) where
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7941d86 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/tls/i686/cmov/libpthread.so.0
#2  0xb47de97c in audioringbuffer_thread_func (buf=0x906f5c8) at
gstaudiosink.c:200
#3  0xb70f5a71 in g_thread_create_proxy (data=0x84f6880) at gthread.c:564
#4  0xb793fe70 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5  0xb704cbde in clone () from /lib/tls/i686/cmov/libc.so.6

[Switching to thread 3 (Thread -1293718608 (LWP 7246))]#0  0xffffe410 in
__kernel_vsyscall ()
(gdb) where
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7941d86 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/tls/i686/cmov/libpthread.so.0
#2  0xb49341bc in gst_queue_chain (pad=0x9263100, buffer=0x9239e98) at
gstqueue.c:679
#3  0xb7aa2f2d in gst_pad_chain (pad=0x9263100, buffer=0x9239e98) at
gstpad.c:3172
#4  0xb7aa365a in gst_pad_push (pad=0x917f5e8, buffer=0x9239e98) at
gstpad.c:3271
#5  0xb595b326 in gst_stream_selector_chain (pad=0x923adb0, buf=0x9239e98) at
gststreamselector.c:354
#6  0xb7aa2f2d in gst_pad_chain (pad=0x923adb0, buffer=0x9239e98) at
gstpad.c:3172
#7  0xb7a92e47 in gst_proxy_pad_do_chain (pad=0xfffffffc, buffer=0xfffffffc) at
gstghostpad.c:205
#8  0xb7aa2f2d in gst_pad_chain (pad=0x906dbb8, buffer=0x9239e98) at
gstpad.c:3172
#9  0xb7aa365a in gst_pad_push (pad=0x9254f58, buffer=0x9239e98) at
gstpad.c:3271
#10 0xb2e7885b in gst_mad_chain (pad=0xfffffffc, buffer=0x90e9cb0) at
gstmad.c:1594
 .. etc.

My vague guess as to what's happened:
- thread 5 waits for a new segment from the ring buffer
- thread 1 calls set_state, baseaudiosink calls ring_buffer_pause, then goes
into base sink's change state function which blocks on the preroll lock (held
by thread 5)
- thread 2 calls ring_buffer_prepare_read, which returns FALSE because the ring
buffer is paused, and goes on to wait on the audio ring buffer condition
variable

so, now thread 2 will never advance the ring buffer, so the thread 5 will never
be unblocked, so the thread 1 will never get the preroll lock, and the state
change will never return.


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