It’s funny that it actually happened to me yesterday, and I got some of the debug symbols this time. Here are the stacks:
(gdb) i threads
Id Target Id Frame
* 1 LWP 5458 "ngfd" 0x000000002161bc00 in ?? ()
2 LWP 5493 "gmain" 0x00000077ceb0b740 in poll () from /lib64/libc.so.6
3 LWP 8772 "threaded-ml" 0x00000077ceb0b740 in poll () from /lib64/libc.so.6
4 LWP 29524 "threaded-ml" 0x00000077ceb0b740 in poll () from /lib64/libc.so.6
5 LWP 29525 "typefind:sink" 0x00000077ceb10e20 in syscall () from /lib64/libc.so.6
6 LWP 29526 "mpegaudioparse1" 0x00000077ceb10e20 in syscall () from /lib64/libc.so.6
Thread 1 has a corrupted stack, so no idea what it is doing. But as far as I understand it, it is delegating its work to thread 2 anyway.
Threads 2 to 4 are in an event loop with stacks like that:
(gdb) t 2
[Switching to thread 2 (LWP 5493)]
#0 0x00000077ceb0b740 in poll () from /lib64/libc.so.6
(gdb) bt
#0 0x00000077ceb0b740 in poll () from /lib64/libc.so.6
#1 0x00000077cece6f1c in ?? () from /usr/lib64/libglib-2.0.so.0
#2 0x00000077cece7034 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3 0x00000077cece7094 in ?? () from /usr/lib64/libglib-2.0.so.0
#4 0x00000077ced10434 in ?? () from /usr/lib64/libglib-2.0.so.0
#5 0x00000077cebc1a4c in ?? () from /lib64/libpthread.so.0
#6 0x00000077ceb1589c in ?? () from /lib64/libc.so.6
(gdb) t 3
[Switching to thread 3 (LWP 8772)]
#0 0x00000077ceb0b740 in poll () from /lib64/libc.so.6
(gdb) bt
#0 0x00000077ceb0b740 in poll () from /lib64/libc.so.6
#1 0x00000077ce65b904 in ?? () from /usr/lib64/libpulse.so.0
#2 0x00000077ce64dfe4 in pa_mainloop_poll () from /usr/lib64/libpulse.so.0
#3 0x00000077ce64e614 in pa_mainloop_iterate () from /usr/lib64/libpulse.so.0
#4 0x00000077ce64e6e0 in pa_mainloop_run () from /usr/lib64/libpulse.so.0
#5 0x00000077ce65b874 in ?? () from /usr/lib64/libpulse.so.0
#6 0x00000077ce5f018c in ?? () from /usr/lib64/pulseaudio/libpulsecommon-14.2.so
#7 0x00000077cebc1a4c in ?? () from /lib64/libpthread.so.0
#8 0x00000077ceb1589c in ?? () from /lib64/libc.so.6
Thread 5 is waiting for the completion of the task in thread 6:
(gdb) t 5
[Switching to thread 5 (LWP 29525)]
#0 0x00000077ceb10e20 in syscall () from /lib64/libc.so.6
(gdb) bt
#0 0x00000077ceb10e20 in syscall () from /lib64/libc.so.6
#1 0x00000077ced38de4 in g_cond_wait () from /usr/lib64/libglib-2.0.so.0
#2 0x00000077ce123040 in gst_task_func (task=0x7774001b90) at ../gst/gsttask.c:369
#3 0x00000077ced10d48 in ?? () from /usr/lib64/libglib-2.0.so.0
#4 0x00000077ced10434 in ?? () from /usr/lib64/libglib-2.0.so.0
#5 0x00000077cebc1a4c in ?? () from /lib64/libpthread.so.0
#6 0x00000077ceb1589c in ?? () from /lib64/libc.so.6
And the most interesting, thread 6 is streaming audio frames, but locked in a waiting conditions:
(gdb) t 6
[Switching to thread 6 (LWP 29526)]
#0 0x00000077ceb10e20 in syscall () from /lib64/libc.so.6
(gdb) bt
#0 0x00000077ceb10e20 in syscall () from /lib64/libc.so.6
#1 0x00000077ced38de4 in g_cond_wait () from /usr/lib64/libglib-2.0.so.0
#2 0x00000077c5a5fb00 in gst_base_sink_wait_preroll (sink=sink@entry=0x2162cc10)
at ../libs/gst/base/gstbasesink.c:2437
#3 0x00000077c5a5fe1c in gst_base_sink_do_preroll (sink=sink@entry=0x2162cc10,
obj=obj@entry=0x778c017c60) at ../libs/gst/base/gstbasesink.c:2531
#4 0x00000077c5a60610 in gst_base_sink_do_sync (basesink=basesink@entry=0x2162cc10,
obj=obj@entry=0x778c017c60, late=late@entry=0x7787447298, step_end=step_end@entry=0x778744729c)
at ../libs/gst/base/gstbasesink.c:2739
#5 0x00000077c5a61aec in gst_base_sink_chain_unlocked (basesink=basesink@entry=0x2162cc10,
obj=obj@entry=0x778c017c60, is_list=is_list@entry=0, pad=<optimized out>)
at ../libs/gst/base/gstbasesink.c:3919
#6 0x00000077c5a62e4c in gst_base_sink_chain_main (basesink=0x2162cc10, pad=<optimized out>,
obj=0x778c017c60, is_list=0) at ../libs/gst/base/gstbasesink.c:4078
#7 0x00000077ce0e81f0 in gst_pad_chain_data_unchecked (pad=pad@entry=0x778000ccb0,
type=type@entry=4112, data=data@entry=0x778c017c60) at ../gst/gstpad.c:4447
#8 0x00000077ce0ea270 in gst_pad_push_data (pad=pad@entry=0x778000cf00, type=type@entry=4112,
data=data@entry=0x778c017c60) at ../gst/gstpad.c:4711
#9 0x00000077ce0f19d4 in gst_pad_push (pad=0x778000cf00, buffer=0x778c017c60) at ../gst/gstpad.c:4830
#10 0x00000077c5a6d724 in gst_base_transform_chain (pad=<optimized out>, parent=0x213bb790,
buffer=<optimized out>) at ../libs/gst/base/gstbasetransform.c:2383
#11 0x00000077ce0e81f0 in gst_pad_chain_data_unchecked (pad=pad@entry=0x778000c5c0,
type=type@entry=4112, data=data@entry=0x778c017c60) at ../gst/gstpad.c:4447
#12 0x00000077ce0ea270 in gst_pad_push_data (pad=pad@entry=0x216339f0, type=type@entry=4112,
data=data@entry=0x778c017c60) at ../gst/gstpad.c:4711
#13 0x00000077ce0f19d4 in gst_pad_push (pad=0x216339f0, buffer=0x778c017c60) at ../gst/gstpad.c:4830
#14 0x00000077c5a6d724 in gst_base_transform_chain (pad=<optimized out>, parent=0x2149a3b0,
buffer=<optimized out>) at ../libs/gst/base/gstbasetransform.c:2383
#15 0x00000077ce0e81f0 in gst_pad_chain_data_unchecked (pad=pad@entry=0x778000c810,
type=type@entry=4112, data=data@entry=0x778c017360) at ../gst/gstpad.c:4447
#16 0x00000077ce0ea270 in gst_pad_push_data (pad=pad@entry=0x21636ae0, type=type@entry=4112,
data=data@entry=0x778c017360) at ../gst/gstpad.c:4711
#17 0x00000077ce0f19d4 in gst_pad_push (pad=pad@entry=0x21636ae0, buffer=buffer@entry=0x778c017360)
at ../gst/gstpad.c:4830
#18 0x00000077ce0d3d94 in gst_proxy_pad_chain_default (pad=0x2163f3c0, parent=<optimized out>,
buffer=0x778c017360) at ../gst/gstghostpad.c:127
#19 0x00000077ce0e81f0 in gst_pad_chain_data_unchecked (pad=pad@entry=0x2163f3c0, type=type@entry=4112,
data=data@entry=0x778c017360) at ../gst/gstpad.c:4447
#20 0x00000077ce0ea270 in gst_pad_push_data (pad=pad@entry=0x21632520, type=type@entry=4112,
data=data@entry=0x778c017360) at ../gst/gstpad.c:4711
#21 0x00000077ce0f19d4 in gst_pad_push (pad=0x21632520, buffer=0x778c017360) at ../gst/gstpad.c:4830
#22 0x00000077c593b438 in gst_audio_decoder_push_forward (dec=dec@entry=0x777c00a2e0,
buf=<optimized out>, buf@entry=0x778c017360) at ../gst-libs/gst/audio/gstaudiodecoder.c:1040
#23 0x00000077c593c400 in gst_audio_decoder_output (dec=dec@entry=0x777c00a2e0,
buf=buf@entry=0x778c017360) at ../gst-libs/gst/audio/gstaudiodecoder.c:1117
#24 0x00000077c5941f8c in gst_audio_decoder_finish_frame_or_subframe (dec=0x777c00a2e0,
buf=0x778c017360, frames=<optimized out>) at ../gst-libs/gst/audio/gstaudiodecoder.c:1550
#25 0x00000077c4d9b274 in ?? () from /usr/lib64/gstreamer-1.0/libgstlibav.so
#26 0x00000077c4d9bc04 in ?? () from /usr/lib64/gstreamer-1.0/libgstlibav.so
#27 0x00000077c593dd44 in gst_audio_decoder_push_buffers (dec=dec@entry=0x777c00a2e0,
force=force@entry=0) at ../gst-libs/gst/audio/gstaudiodecoder.c:1736
#28 0x00000077c593e108 in gst_audio_decoder_chain_forward (dec=0x777c00a2e0, buffer=0x0)
--Type <RET> for more, q to quit, c to continue without paging--
at ../gst-libs/gst/audio/gstaudiodecoder.c:1850
#29 0x00000077c593f884 in gst_audio_decoder_chain (pad=<optimized out>, parent=<optimized out>,
buffer=0x7774001120) at ../gst-libs/gst/audio/gstaudiodecoder.c:2109
#30 0x00000077ce0e81f0 in gst_pad_chain_data_unchecked (pad=pad@entry=0x21632080, type=type@entry=4112,
data=data@entry=0x7774001120) at ../gst/gstpad.c:4447
#31 0x00000077ce0ea270 in gst_pad_push_data (pad=pad@entry=0x777c010040, type=type@entry=4112,
data=data@entry=0x7774001120) at ../gst/gstpad.c:4711
#32 0x00000077ce0f19d4 in gst_pad_push (pad=0x777c010040, buffer=buffer@entry=0x7774001120)
at ../gst/gstpad.c:4830
#33 0x00000077c5a508e4 in gst_base_parse_push_frame (parse=parse@entry=0x777001f660,
frame=frame@entry=0x2131dd90) at ../libs/gst/base/gstbaseparse.c:2594
#34 0x00000077c5a5318c in gst_base_parse_handle_and_push_frame (frame=0x2131dd90, parse=0x777001f660)
at ../libs/gst/base/gstbaseparse.c:2445
#35 gst_base_parse_finish_frame (parse=0x777001f660, frame=0x2131dd90, size=960)
at ../libs/gst/base/gstbaseparse.c:2752
#36 0x00000077c4fdd0f8 in ?? () from /usr/lib64/gstreamer-1.0/libgstaudioparsers.so
#37 0x00000077c5a4bdd4 in gst_base_parse_handle_buffer (parse=parse@entry=0x777001f660,
buffer=<optimized out>, skip=skip@entry=0x7787448754, flushed=flushed@entry=0x7787448750)
at ../libs/gst/base/gstbaseparse.c:2253
#38 0x00000077c5a4c498 in gst_base_parse_scan_frame (parse=parse@entry=0x777001f660,
klass=<optimized out>) at ../libs/gst/base/gstbaseparse.c:3533
#39 0x00000077c5a4f454 in gst_base_parse_loop (pad=<optimized out>)
at ../libs/gst/base/gstbaseparse.c:3613
#40 0x00000077ce122e04 in gst_task_func (task=0x777002a950) at ../gst/gsttask.c:384
#41 0x00000077ced10d48 in ?? () from /usr/lib64/libglib-2.0.so.0
#42 0x00000077ced10434 in ?? () from /usr/lib64/libglib-2.0.so.0
#43 0x00000077cebc1a4c in ?? () from /lib64/libpthread.so.0
#44 0x00000077ceb1589c in ?? () from /lib64/libc.so.6
This is sadly far more complex than my simple understanding. Especially I’ve no idea what the gstreamer code is supposed to do to read audio frames. So I cannot spot any problem in the stack. Besides the fact that it is locked forever in a locked condition, without timeout as far as I can tell.