[Bug 763711] splitmuxsink: deadlock when one streams doesn't have regular buffers

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Mar 16 00:56:00 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=763711

--- Comment #1 from Xavier Claessens <xclaesse at gmail.com> ---
Created attachment 324068
  --> https://bugzilla.gnome.org/attachment.cgi?id=324068&action=edit
minimal test case app showing the deadlock

Backtrace when the testcase deadlocked:

Thread 12 (Thread 0x7f0431d23700 (LWP 877)):
#0  0x00007f043589e6d9 in syscall () at
../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f0435e13b8f in g_cond_wait (cond=cond at entry=0x19424e8,
mutex=mutex at entry=0x19424d8)
    at /build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/gthread-posix.c:1397
#2  0x00007f0436657ac2 in _gst_data_queue_wait_non_empty
(queue=queue at entry=0x1942530 [GstDataQueue]) at gstdataqueue.c:553
#3  0x00007f0436658de0 in gst_data_queue_pop (queue=0x1942530 [GstDataQueue],
item=item at entry=0x7f0431d22e40) at gstdataqueue.c:595
#4  0x00007f04340c3377 in gst_multi_queue_loop (pad=<optimized out>) at
gstmultiqueue.c:1552
#5  0x00007f0436389ad1 in gst_task_func (task=0x1b70050 [GstTask]) at
gsttask.c:332
#6  0x00007f0435df64fe in g_thread_pool_thread_proxy (data=<optimized out>) at
/build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/gthreadpool.c:307
#7  0x00007f0435df5b65 in g_thread_proxy (data=0x1b590f0) at
/build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/gthread.c:780
#8  0x00007f0435b6e66a in start_thread (arg=0x7f0431d23700) at
pthread_create.c:333
#9  0x00007f04358a401d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 11 (Thread 0x7f0431522700 (LWP 878)):
#0  0x00007f043589e6d9 in syscall () at
../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f0435e13b8f in g_cond_wait (cond=0x1b50220, mutex=0x1b50218) at
/build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/gthread-posix.c:1397
#2  0x00007f0436655763 in gst_collect_pads_chain (pad=0x1b2fb40 [GstPad],
parent=<optimized out>, buffer=0x7f041c62e930)
    at gstcollectpads.c:2251
#3  0x00007f043635740f in gst_pad_push_data (data=0x7f041c62e930, type=4112,
pad=0x1b2fb40 [GstPad]) at gstpad.c:4155
#4  0x00007f043635740f in gst_pad_push_data (pad=pad at entry=0x1b66050 [GstPad],
type=type at entry=4112, data=data at entry=0x7f041c62e930)
    at gstpad.c:4407
#5  0x00007f043635f293 in gst_pad_push (pad=0x1b66050 [GstPad],
buffer=buffer at entry=0x7f041c62e930) at gstpad.c:4526
#6  0x00007f04340c4114 in gst_multi_queue_loop (allow_drop=<synthetic pointer>,
object=0x7f041c62e930, sq=0x1b6b140, mq=0x1b41200 [GstMultiQueue]) at
gstmultiqueue.c:1394
#7  0x00007f04340c4114 in gst_multi_queue_loop (pad=<optimized out>) at
gstmultiqueue.c:1677
#8  0x00007f0436389ad1 in gst_task_func (task=0x1b70170 [GstTask]) at
gsttask.c:332
#9  0x00007f0435df64fe in g_thread_pool_thread_proxy (data=<optimized out>) at
/build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/gthreadpool.c:307
#10 0x00007f0435df5b65 in g_thread_proxy (data=0x1b59140) at
/build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/gthread.c:780
#11 0x00007f0435b6e66a in start_thread (arg=0x7f0431522700) at
pthread_create.c:333
#12 0x00007f04358a401d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 10 (Thread 0x7f0430d21700 (LWP 879)):
#0  0x00007f043589e6d9 in syscall () at
../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f0435e13b8f in g_cond_wait (cond=cond at entry=0x1b44410,
mutex=mutex at entry=0x1b44408)
    at /build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/gthread-posix.c:1397
#2  0x00007f0432fecbf4 in handle_mq_input (pad=pad at entry=0x1b2f6c0 [GstPad],
info=info at entry=0x7f0430d20be0, ctx=0x1b650d0)
    at gstsplitmuxsink.c:1132
#3  0x00007f04363550db in probe_hook_marshal (hook=0x1b59230,
data=0x7f0430d20b40) at gstpad.c:3420
#4  0x00007f0435dbf884 in g_hook_list_marshal
(hook_list=hook_list at entry=0x1b2f758, may_recurse=may_recurse at entry=1,
marshaller=marshaller at entry=0x7f0436354f80 <probe_hook_marshal>,
data=data at entry=0x7f0430d20b40) at
/build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/ghook.c:672
#5  0x00007f043635390b in do_probe_callbacks (pad=pad at entry=0x1b2f6c0 [GstPad],
info=info at entry=0x7f0430d20be0, defaultval=defaultval at entry=GST---Type <return>
to continue, or q <return> to quit---
_FLOW_OK) at gstpad.c:3572
#6  0x00007f04363577cb in gst_pad_push_data (data=0x7f0428005110, type=4112,
pad=0x1b2f6c0 [GstPad]) at gstpad.c:4135
#7  0x00007f04363577cb in gst_pad_push_data (pad=pad at entry=0x1b463a0
[GstProxyPad], type=type at entry=4112, data=data at entry=0x7f0428005110)
    at gstpad.c:4407
#8  0x00007f043635f293 in gst_pad_push (pad=pad at entry=0x1b463a0 [GstProxyPad],
buffer=buffer at entry=0x7f0428005110) at gstpad.c:4526
#9  0x00007f04363483d3 in gst_proxy_pad_chain_default (pad=0x1b44530
[GstGhostPad], parent=<optimized out>, buffer=0x7f0428005110)
    at gstghostpad.c:126
#10 0x00007f043635740f in gst_pad_push_data (data=0x7f0428005110, type=4112,
pad=0x1b44530 [GstGhostPad]) at gstpad.c:4155
#11 0x00007f043635740f in gst_pad_push_data (pad=pad at entry=0x1b2e040 [GstPad],
type=type at entry=4112, data=data at entry=0x7f0428005110)
    at gstpad.c:4407
#12 0x00007f043635f293 in gst_pad_push (pad=pad at entry=0x1b2e040 [GstPad],
buffer=0x7f0428005110) at gstpad.c:4526
#13 0x00007f0436643c05 in gst_base_src_loop (pad=0x1b2e040 [GstPad]) at
gstbasesrc.c:2850
#14 0x00007f0436389ad1 in gst_task_func (task=0x1b70290 [GstTask]) at
gsttask.c:332
#15 0x00007f0435df64fe in g_thread_pool_thread_proxy (data=<optimized out>) at
/build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/gthreadpool.c:307
#16 0x00007f0435df5b65 in g_thread_proxy (data=0x1b59370) at
/build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/gthread.c:780
#17 0x00007f0435b6e66a in start_thread (arg=0x7f0430d21700) at
pthread_create.c:333
#18 0x00007f04358a401d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 9 (Thread 0x7f0423fff700 (LWP 880)):
#0  0x00007f043589e6d9 in syscall () at
../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f0435e13b8f in g_cond_wait (cond=cond at entry=0x1b44410,
mutex=mutex at entry=0x1b44408)
    at /build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/gthread-posix.c:1397
#2  0x00007f0432fecbf4 in handle_mq_input (pad=pad at entry=0x1b2fd80 [GstPad],
info=info at entry=0x7f0423ffe200, ctx=0x1b6c0f0)
    at gstsplitmuxsink.c:1132
#3  0x00007f04363550db in probe_hook_marshal (hook=0x1b59190,
data=0x7f0423ffe160) at gstpad.c:3420
#4  0x00007f0435dbf884 in g_hook_list_marshal
(hook_list=hook_list at entry=0x1b2fe18, may_recurse=may_recurse at entry=1,
marshaller=marshaller at entry=0x7f0436354f80 <probe_hook_marshal>,
data=data at entry=0x7f0423ffe160) at
/build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/ghook.c:672
#5  0x00007f043635390b in do_probe_callbacks (pad=pad at entry=0x1b2fd80 [GstPad],
info=info at entry=0x7f0423ffe200, defaultval=defaultval at entry=GST_FLOW_OK) at
gstpad.c:3572
#6  0x00007f04363577cb in gst_pad_push_data (data=0x7f041cbd87c0, type=4112,
pad=0x1b2fd80 [GstPad]) at gstpad.c:4135
#7  0x00007f04363577cb in gst_pad_push_data (pad=pad at entry=0x1b465f0
[GstProxyPad], type=type at entry=4112, data=data at entry=0x7f041cbd87c0)
    at gstpad.c:4407
