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 678220 - [0.10] playbin2: deadlock in totem
[0.10] playbin2: deadlock in totem
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.x
Other Linux
: Normal blocker
: 0.10.37
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-16 18:25 UTC by Tim-Philipp Müller
Modified: 2012-06-21 13:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
inputselector: avoid notify-tags holding lock (1.49 KB, patch)
2012-06-21 04:31 UTC, Thiago Sousa Santos
committed Details | Review

Description Tim-Philipp Müller 2012-06-16 18:25:15 UTC
0.10 from git. Second time in half an hour that totem deadlocks on me. I think it's on a song change. Stack trace is this:


(gdb) thread apply all bt

Thread 5 (Thread 0x7fd1e62ba700 (LWP 4003))

  • #0 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 136
  • #1 _L_lock_997
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #2 __pthread_mutex_lock
    at pthread_mutex_lock.c line 82
  • #3 g_static_rec_mutex_lock
    at deprecated/gthread-deprecated.c line 712
  • #4 gst_play_bin_get_property
    at gstplaybin2.c line 2238
  • #5 object_get_property
    at gobject.c line 1289
  • #6 g_object_get_valist
    at gobject.c line 2014
  • #7 g_object_get
    at gobject.c line 2104
  • #8 audio_tags_changed_cb
    at bacon-video-widget-gst-0.10.c line 1754
  • #9 g_cclosure_marshal_VOID__INTv
    at gmarshal.c line 410
  • #10 _g_closure_invoke_va
    at gclosure.c line 840
  • #11 g_signal_emit_valist
    at gsignal.c line 3207
  • #12 g_signal_emit
    at gsignal.c line 3352
  • #13 g_closure_invoke
    at gclosure.c line 777
  • #14 signal_emit_unlocked_R
    at gsignal.c line 3547
  • #15 g_signal_emit_valist
    at gsignal.c line 3296
  • #16 g_signal_emit
    at gsignal.c line 3352
  • #17 g_object_dispatch_properties_changed
    at gobject.c line 1041
  • #18 gst_object_dispatch_properties_changed
    at gstobject.c line 530
  • #19 g_object_notify_by_spec_internal
    at gobject.c line 1133
  • #20 g_object_notify
    at gobject.c line 1175
  • #21 gst_selector_pad_event
    at gstinputselector.c line 573
  • #22 gst_pad_send_event
    at gstpad.c line 5432
  • #23 gst_pad_push_event
    at gstpad.c line 5280
  • #24 gst_proxy_pad_event_default
    at gstghostpad.c line 129
  • #25 gst_pad_send_event
    at gstpad.c line 5432
  • #26 gst_pad_push_event
    at gstpad.c line 5280
  • #27 gst_proxy_pad_event_default
    at gstghostpad.c line 129
  • #28 gst_pad_send_event
    at gstpad.c line 5432
  • #29 gst_pad_push_event
    at gstpad.c line 5280
  • #30 gst_audio_decoder_finish_frame
    at gstaudiodecoder.c line 793
  • #31 gst_mad_handle_frame
    at gstmad.c line 491
  • #32 gst_audio_decoder_push_buffers
    at gstaudiodecoder.c line 1044
  • #33 gst_audio_decoder_chain_forward
    at gstaudiodecoder.c line 1146
  • #34 gst_audio_decoder_chain
    at gstaudiodecoder.c line 1394
  • #35 gst_pad_push
    at gstpad.c line 4710
  • #36 gst_base_parse_push_frame
    at gstbaseparse.c line 1967
  • #37 gst_base_parse_handle_and_push_frame
    at gstbaseparse.c line 1773
  • #38 gst_base_parse_loop
    at gstbaseparse.c line 2805
  • #39 gst_task_func
    at gsttask.c line 328
  • #40 g_thread_pool_thread_proxy
    at gthreadpool.c line 309
  • #41 g_thread_proxy
    at gthread.c line 801
  • #42 start_thread
    at pthread_create.c line 304
  • #43 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #44 ??

Comment 1 Tim-Philipp Müller 2012-06-16 18:29:48 UTC
Here's an (I think) even better one:


(gdb) thread apply all bt

