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 704002 - inpuselector - deadlock on next track (sometimes), racy
inpuselector - deadlock on next track (sometimes), racy
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal normal
: 1.1.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-11 13:31 UTC by Alban Browaeys
Modified: 2013-07-12 08:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alban Browaeys 2013-07-11 13:31:21 UTC
Thread 6:
gst_input_selector_release_pad -> input selector lock
then post_activate -> pad stream lock
Thread 7 :
gst_pad_chain_data_unchecked -> pad stream lock
then gst_selector_pad_chain -> input stream lock


Thread 6 (Thread 0x7fc108bf8700 (LWP 6689))

  • #0 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 135
  • #1 _L_lock_1027
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #2 __GI___pthread_mutex_lock
    at pthread_mutex_lock.c line 85
  • #3 g_rec_mutex_lock
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gthread-posix.c line 382
  • #4 post_activate
    at gstpad.c line 904
  • #5 gst_pad_activate_mode
    at gstpad.c line 1085
  • #6 gst_pad_set_active
    at gstpad.c line 967
  • #7 gst_input_selector_release_pad
    at gstinputselector.c line 1703
  • #8 gst_element_release_request_pad
    at gstelement.c line 338
  • #9 deactivate_group
    at gstplaybin2.c line 5061
  • #10 setup_next_source
    at gstplaybin2.c line 5135
  • #11 drained_cb
    at gstplaybin2.c line 3476
  • #12 g_cclosure_marshal_VOID__VOIDv
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gmarshal.c line 115
  • #13 _g_closure_invoke_va
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gclosure.c line 840
  • #14 g_signal_emit_valist
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c line 3234
  • #15 g_signal_emit
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c line 3382
  • #16 proxy_drained_signal
    at gsturidecodebin.c line 1734
  • #17 g_cclosure_marshal_VOID__VOIDv
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gmarshal.c line 115
  • #18 _g_closure_invoke_va
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gclosure.c line 840
  • #19 g_signal_emit_valist
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c line 3234
  • #20 g_signal_emit
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c line 3382
  • #21 drain_and_switch_chains
    at gstdecodebin2.c line 3485
  • #22 drain_and_switch_group
    at gstdecodebin2.c line 3397
  • #23 drain_and_switch_chains
    at gstdecodebin2.c line 3446
  • #24 gst_decode_pad_handle_eos
    at gstdecodebin2.c line 3502
  • #25 source_pad_event_probe
    at gstdecodebin2.c line 4167
  • #26 probe_hook_marshal
    at gstpad.c line 3065
  • #27 g_hook_list_marshal
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/ghook.c line 676
  • #28 do_probe_callbacks
    at gstpad.c line 3159
  • #29 gst_pad_push_event_unchecked
    at gstpad.c line 4663
  • #30 push_sticky
    at gstpad.c line 3328
  • #31 events_foreach
    at gstpad.c line 530
  • #32 check_sticky
    at gstpad.c line 3384
  • #33 gst_pad_push_event
    at gstpad.c line 4806
  • #34 event_forward_func
    at gstpad.c line 2745
  • #35 gst_pad_forward
    at gstpad.c line 2699
  • #36 gst_pad_event_default
    at gstpad.c line 2796
  • #37 gst_pad_send_event_unchecked
    at gstpad.c line 4993
  • #38 gst_pad_push_event_unchecked
    at gstpad.c line 4689
  • #39 push_sticky
    at gstpad.c line 3328
  • #40 events_foreach
    at gstpad.c line 530
  • #41 check_sticky
    at gstpad.c line 3384
  • #42 gst_pad_push_event
    at gstpad.c line 4806
  • #43 gst_audio_decoder_push_event
    at gstaudiodecoder.c line 556
  • #44 gst_audio_decoder_sink_eventfunc
    at gstaudiodecoder.c line 1829
  • #45 gst_audio_decoder_sink_event
    at gstaudiodecoder.c line 1891
  • #46 gst_pad_send_event_unchecked
    at gstpad.c line 4993
  • #47 gst_pad_push_event_unchecked
    at gstpad.c line 4689
  • #48 push_sticky
    at gstpad.c line 3328
  • #49 events_foreach
    at gstpad.c line 530
  • #50 check_sticky
    at gstpad.c line 3384
  • #51 gst_pad_push_event
    at gstpad.c line 4806
  • #52 gst_base_transform_sink_eventfunc
    at gstbasetransform.c line 1857
  • #53 gst_capsfilter_sink_event
    at gstcapsfilter.c line 405
  • #54 gst_base_transform_sink_event
    at gstbasetransform.c line 1797
  • #55 gst_pad_send_event_unchecked
    at gstpad.c line 4993
  • #56 gst_pad_push_event_unchecked
    at gstpad.c line 4689
  • #57 push_sticky
    at gstpad.c line 3328
  • #58 events_foreach
    at gstpad.c line 530
  • #59 check_sticky
    at gstpad.c line 3384
  • #60 gst_pad_push_event
    at gstpad.c line 4806
  • #61 gst_base_parse_sink_event_default
    at gstbaseparse.c line 1156
  • #62 gst_base_parse_sink_event
    at gstbaseparse.c line 887
  • #63 gst_pad_send_event_unchecked
    at gstpad.c line 4993
  • #64 gst_pad_push_event_unchecked
    at gstpad.c line 4689
  • #65 push_sticky
    at gstpad.c line 3328
  • #66 events_foreach
    at gstpad.c line 530
  • #67 check_sticky
    at gstpad.c line 3384
  • #68 gst_pad_push_event
    at gstpad.c line 4806
  • #69 gst_single_queue_push_one
    at gstmultiqueue.c line 1082
  • #70 gst_multi_queue_loop
    at gstmultiqueue.c line 1307
  • #71 gst_task_func
    at gsttask.c line 316
  • #72 default_func
    at gsttaskpool.c line 70
  • #73 g_thread_pool_thread_proxy
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gthreadpool.c line 309

Comment 1 Alban Browaeys 2013-07-11 13:45:28 UTC
sorry this is on next track (second one , might affect other next ones , have not tested) using playbin.
Comment 2 Sebastian Dröge (slomo) 2013-07-12 08:10:39 UTC
commit 717ad2091209bf3b736cfd9784ca1e710a5020a6
Author: Sebastian Dröge <slomo@circular-chaos.org>
Date:   Fri Jul 12 10:08:26 2013 +0200

    inputselector: Deactivate and remove pad without the inputselector lock
    
    Otherwise we might get deadlocks caused by lock order inversion:
    During the chain function the stream lock is first locked and then the
    inputselector lock. During pad release we first locked the inputselector
    lock and then deactivating the pad would lock the stream lock.
    
    There's no reason why the inputselector lock should be required while
    deactivating and removing the pad, it's only needed before.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704002