#8  0x00007f043635f293 in gst_pad_push (pad=pad at entry=0x1b465f0 [GstProxyPad],
buffer=buffer at entry=0x7f041cbd87c0) at gstpad.c:4526
#9  0x00007f04363483d3 in gst_proxy_pad_chain_default (pad=0x1b447a0
[GstGhostPad], parent=<optimized out>, buffer=0x7f041cbd87c0)
    at gstghostpad.c:126
#10 0x00007f043635740f in gst_pad_push_data (data=0x7f041cbd87c0, type=4112,
pad=0x1b447a0 [GstGhostPad]) at gstpad.c:4155
#11 0x00007f043635740f in gst_pad_push_data (pad=pad at entry=0x1b44050
[GstGhostPad], type=type at entry=4112, data=data at entry=0x7f041cbd87c0)
    at gstpad.c:4407
#12 0x00007f043635f293 in gst_pad_push (pad=pad at entry=0x1b44050 [GstGhostPad],
buffer=buffer at entry=0x7f041cbd87c0) at gstpad.c:4526
#13 0x00007f04363483d3 in gst_proxy_pad_chain_default (pad=0x1b46150
[GstProxyPad], parent=<optimized out>, buffer=0x7f041cbd87c0)
    at gstghostpad.c:126
#14 0x00007f043635740f in gst_pad_push_data (data=0x7f041cbd87c0, type=4112,
pad=0x1b46150 [GstProxyPad]) at gstpad.c:4155
---Type <return> to continue, or q <return> to quit---
#15 0x00007f043635740f in gst_pad_push_data (pad=pad at entry=0x1b2eb80 [GstPad],
type=type at entry=4112, data=data at entry=0x7f041cbd87c0)
    at gstpad.c:4407
#16 0x00007f043635f293 in gst_pad_push (pad=0x1b2eb80 [GstPad],
buffer=buffer at entry=0x7f041cbd87c0) at gstpad.c:4526
#17 0x00007f04345bdd8b in gst_video_encoder_finish_frame (encoder=0x1b3ef10
[GstX264Enc], frame=0x0) at gstvideoencoder.c:2197
#18 0x00007f0433e90f33 in  () at
/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstx264.so
#19 0x00007f0433e959f9 in  () at
/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstx264.so
#20 0x00007f04345bc6eb in gst_video_encoder_chain (pad=<optimized out>,
parent=0x1b3ef10 [GstX264Enc], buf=<optimized out>)
    at gstvideoencoder.c:1480
#21 0x00007f043635740f in gst_pad_push_data (data=0x7f041c55e4e0, type=4112,
pad=0x1b2e940 [GstPad]) at gstpad.c:4155
#22 0x00007f043635740f in gst_pad_push_data (pad=pad at entry=0x1b2e700 [GstPad],
type=type at entry=4112, data=data at entry=0x7f041c55e4e0)
    at gstpad.c:4407
#23 0x00007f043635f293 in gst_pad_push (pad=0x1b2e700 [GstPad],
buffer=0x7f041c55e4e0) at gstpad.c:4526
#24 0x00007f04366481fd in gst_base_transform_chain (pad=<optimized out>,
parent=0x1b382f0 [GstCapsFilter], buffer=<optimized out>)
    at gstbasetransform.c:2369
#25 0x00007f043635740f in gst_pad_push_data (data=0x7f041c55e4e0, type=4112,
pad=0x1b2e4c0 [GstPad]) at gstpad.c:4155
#26 0x00007f043635740f in gst_pad_push_data (pad=pad at entry=0x1b2e280 [GstPad],
type=type at entry=4112, data=data at entry=0x7f041c55e4e0)
    at gstpad.c:4407
