Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 80982 - Stop/Restart of ALSA kills all apps with open audio devices
Summary: Stop/Restart of ALSA kills all apps with open audio devices
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-06 07:07 UTC by Alexander Kaiser
Modified: 2005-08-18 06:21 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
alsasound.patch (alsasound.patch,972 bytes, patch)
2005-05-27 16:24 UTC, Magnus Lidbom
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kaiser 2005-02-06 07:07:24 UTC
When playing a song with Xine or with Amarok using the Xine-Engine and Alsa is stopped or restarted using "/etc/init.d/alsasound stop/restart" Xine/Amarok crashes without any error message. It just says "Get
Comment 1 Alexander Kaiser 2005-02-06 07:07:24 UTC
When playing a song with Xine or with Amarok using the Xine-Engine and Alsa is stopped or restarted using "/etc/init.d/alsasound stop/restart" Xine/Amarok crashes without any error message. It just says "Getötet" (killed). This is very annoying when using software-suspend when alsa is stopped before the system suspends.

Reproducible: Always
Steps to Reproduce:
1. Play a song with Xine (or Amarok using xine-Engine)
2. Open xterm and execute "/etc/init.d/alsasound restart"

Actual Results:  
=> Xine/Amarok crashes

Expected Results:  
It should have given an error message or just stopped the playing of the song

Versions used:
- xine-ui-0.99.1
- xine-lib-1_rc8-r1
- amarok-1.2_beta4

Portage 2.0.51-r15 (default-linux/x86/2005.0, gcc-3.4.3,
glibc-2.3.4.20040808-r1, 2.6.10-gentoo-r6 i686)
=================================================================
System uname: 2.6.10-gentoo-r6 i686 AMD Athlon(tm) XP 1700+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Oct 21 2004, 14:29:50)]
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.7.9-r1, 1.6.3, 1.5, 1.4_p6, 1.9.4, 1.8.5-r3
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2, 2.6.8.1-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo
ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo
http://ftp.easynet.nl/mirror/gentoo/
http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
LANG="de_DE@euro"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="x86 3dnow X aalib alsa apache2 apm arts avi berkdb bitmap-fonts cdparanoia
cdr crypt cups directfb dvd encode esd f77 fam fftw flac foomaticdb fortran gd
gdbm gif gimpprint gpm gstreamer gtk gtk2 guile hal imagemagick imlib ipv6 java
jce jpeg junit kde kdeenablefinal libg++ libwww lirc mad mikmod mmx motif
mozilla mp3 mpeg ncurses nls nntp nptl oggvorbis opengl oss pam pdflib perl png
python qt quicktime readline sasl scanner sdl slang speex spell sqlite sse ssl
svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts usb xine xml xml2
xmms xprint xv zlib linguas_de"
Unset:  ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS
Comment 2 Ian Monroe 2005-03-31 00:59:57 UTC
can you confirm with 1.2.3? 

I just restarted alsasound with xine/amaroK and it was fine... in fact the sound didn't even stop, so I think it couldn't have actually unloaded the modules. Which isn't surprising given that (in my experience) you can't unload modules in use.
Comment 3 Alexander Kaiser 2005-04-02 09:21:19 UTC
No, it's the same with 1.2.3. I play a song with amarok-1.2.3/xinesind (xine-lib-1.0) and enter "/etc/init.d/alsasound stop" on konsole. The playing stops and the modules are unloaded.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-04-18 06:51:32 UTC
Are you using dmix?

I have a similar problem, but is not related only to xine, restarting alsasound makes everything audio-related to be killed (kmix, kaffeine, amarok using gstreamer).
I think this is something related to the way alsa uses to setup their settings (so maybe it should be assigned to sound).
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-05-06 16:39:02 UTC
Assign to sound as it's probably alsa stuff, but still waiting for news about dmix.
Comment 6 Alexander Kaiser 2005-05-07 09:05:32 UTC
Yes, I am using dmix but it makes no difference if using it or not. When I am stopping alsa the player (for example xine) is killed.
Comment 7 Jan Brinkmann (RETIRED) gentoo-dev 2005-05-27 15:06:25 UTC
which alsa version do you use? please test with 1.0.9 and report back, thanks
Comment 8 Magnus Lidbom 2005-05-27 16:21:30 UTC
(In reply to comment #1)
> can you confirm with 1.2.3? 
> 
> I just restarted alsasound with xine/amaroK and it was fine... in fact the
sound didn't even stop, so I think it couldn't have actually unloaded the
modules. Which isn't surprising given that (in my experience) you can't unload
modules in use.

Hmmm, I had a look at that. Sure enough, /etc/init.d/alsasound doesn't manage to
remove the snd modules on my box. I played around with it a bit and modules
appear to be reappearing from the dead after being rmmodded. I made some changes
that seem to enough to reliably kill them off once and for all. I'll attach the
patch in a sec.
Comment 9 Magnus Lidbom 2005-05-27 16:24:05 UTC
Created attachment 59983 [details, diff]
alsasound.patch

Attempts to ensure that stop and reload actually manages to rmmod all the snd
modules.
Comment 10 Magnus Lidbom 2005-05-27 16:28:58 UTC
(In reply to comment #6)
> which alsa version do you use? please test with 1.0.9 and report back, thanks

I just tried with 1.0.9 using the modified alsasound script from previous
comment.  Amarok crashes.
Comment 11 Magnus Lidbom 2005-05-27 17:00:06 UTC
I must have had blinders on for real while messing with the alsasound script. 
Seems that it's the terminate function in the script that kills processes
accessing sound devices.
Comment 12 Dan 2005-07-28 12:25:55 UTC
This happens with xmms too, I believe its an alsa error 
Comment 13 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-08-18 06:21:47 UTC
I don't really think we can restart alsa (so removing and readding modules) 
without killing the processes holding the devices. 
 
Closing as CANTFIX for now.