Subject: kern/22788: esound completely freezes system
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jmmv@menta.net>
List: netbsd-bugs
Date: 09/14/2003 18:48:20
>Number:         22788
>Category:       kern
>Synopsis:       esound completely freezes system
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 14 16:49:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6ZB
>Organization:
Julio M. Merino Vidal <jmmv@menta.net>
The NetBSD Project - http://www.NetBSD.org/
>Environment:
	
	
System: NetBSD dawn.local 1.6ZB NetBSD 1.6ZB (DAWN) #0: Sun Sep 14 17:32:28 CEST 2003 jmmv@dawn.local:/home/NetBSD/obj/home/NetBSD/src/sys/arch/i386/compile/DAWN i386
Architecture: i386
Machine: i386
>Description:
	The esound daemon, installed from pkgsrc/audio/esound, is able to
	completely freeze the system; you can't even enter ddb, nor switch
	virtual consoles, nor anything.  The system does not respond at all.

	As esound can be run by any user, and as they usually have access to
	the sound device, this means that they can freeze the system at will.

	The following is some kernel information that might be related (don't
	know if this is a device specific problem or something more generic):

	-----
	auvia0 at pci0 dev 17 function 5: VIA VT8235 AC'97 Audio (rev 0x50)
	auvia0: interrupting at irq 9
	auvia0: ac97: Analog Devices AD1980 codec; headphone, 20 bit DAC, no 3D stereo
	auvia0: ac97: ext id 3c7<AMAP,LDAC,SDAC,CDAC,SPDIF,DRA,VRA>
	audio0 at auvia0: full duplex, mmap, independent
	-----

	I tried to debug this issue a bit, and the problem seems to be in
	what esd_send_file() does.  Note that I can be completely wrong...

	Another problem that may be related to this: if you run an esd
	application like 'esdplay' without 'esd' itself running, it will try
	to fall back on the default output device (OSS).  But when it does,
	it says "/dev/audio: device busy", but I'm completely sure there is
	nothing working with /dev/audio at that moment (i.e., after a system
	reboot).  Running mpg123 (for example) afterwards works fine.
	Note that this may be a problem with esd itself, though...

>How-To-Repeat:
	Get a WAV file and issue the following commands:
	$ esd &
	$ esdplay file.wav
	System freezed.  Hit reset button.
>Fix:
	Unknown.
>Release-Note:
>Audit-Trail:
>Unformatted: