After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 769764 - multiqueue: Deadlock in _sink_activate_mode when releasing pad
multiqueue: Deadlock in _sink_activate_mode when releasing pad
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.8.2
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-08-11 20:28 UTC by Marcin Lewandowski
Modified: 2018-11-03 12:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marcin Lewandowski 2016-08-11 20:28:19 UTC
I am using GStreamer 1.8.2 to create a pipeline that has multiple input branches, created dynamically after D-Bus method call. Each of the branch contains shmsrc do_timestamp=true is_live=true ! capsfilter. They are wrapped into bin, where capsfilter's src pad becomes ghost pad.

Each of such branches is linked with multiqueue, and multiqueue is linked to the audiomixer.

It may happen that such branches are added/removed in the runtime. 

In case of adding I just create them, request new pads on the multiqueue, audiomixer and link them (no pausing or pad blocking involved).

In case of removing I just unlink the bin, release pads (no pausing or pad blocking involved).

In case of errors (e.g. when SHM socket is closed) I override bin's virtual handle_message and intercept ERROR messages (I don't want them to propagate accross whole pipeline), and remove bin using method above in the next idle cycle of the mainloop.

This is what I got today, after D-Bus call that involved adding a branch.

(gdb) thr a a bt

Thread 10 (Thread 0x7f36b491c700 (LWP 16701))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait
    at gthread-posix.c line 1397
  • #2 gst_multi_queue_sink_query
    at gstmultiqueue.c line 2192
  • #3 gst_pad_query
    at gstpad.c line 3922
  • #4 gst_pad_peer_query
    at gstpad.c line 4054
  • #5 query_forward_func
    at gstpad.c line 3303
  • #6 gst_pad_forward
    at gstpad.c line 2936
  • #7 gst_pad_query_default
    at gstpad.c line 3370
  • #8 gst_pad_query
    at gstpad.c line 3922
  • #9 gst_pad_peer_query
    at gstpad.c line 4054
  • #10 gst_base_transform_default_propose_allocation
    at gstbasetransform.c line 1435
  • #11 gst_base_transform_default_query
    at gstbasetransform.c line 1535
  • #12 gst_pad_query
    at gstpad.c line 3922
  • #13 gst_pad_peer_query
    at gstpad.c line 4054
  • #14 gst_base_src_prepare_allocation
    at gstbasesrc.c line 3137
  • #15 gst_base_src_negotiate
    at gstbasesrc.c line 3281
  • #16 gst_base_src_loop
    at gstbasesrc.c line 2698
  • #17 gst_task_func
    at gsttask.c line 332
  • #18 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #19 g_thread_proxy
    at gthread.c line 778
  • #20 start_thread
    at pthread_create.c line 333
  • #21 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 109

Thread 9 (Thread 0x7f36a2ffd700 (LWP 16292))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait
    at gthread-posix.c line 1397
  • #2 gst_task_func
    at gsttask.c line 317
  • #3 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #4 g_thread_proxy
    at gthread.c line 778
  • #5 start_thread
    at pthread_create.c line 333
  • #6 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 109

Thread 8 (Thread 0x7f36a37fe700 (LWP 16129))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait
    at gthread-posix.c line 1397
  • #2 _gst_data_queue_wait_non_empty
    at gstdataqueue.c line 553
  • #3 gst_data_queue_pop
    at gstdataqueue.c line 595
  • #4 gst_multi_queue_loop
    at gstmultiqueue.c line 1575
  • #5 gst_task_func
    at gsttask.c line 332
  • #6 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #7 g_thread_proxy
    at gthread.c line 778
  • #8 start_thread
    at pthread_create.c line 333
  • #9 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 109

Thread 7 (Thread 0x7f36b5530700 (LWP 21373))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait
    at gthread-posix.c line 1397
  • #2 gst_aggregator_pad_chain_internal
    at gstaggregator.c line 2187
  • #3 gst_pad_chain_data_unchecked
    at gstpad.c line 4177
  • #4 gst_pad_push_data
    at gstpad.c line 4429
  • #5 gst_pad_push
    at gstpad.c line 4548
  • #6 gst_single_queue_push_one
    at gstmultiqueue.c line 1417
  • #7 gst_multi_queue_loop
    at gstmultiqueue.c line 1701
  • #8 gst_task_func
    at gsttask.c line 332
  • #9 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #10 g_thread_proxy
    at gthread.c line 778
  • #11 start_thread
    at pthread_create.c line 333
  • #12 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 109