Thread 5 (Thread 0x7f30df8fc700 (LWP 6507))

  • #0 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 136
  • #1 _L_lock_997
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #2 __pthread_mutex_lock
    at pthread_mutex_lock.c line 82
  • #3 g_static_rec_mutex_lock
    at deprecated/gthread-deprecated.c line 712
  • #4 gst_play_bin_get_property
    at gstplaybin2.c line 2238
  • #5 object_get_property
    at gobject.c line 1289
  • #6 g_object_get_valist
    at gobject.c line 2014
  • #7 g_object_get
    at gobject.c line 2104
  • #8 audio_tags_changed_cb
    at bacon-video-widget-gst-0.10.c line 1754
  • #9 g_cclosure_marshal_VOID__INTv
    at gmarshal.c line 410
  • #10 _g_closure_invoke_va
    at gclosure.c line 840
  • #11 g_signal_emit_valist
    at gsignal.c line 3207
  • #12 g_signal_emit
    at gsignal.c line 3352
  • #13 g_closure_invoke
    at gclosure.c line 777
  • #14 signal_emit_unlocked_R
    at gsignal.c line 3547
  • #15 g_signal_emit_valist
    at gsignal.c line 3296
  • #16 g_signal_emit
    at gsignal.c line 3352
  • #17 g_object_dispatch_properties_changed
    at gobject.c line 1041
  • #18 gst_object_dispatch_properties_changed
    at gstobject.c line 530
  • #19 g_object_notify_by_spec_internal
    at gobject.c line 1133
  • #20 g_object_notify
    at gobject.c line 1175
  • #21 gst_selector_pad_event
    at gstinputselector.c line 573
  • #22 gst_pad_send_event
    at gstpad.c line 5432
  • #23 gst_pad_push_event
    at gstpad.c line 5280
  • #24 gst_proxy_pad_event_default
    at gstghostpad.c line 129
  • #25 gst_pad_send_event
    at gstpad.c line 5432
  • #26 gst_pad_push_event
    at gstpad.c line 5280
  • #27 gst_proxy_pad_event_default
    at gstghostpad.c line 129
  • #28 gst_pad_send_event
    at gstpad.c line 5432
  • #29 gst_pad_push_event
    at gstpad.c line 5280
  • #30 gst_audio_decoder_finish_frame
    at gstaudiodecoder.c line 793
  • #31 gst_mad_handle_frame
    at gstmad.c line 491
  • #32 gst_audio_decoder_push_buffers
    at gstaudiodecoder.c line 1044
  • #33 gst_audio_decoder_chain_forward
    at gstaudiodecoder.c line 1146
  • #34 gst_audio_decoder_chain
    at gstaudiodecoder.c line 1394
  • #35 gst_pad_push
    at gstpad.c line 4710
  • #36 gst_base_parse_push_frame
    at gstbaseparse.c line 1967
  • #37 gst_base_parse_handle_and_push_frame
    at gstbaseparse.c line 1773
  • #38 gst_base_parse_loop
    at gstbaseparse.c line 2805
  • #39 gst_task_func
    at gsttask.c line 328
  • #40 g_thread_pool_thread_proxy
    at gthreadpool.c line 309
  • #41 g_thread_proxy
    at gthread.c line 801
  • #42 start_thread
    at pthread_create.c line 304
  • #43 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #44 ??

