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 690605 - Rhythmbox, Totem, Clementine, etc. freeze when trying to stop/pause/play songs
Rhythmbox, Totem, Clementine, etc. freeze when trying to stop/pause/play songs
Status: RESOLVED DUPLICATE of bug 700342
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.0.4
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-12-21 13:00 UTC by Matthieu Baerts
Modified: 2013-08-16 10:11 UTC
See Also:
GNOME target: ---
GNOME version: 3.5/3.6


Attachments
A full backtrace of this deadlock (RB and GST 1.0.4) (112.43 KB, text/plain)
2012-12-21 13:00 UTC, Matthieu Baerts
Details
A full backtrace of this crash (Clementine and GST 0.10.36) (109.32 KB, text/plain)
2012-12-21 13:17 UTC, Matthieu Baerts
Details
A full backtrace of this crash (Clementine and GST 0.10.36 without GST-PulseAudio plugin) (117.51 KB, text/plain)
2012-12-21 13:18 UTC, Matthieu Baerts
Details

Description Matthieu Baerts 2012-12-21 13:00:07 UTC
Created attachment 232046 [details]
A full backtrace of this deadlock (RB and GST 1.0.4)

Hello,

Firstly, thank you for developing GStreamer and all other things! :)

I'm using Ubuntu Raring 13.04 with GStreamer 1.0.4 and 0.10.36 and GLib 2.34.3.

It seems that a few apps which use GStreamer 1.0 (Rhythmbox, Totem) and 0.10 (Clementine) freeze when trying to stop/pause/play next/play songs.
It's not hard to reproduce this bug on Ubuntu Raring 13.04 (e.g. by using Daily-LiveCD: http://cdimage.ubuntu.com/daily-live/current/).

This bug has already been reported on Launchpad: https://bugs.launchpad.net/bugs/1092231 .
It seems it's not linked to the bug 670846 because I'm using a newer version of GLib which includes this patch.

I hope it will help you to fix this bug :)
Comment 1 Matthieu Baerts 2012-12-21 13:12:09 UTC
According to the backtrace produced with RB, it seems it crashes in gst_pad_pause_task () => http://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/gstpad.c#n5261

------
  /* wait for task function to finish, this lock is recursive so it does nothing
   * when the pause is called from the task itself */
=>  GST_PAD_STREAM_LOCK (pad);
  GST_PAD_STREAM_UNLOCK (pad);

  return res;
------

About GST_PAD_STREAM_LOCK:

------
   #define GST_PAD_STREAM_LOCK(pad) g_rec_mutex_lock(GST_PAD_GET_STREAM_LOCK(pad))
------

I don't know what 'recursive' means here but it's just a simple pthread_mutex_lock (): http://git.gnome.org/browse/glib/tree/glib/gthread-posix.c#n363

------
    g_rec_mutex_lock (GRecMutex *mutex)
    {
      pthread_mutex_lock (g_rec_mutex_get_impl (mutex));
    }
------

It's not like this deprecated function: g_static_rec_mutex_(un)lock_full () which completely (un)locks the mutex: http://git.gnome.org/browse/glib/tree/glib/deprecated/gthread-deprecated.c#n769
Comment 2 Matthieu Baerts 2012-12-21 13:17:40 UTC
Created attachment 232048 [details]
A full backtrace of this crash (Clementine and GST 0.10.36)
Comment 3 Matthieu Baerts 2012-12-21 13:18:17 UTC
Created attachment 232049 [details]
A full backtrace of this crash (Clementine and GST 0.10.36 without GST-PulseAudio plugin)
Comment 4 Tim-Philipp Müller 2012-12-21 14:05:43 UTC
Let's ignore 0.10 stuff.

I will try and reproduce with the latest rhythmbox. I'm using totem with 1.0 (git master) all the time and haven't run into this yet. How do you reproduce it? Just load a bunch of music files and hit the next button as soon as they start playing?
Comment 5 Matthieu Baerts 2012-12-21 14:34:18 UTC
Thank you for this quick answer!

> I'm using totem with 1.0 (git master) all the time and haven't run into this yet.

It was not easy to reproduce it with Totem but I was able to reproduce it after ~2min of stress tests (play/pause/next)


> How do you reproduce it? Just load a bunch of music files and hit the next button as soon as they start playing?

Yes but it seems it's easier to reproduce it by only hitting play/pause button quickly or not. Note that it's easier to reproduce it by using keyboard shortkeys (to hit play/pause/next quickly) and gdb to slow down the application.


> Let's ignore 0.10 stuff.
Ok but it's strange to have this bug with 0.10 too, no?
Comment 6 Tim-Philipp Müller 2012-12-22 13:15:15 UTC
I can reproduce some issues with rhythmbox git master and GStreamer git master.

I've seen a crash like this:

