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 689899 - Deadlock using the xfade backend
Deadlock using the xfade backend
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: playback
unspecified
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-12-08 17:36 UTC by Giovanni Campagna
Modified: 2012-12-15 15:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
xfade: use a recursive mutex for locking the stream (11.46 KB, patch)
2012-12-08 18:04 UTC, Giovanni Campagna
none Details | Review

Description Giovanni Campagna 2012-12-08 17:36:26 UTC
Just updated to Rhythmbox master, using gstreamer 1.0 also master.
The media file is a HTTP streaming server, MP3 content.

info threads

  11   Thread 0x7fc3c8683700 (LWP 28970) "gdbus" 0x00007fc3d54917ed in poll () at ../sysdeps/unix/syscall-template.S:81
  10   Thread 0x7fc3c717f700 (LWP 28971) "dconf worker" 0x00007fc3d54917ed in poll () at ../sysdeps/unix/syscall-template.S:81
  9    Thread 0x7fc3c49da700 (LWP 28972) "gmain" 0x00007fc3d54917ed in poll () at ../sysdeps/unix/syscall-template.S:81
  8    Thread 0x7fc3aeef4700 (LWP 28974) "queue1:src" __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
  7    Thread 0x7fc39d26d700 (LWP 28983) "rhythmdb-thread" pthread_cond_wait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:165
  6    Thread 0x7fc396d50700 (LWP 28990) "threaded-ml" 0x00007fc3d54917ed in poll () at ../sysdeps/unix/syscall-template.S:81
  5    Thread 0x7fc391ce7700 (LWP 28991) "source:src" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:165
  4    Thread 0x7fc3914e6700 (LWP 28992) "silence:src" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:165
  3    Thread 0x7fc390ce5700 (LWP 28993) "queue0:src" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:165
  2    Thread 0x7fc3837fe700 (LWP 28995) "queue2-0:src" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:165
* 1    Thread 0x7fc3cf742a00 (LWP 28967) "rhythmbox" __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
Comment 1 Giovanni Campagna 2012-12-08 17:37:18 UTC
Main thread:


  • #0 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 135
  • #1 _L_lock_1024
    from /lib64/libpthread.so.0
  • #2 __GI___pthread_mutex_lock
    at pthread_mutex_lock.c line 104
  • #3 g_mutex_lock
    at gthread-posix.c line 210
  • #4 link_and_unblock_stream
    at rb-player-gst-xfade.c line 1105
  • #5 actually_start_stream
    at rb-player-gst-xfade.c line 2424
  • #6 rb_player_gst_xfade_bus_cb
    at rb-player-gst-xfade.c line 1855
  • #7 gst_bus_source_dispatch
    at gstbus.c line 773
  • #8 g_main_dispatch
    at gmain.c line 2784
  • #9 g_main_context_dispatch
    at gmain.c line 3288
  • #10 g_main_context_iterate
    at gmain.c line 3359
  • #11 g_main_context_iteration
    at gmain.c line 3420
  • #12 g_application_run
    at gapplication.c line 1620
  • #13 main
    at main.c line 110

Comment 2 Giovanni Campagna 2012-12-08 17:38:31 UTC
queue1 thread:


  • #0 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 135
  • #1 _L_lock_1024
    from /lib64/libpthread.so.0
  • #2 __GI___pthread_mutex_lock
    at pthread_mutex_lock.c line 104
  • #3 g_mutex_lock
    at gthread-posix.c line 210
  • #4 adjust_stream_base_time
    at rb-player-gst-xfade.c line 867
  • #5 stream_src_event_cb
    at rb-player-gst-xfade.c line 2037
  • #6 probe_hook_marshal
    at gstpad.c line 3039
  • #7 g_hook_list_marshal
    at ghook.c line 676
  • #8 do_probe_callbacks
    at gstpad.c line 3130
  • #9 gst_pad_push_event_unchecked
    at gstpad.c line 4500
  • #10 push_sticky
    at gstpad.c line 3285
  • #11 events_foreach
    at gstpad.c line 514
  • #12 check_sticky
    at gstpad.c line 3333
  • #13 gst_pad_push_event
    at gstpad.c line 4635
  • #14 gst_base_transform_sink_eventfunc
    at gstbasetransform.c line 1845
  • #15 gst_pad_send_event_unchecked
    at gstpad.c line 4821
  • #16 gst_pad_push_event_unchecked
    at gstpad.c line 4514
  • #17 push_sticky
    at gstpad.c line 3285
  • #18 events_foreach
    at gstpad.c line 514
  • #19 check_sticky
    at gstpad.c line 3333
  • #20 gst_pad_push_event
    at gstpad.c line 4635
  • #21 gst_queue_push_one
    at gstqueue.c line 1131
  • #22 gst_queue_loop
    at gstqueue.c line 1196
  • #23 gst_task_func
    at gsttask.c line 316
  • #24 g_thread_pool_thread_proxy
    at gthreadpool.c line 309
  • #25 g_thread_proxy
    at gthread.c line 798
  • #26 start_thread
    at pthread_create.c line 308
  • #27 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 114

Comment 3 Giovanni Campagna 2012-12-08 18:04:56 UTC
Created attachment 231040 [details] [review]
xfade: use a recursive mutex for locking the stream

link_and_unblock_stream() is called sometimes holding the lock, and sometimes
not, and it locks again, so to avoid a deadlock one needs a recursive
mutex.
Comment 4 Jonathan Matthew 2012-12-08 22:48:27 UTC
I really dislike recursive mutexes, so I'm going to try to fix this some other way.
Comment 5 Jonathan Matthew 2012-12-15 15:07:37 UTC
Commit 4c6bc10 fixes this.