Thread 6 (Thread 0x7f36b5d31700 (LWP 21372))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait
    at gthread-posix.c line 1397
  • #2 gst_data_queue_push
    at gstdataqueue.c line 520
  • #3 gst_multi_queue_chain
    at gstmultiqueue.c line 1890
  • #4 gst_pad_chain_data_unchecked
    at gstpad.c line 4177
  • #5 gst_pad_push_data
    at gstpad.c line 4429
  • #6 gst_pad_push
    at gstpad.c line 4548
  • #7 gst_base_src_loop
    at gstbasesrc.c line 2850
  • #8 gst_task_func
    at gsttask.c line 332
  • #9 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #10 g_thread_proxy
    at gthread.c line 778
  • #11 start_thread
    at pthread_create.c line 333
  • #12 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 109

Thread 5 (Thread 0x7f36b6532700 (LWP 21371))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait
    at gthread-posix.c line 1397
  • #2 gst_queue_chain_buffer_or_list
    at gstqueue.c line 1225
  • #3 gst_pad_chain_data_unchecked
    at gstpad.c line 4177
  • #4 gst_pad_push_data
    at gstpad.c line 4429
  • #5 gst_pad_push
    at gstpad.c line 4548
  • #6 gst_base_transform_chain
    at gstbasetransform.c line 2369
  • #7 gst_pad_chain_data_unchecked
    at gstpad.c line 4177
  • #8 gst_pad_push_data
    at gstpad.c line 4429
  • #9 gst_pad_push
    at gstpad.c line 4548
  • #10 gst_base_transform_chain
    at gstbasetransform.c line 2369
  • #11 gst_pad_chain_data_unchecked
    at gstpad.c line 4177
  • #12 gst_pad_push_data
    at gstpad.c line 4429
  • #13 gst_pad_push
    at gstpad.c line 4548
  • #14 gst_base_transform_chain
    at gstbasetransform.c line 2369
  • #15 gst_pad_chain_data_unchecked
    at gstpad.c line 4177
  • #16 gst_pad_push_data
    at gstpad.c line 4429
  • #17 gst_pad_push
    at gstpad.c line 4548
  • #18 gst_aggregator_finish_buffer
    at gstaggregator.c line 579
  • #19 gst_audio_aggregator_aggregate
    at gstaudioaggregator.c line 1357
  • #20 gst_aggregator_aggregate_func
    at gstaggregator.c line 816
  • #21 gst_task_func
    at gsttask.c line 332
  • #22 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #23 g_thread_proxy
    at gthread.c line 778
  • #24 start_thread
    at pthread_create.c line 333
  • #25 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 109

Thread 1 (Thread 0x7f36c216e700 (LWP 21367))

  • #0 __lll_lock_wait
    at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 135
  • #1 __GI___pthread_mutex_lock
    at ../nptl/pthread_mutex_lock.c line 115
  • #2 gst_multi_queue_sink_activate_mode
    at gstmultiqueue.c line 1948
  • #3 activate_mode_internal
    at gstpad.c line 1176
  • #4 gst_pad_set_active
    at gstpad.c line 1077
  • #5 gst_multi_queue_release_pad
    at gstmultiqueue.c line 803
  • #6 my_app_core_common_input_bin_remove_input_unlocked
    at input_bin.c line 1223
  • #7 my_app_core_common_input_bin_add_input_unlocked
    at input_bin.c line 839
  • #8 my_app_core_common_input_bin_sync_inputs
    at input_bin.c line 663
  • #9 my_app_core_common_player_stream_real_sync_inputs
    at player.c line 1252
  • #10 _dbus_my_app_core_common_daemon_media_output_base_sync_linked_inputs
    at daemon/media/output/base.c line 879
  • #11 call_in_idle_cb
    at gdbusconnection.c line 4832
  • #12 g_main_dispatch
    at gmain.c line 3237
  • #13 g_main_context_dispatch
    at gmain.c line 3898
  • #14 g_main_context_iterate
    at gmain.c line 3969
  • #15 g_main_loop_run
    at gmain.c line 4163
  • #16 my_app_common_app_template_base_start_real
    at app/template/base.c line 682
  • #17 my_app_common_app_template_base_start
    at app/template/base.c line 470
  • #18 my_app_core_media_output_stream_rk_diffusor_main
    at main.c line 38
  • #19 __libc_start_main
    at ../csu/libc-start.c line 291
  • #20 _start

Comment 1 GStreamer system administrator 2018-11-03 12:35:33 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/181.