[gstreamer-bugs] [Bug 614545] New: gstalsasrc mixer task spins 100% CPU when USB sound card is removed
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Thu Apr 1 01:01:03 PDT 2010
https://bugzilla.gnome.org/show_bug.cgi?id=614545
GStreamer | gst-plugins-base | 0.10.28
Summary: gstalsasrc mixer task spins 100% CPU when USB sound
card is removed
Classification: Desktop
Product: GStreamer
Version: 0.10.28
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-plugins-base
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: sam.revitch at gmail.com
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME target: ---
GNOME version: ---
I'm trying to use GStreamer 0.10.28 to play audio from a USB FM radio to the
desktop sound card. The FM radio provides a USB audio class interface
supported by the ALSA snd-usb-audio driver. I can use the following command to
set up a pipeline to listen to the radio:
gst-launch-0.10 alsasrc device="plughw:1" \! audioconvert \! alsasink
Unfortunately, if the sound card is unplugged while such a pipeline is running,
attempts to stop the pipeline will generate the following type of console
message:
** (gst-launch-0.10:15447): CRITICAL **: Resources for ring buffer 0x16ec1b0
still acquired
If this is done from an application which remains running after the pipeline is
stopped, it will be left with a thread spinning at 100% CPU.
It would appear that the ring buffer is not being released because the alsasrc
plugin's gst_alsasrc_unprepare() function is returning failure. This is
apparently caused by ENODEV errors from snd_pcm_drop() and snd_pcm_hw_free(),
which it may benefit from ignoring.
Secondarily, the task_monitor_alsa() task function is calling poll() on a file
descriptor that has become bad, and poll() isn't waiting. The task is not
being shut down because the ring buffer release failed, and the task function
contains no logic to throttle itself or shut itself down in this case, so it
spins at 100% CPU.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Gstreamer-bugs
mailing list