Thread 3 (Thread 0x7f30e00fd700 (LWP 6510))

  • #0 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 136
  • #1 _L_lock_1145
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #2 __pthread_mutex_lock
    at pthread_mutex_lock.c line 101
  • #3 g_mutex_lock
    at gthread-posix.c line 208
  • #4 gst_input_selector_get_linked_pad
    at gstinputselector.c line 1760
  • #5 gst_input_selector_query
    at gstinputselector.c line 1810
  • #6 gst_proxy_pad_query_default
    at gstghostpad.c line 158
  • #7 gst_pad_dispatcher
    at gstpad.c line 3706
  • #8 gst_pad_peer_query
    at gstpad.c line 3810
  • #9 gst_stream_synchronizer_query
    at gststreamsynchronizer.c line 152
  • #10 gst_proxy_pad_query_default
    at gstghostpad.c line 158
  • #11 gst_queue_handle_src_query
    at gstqueue.c line 1334
  • #12 gst_proxy_pad_query_default
    at gstghostpad.c line 158
  • #13 gst_pad_peer_query
    at gstpad.c line 3810
  • #14 gst_base_transform_default_query
    at gstbasetransform.c line 1351
  • #15 gst_base_transform_query
    at gstbasetransform.c line 1372
  • #16 gst_audio_resample_query
    at gstaudioresample.c line 1290
  • #17 gst_proxy_pad_query_default
    at gstghostpad.c line 158
  • #18 gst_proxy_pad_query_default
    at gstghostpad.c line 158
  • #19 gst_pad_peer_query
    at gstpad.c line 3810
  • #20 gst_base_transform_default_query
    at gstbasetransform.c line 1351
  • #21 gst_base_transform_query
    at gstbasetransform.c line 1372
  • #22 gst_proxy_pad_query_default
    at gstghostpad.c line 158
  • #23 gst_pad_peer_query
    at gstpad.c line 3810
  • #24 gst_base_sink_query_latency
    at gstbasesink.c line 1160
  • #25 gst_base_audio_sink_query
    at gstbaseaudiosink.c line 469
  • #26 bin_query_latency_fold
    at gstbin.c line 3600
  • #27 gst_iterator_fold
    at gstiterator.c line 549
  • #28 gst_bin_query
    at gstbin.c line 3749
  • #29 bin_query_latency_fold
    at gstbin.c line 3600
  • #30 gst_iterator_fold
    at gstiterator.c line 549
  • #31 gst_bin_query
    at gstbin.c line 3749
  • #32 bin_query_latency_fold
    at gstbin.c line 3600
  • #33 gst_iterator_fold
    at gstiterator.c line 549
  • #34 gst_bin_query
    at gstbin.c line 3749
  • #35 bin_query_latency_fold
    at gstbin.c line 3600
  • #36 gst_iterator_fold
    at gstiterator.c line 549
  • #37 gst_bin_query
    at gstbin.c line 3749
  • #38 bin_query_latency_fold
    at gstbin.c line 3600
  • #39 gst_iterator_fold
    at gstiterator.c line 549
  • #40 gst_bin_query
    at gstbin.c line 3749
  • #41 gst_play_bin_query
    at gstplaybin2.c line 2430
  • #42 gst_bin_do_latency_func
    at gstbin.c line 2424
  • #43 gst_marshal_BOOLEAN__VOID
    at gstmarshal.c line 548
  • #44 g_closure_invoke
    at gclosure.c line 777
  • #45 signal_emit_unlocked_R
    at gsignal.c line 3585
  • #46 g_signal_emit_valist
    at gsignal.c line 3306
  • #47 g_signal_emit
    at gsignal.c line 3352
  • #48 gst_bin_recalculate_latency
    at gstbin.c line 2403
  • #49 gst_bin_change_state_func
    at gstbin.c line 2507
  • #50 gst_pipeline_change_state
    at gstpipeline.c line 484
  • #51 gst_play_bin_change_state
    at gstplaybin2.c line 4233
  • #52 gst_element_change_state
    at gstelement.c line 2764
  • #53 gst_bin_continue_func
    at gstbin.c line 2822
  • #54 g_thread_pool_thread_proxy
    at gthreadpool.c line 309
  • #55 g_thread_proxy
    at gthread.c line 801
  • #56 start_thread
    at pthread_create.c line 304
  • #57 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #58 ??

Thread 1 (Thread 0x7f31096b19c0 (LWP 6483))

  • #0 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 136
  • #1 _L_lock_997
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #2 __pthread_mutex_lock
    at pthread_mutex_lock.c line 82
  • #3 g_static_rec_mutex_lock
    at deprecated/gthread-deprecated.c line 712
  • #4 gst_play_bin_query
    at gstplaybin2.c line 2389
  • #5 gst_element_query_duration
    at gstutils.c line 2336
  • #6 bvw_query_timeout
    at bacon-video-widget-gst-0.10.c line 2242
  • #7 bvw_bus_message_cb
    at bacon-video-widget-gst-0.10.c line 1956
  • #8 g_closure_invoke
    at gclosure.c line 777
  • #9 signal_emit_unlocked_R
    at gsignal.c line 3547
  • #10 g_signal_emit_valist
    at gsignal.c line 3296
  • #11 g_signal_emit
    at gsignal.c line 3352
  • #12 gst_bus_async_signal_func
    at gstbus.c line 1118
  • #13 gst_bus_source_dispatch
    at gstbus.c line 764
  • #14 g_main_dispatch
    at gmain.c line 2515
  • #15 g_main_context_dispatch
    at gmain.c line 3052
  • #16 g_main_context_iterate
    at gmain.c line 3123
  • #17 g_main_context_iterate
    at gmain.c line 3060
  • #18 g_main_context_iteration
    at gmain.c line 3184
  • #19 g_application_run
    at gapplication.c line 1496
  • #20 main
    at totem.c line 280

Quite easy to reproduce actually if you just do next in the playlist (I have vis enabled, might make a difference timing-wise).
Comment 2 Thiago Sousa Santos 2012-06-21 04:31:24 UTC
Created attachment 216897 [details] [review]
inputselector: avoid notify-tags holding lock

unlock before issuing this notification to prevent
deadlocks when other elements reacts to new tags.

Fixes #678220
Comment 3 Sebastian Dröge (slomo) 2012-06-21 07:43:41 UTC
Review of attachment 216897 [details] [review]:

Please push :)
Comment 4 Thiago Sousa Santos 2012-06-21 13:45:03 UTC
a396ba2bde151760b6c5a0ec84266674f501bf74

Pushed