#27 0x00007f043635f293 in gst_pad_push (pad=pad at entry=0x1b2e280 [GstPad],
buffer=0x7f041c55e4e0) at gstpad.c:4526
#28 0x00007f0436643c05 in gst_base_src_loop (pad=0x1b2e280 [GstPad]) at
gstbasesrc.c:2850
#29 0x00007f0436389ad1 in gst_task_func (task=0x1b703b0 [GstTask]) at
gsttask.c:332
#30 0x00007f0435df64fe in g_thread_pool_thread_proxy (data=<optimized out>) at
/build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/gthreadpool.c:307
#31 0x00007f0435df5b65 in g_thread_proxy (data=0x1b592d0) at
/build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/gthread.c:780
#32 0x00007f0435b6e66a in start_thread (arg=0x7f0423fff700) at
pthread_create.c:333
#33 0x00007f04358a401d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 8 (Thread 0x7f0422a20700 (LWP 881)):
#0  0x00007f0435b73d60 in pthread_cond_wait@@GLIBC_2.3.2 () at
../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f043397257b in  () at /usr/lib/x86_64-linux-gnu/libx264.so.148
#2  0x00007f0435b6e66a in start_thread (arg=0x7f0422a20700) at
pthread_create.c:333
#3  0x00007f04358a401d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 7 (Thread 0x7f042221f700 (LWP 883)):
#0  0x00007f0435b73d60 in pthread_cond_wait@@GLIBC_2.3.2 () at
../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f043397257b in  () at /usr/lib/x86_64-linux-gnu/libx264.so.148
#2  0x00007f0435b6e66a in start_thread (arg=0x7f042221f700) at
pthread_create.c:333
#3  0x00007f04358a401d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 6 (Thread 0x7f0421a1e700 (LWP 884)):
#0  0x00007f0435b73d60 in pthread_cond_wait@@GLIBC_2.3.2 () at
../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f043397257b in  () at /usr/lib/x86_64-linux-gnu/libx264.so.148
#2  0x00007f0435b6e66a in start_thread (arg=0x7f0421a1e700) at
pthread_create.c:333
#3  0x00007f04358a401d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109
---Type <return> to continue, or q <return> to quit---

Thread 5 (Thread 0x7f042121d700 (LWP 885)):
#0  0x00007f0435b73d60 in pthread_cond_wait@@GLIBC_2.3.2 () at
../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f043397257b in  () at /usr/lib/x86_64-linux-gnu/libx264.so.148
#2  0x00007f0435b6e66a in start_thread (arg=0x7f042121d700) at
pthread_create.c:333
#3  0x00007f04358a401d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7f0420a1c700 (LWP 887)):
#0  0x00007f0435b73d60 in pthread_cond_wait@@GLIBC_2.3.2 () at
../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f043397257b in  () at /usr/lib/x86_64-linux-gnu/libx264.so.148
#2  0x00007f0435b6e66a in start_thread (arg=0x7f0420a1c700) at
pthread_create.c:333
#3  0x00007f04358a401d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7f041bfff700 (LWP 888)):
#0  0x00007f0435b73d60 in pthread_cond_wait@@GLIBC_2.3.2 () at
../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f043397257b in  () at /usr/lib/x86_64-linux-gnu/libx264.so.148
#2  0x00007f0435b6e66a in start_thread (arg=0x7f041bfff700) at
pthread_create.c:333
#3  0x00007f04358a401d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f040fb70700 (LWP 890)):
#0  0x00007f0435b73d60 in pthread_cond_wait@@GLIBC_2.3.2 () at
../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f0433971cbd in  () at /usr/lib/x86_64-linux-gnu/libx264.so.148
#2  0x00007f0435b6e66a in start_thread (arg=0x7f040fb70700) at
pthread_create.c:333
#3  0x00007f04358a401d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f0436a62700 (LWP 876)):
#0  0x00007f04358989ed in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f0435dcf31c in g_main_context_iterate (priority=2147483647, n_fds=1,
fds=0x1b65090, timeout=<optimized out>, context=0x1b6ef40)
    at /build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/gmain.c:4135
#2  0x00007f0435dcf31c in g_main_context_iterate (context=0x1b6ef40,
block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>)
    at /build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/gmain.c:3835
#3  0x00007f0435dcf6a2 in g_main_loop_run (loop=0x1b6c020) at
/build/glib2.0-SNH0tt/glib2.0-2.47.6/./glib/gmain.c:4034
#4  0x0000000000401869 in main ()

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