(lt-rhythmbox:3589): GStreamer-CRITICAL **: gst_buffer_map_range: assertion `GST_IS_BUFFER (buffer)' failed
Segmentation fault

(Haven't seen that in gdb yet)

And I just got a deadlock (UI freeze) like this:

^C
Program received signal SIGINT, Interrupt.
__lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
136	../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: No such file or directory.
(gdb) thread apply all bt

Thread 41 (Thread 0x7fffc73cf700 (LWP 3754))

  • #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 /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./glib/gthread-posix.c line 208
  • #4 connect_pad
    at gstdecodebin2.c line 1916
  • #5 analyze_new_pad
    at gstdecodebin2.c line 1662
  • #6 pad_added_cb
    at gstdecodebin2.c line 2464
  • #7 caps_notify_cb
    at gstdecodebin2.c line 2578
  • #8 g_closure_invoke
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c line 777
  • #9 signal_emit_unlocked_R
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3551
  • #10 g_signal_emit_valist
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3300
  • #11 g_signal_emit
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3356
  • #12 g_object_dispatch_properties_changed
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gobject.c line 1041
  • #13 gst_object_dispatch_properties_changed
    at gstobject.c line 439
  • #14 g_object_notify_by_spec_internal
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gobject.c line 1133
  • #15 g_object_notify_by_pspec
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gobject.c line 1234
  • #16 gst_pad_store_sticky_event
    at gstpad.c line 4429
  • #17 gst_pad_push_event
    at gstpad.c line 4626
  • #18 gst_tag_demux_element_find
    at gsttagdemux.c line 1178
  • #19 gst_tag_demux_element_loop
    at gsttagdemux.c line 1232
  • #20 gst_task_func
    at gsttask.c line 316
  • #21 g_thread_pool_thread_proxy
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./glib/gthreadpool.c line 309
  • #22 g_thread_proxy
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./glib/gthread.c line 801
  • #23 start_thread
    at pthread_create.c line 304
  • #24 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #25 ??

Thread 1 (Thread 0x7ffff7f979c0 (LWP 3710))

  • #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 gst_pad_stop_task
    at gstpad.c line 5308
  • #4 gst_pad_activate_mode
    at gstpad.c line 1060
  • #5 gst_pad_set_active
    at gstpad.c line 949
  • #6 activate_pads
    at gstelement.c line 2679
  • #7 gst_iterator_fold
    at gstiterator.c line 614
  • #8 iterator_activate_fold_with_resync
    at gstelement.c line 2699
  • #9 gst_element_pads_activate
    at gstelement.c line 2743
  • #10 gst_element_change_state_func
    at gstelement.c line 2807
  • #11 gst_tag_demux_change_state
    at gsttagdemux.c line 1481
  • #12 gst_element_change_state
    at gstelement.c line 2594
  • #13 gst_element_set_state_func
    at gstelement.c line 2550
  • #14 gst_decode_chain_free_internal
    at gstdecodebin2.c line 2777
  • #15 gst_decode_chain_free
    at gstdecodebin2.c line 2846
  • #16 gst_decode_bin_change_state
    at gstdecodebin2.c line 4212
  • #17 gst_element_change_state
    at gstelement.c line 2594
  • #18 gst_element_set_state_func
    at gstelement.c line 2550
  • #19 gst_bin_element_set_state
    at gstbin.c line 2308
  • #20 gst_bin_change_state_func
    at gstbin.c line 2610
  • #21 gst_uri_decode_bin_change_state
    at gsturidecodebin.c line 2579
  • #22 gst_element_change_state
    at gstelement.c line 2594
  • #23 gst_element_set_state_func
    at gstelement.c line 2550
  • #24 gst_bin_element_set_state
    at gstbin.c line 2308
  • #25 gst_bin_change_state_func
    at gstbin.c line 2610
  • #26 gst_pipeline_change_state
    at gstpipeline.c line 468
  • #27 gst_play_bin_change_state
    at gstplaybin2.c line 4150
  • #28 gst_element_change_state
    at gstelement.c line 2594
  • #29 gst_element_set_state_func
    at gstelement.c line 2550
  • #30 start_state_change
    at rb-player-gst.c line 383
  • #31 impl_play
    at rb-player-gst.c line 854
  • #32 rb_shell_player_open_location
    at rb-shell-player.c line 1681
  • #33 rb_shell_player_set_playing_entry
    at rb-shell-player.c line 1796
  • #34 rb_shell_player_do_next_internal
    at rb-shell-player.c line 2217
  • #35 rb_shell_player_do_next
    at rb-shell-player.c line 2260
  • #36 rb_shell_player_cmd_next
    at rb-shell-player.c line 2285
  • #37 g_closure_invoke
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c line 777
  • #38 signal_emit_unlocked_R
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3551
  • #39 g_signal_emit_valist
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3300
  • #40 g_signal_emit
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3356
  • #41 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #42 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #43 _g_closure_invoke_va
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c line 840
  • #44 g_signal_emit_valist
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3211
  • #45 g_signal_emit
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3356
  • #46 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #47 _g_closure_invoke_va
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c line 840
  • #48 g_signal_emit_valist
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3211
  • #49 g_signal_emit
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3356
  • #50 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #51 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #52 _g_closure_invoke_va
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c line 840
  • #53 g_signal_emit_valist
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3211
  • #54 g_signal_emit
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3356
  • #55 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #56 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #57 gtk_main_do_event
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #58 ??
    from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
  • #59 g_main_dispatch
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./glib/gmain.c line 2539
  • #60 g_main_context_dispatch
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./glib/gmain.c line 3075
  • #61 g_main_context_iterate
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./glib/gmain.c line 3146
  • #62 g_main_context_iteration
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./glib/gmain.c line 3207
  • #63 g_application_run
    at /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./gio/gapplication.c line 1499
  • #64 main
    at main.c line 110

Comment 7 Sebastian Dröge (slomo) 2013-08-16 09:37:38 UTC
Is this still a problem with latest git master? I fixed similar looking problems some time ago
Comment 8 Sebastian Dröge (slomo) 2013-08-16 09:54:00 UTC
Probably a duplicate of #700342

*** This bug has been marked as a duplicate of bug 700342 ***
Comment 9 Matthieu Baerts 2013-08-16 10:11:25 UTC
Yes I forgot to update the status because this bug seems to be fixed now, thank you :-)