GNOME Bugzilla – Bug 405451
[alsasink] deadlocks when disconnecting USB Sounddevice
Last modified: 2007-02-15 11:59:53 UTC
That bug has been opened on https://launchpad.net/ubuntu/+source/rhythmbox/+bug/81307 "Binary package hint: rhythmbox Rhythmbox hangs when disconnecting the USB Audio device I'm currently playing music on .. I know, that's nothing one does all the day - but I'm switching often between PCI Sound and USB Sound. Rhythmbox perhaps should detect error's with the playback and stop the current playback. priority: low ... I'm using Ubuntu Edgy ... http://librarian.launchpad.net/6195384/gdb-rhytmbox.txt Backtrace with debug symbols installied ..."
This looks like an alsasink bug, so re-assigning to GStreamer. Just to confirm, do you see the same thing when using Totem or any other GStreamer-based media player?
unfortunately I'm not able to say totem to play using my usb device .. it just plays sound via my build-in soundcard, even if I selected "USB Audio" for all types of output in gnome's audio preferences - so I can't verify if it's a gstreamer-bug :(
Looks at first glance like alsasink is trying to post an error message with the object lock held (which is going to deadlock, since both gst_element_message_new_*() and gst_element_post_message() will try to take the lock as well). Most likely a GStreamer bug.
indeed, in gst_base_audio_sink_change_state() we take the object lock: ... case GST_STATE_CHANGE_PLAYING_TO_PAUSED: /* need to take the lock so we don't interfere with an * async play */ GST_OBJECT_LOCK (sink); /* ringbuffer cannot start anymore */ gst_ring_buffer_may_start (sink->ringbuffer, FALSE); gst_ring_buffer_pause (sink->ringbuffer); GST_OBJECT_UNLOCK (sink); break; ...
* ext/alsa/gstalsasink.c: (gst_alsasink_reset): Ignore errors in reset, these are not fatal. They also grab the element lock which is already taking when this function is called. Fixes #405451.