Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jul 2003 10:32:33 +0930 (CST)
From:      "Daniel O'Connor" <doconnor@gsoft.com.au>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/54049: Sound driver reports device busy and shows non-existant PID in sndstat with artsd
Message-ID:  <200307030102.h6312XBr004640@chowder.gsoft.com.au>
Resent-Message-ID: <200307030110.h631AHNR015807@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         54049
>Category:       kern
>Synopsis:       Sound driver reports device busy and shows non-existant PID in sndstat with artsd
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 02 18:10:17 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Daniel O'Connor
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
>Environment:
System: FreeBSD chowder.gsoft.com.au 4.8-STABLE FreeBSD 4.8-STABLE #7: Wed Jun 25 20:29:38 CST 2003 darius@chowder.dons.net.au:/usr/src/sys/compile/CHOWDER i386

pcm0: <ESS Technology Maestro3> at io 0xdc00 irq 5 (4p/1r/0v channels duplex)

pcm0: <ESS Technology Maestro3> port 0xdc00-0xdcff mem 0xf6ffe000-0xf6ffffff irq 5 at device 3.0 on pci2
pcm0: <SigmaTel STAC9721/9723 ac97 codec>

>Description:
When restarting artsd to apply new changes, the sound driver appears to get confused and
reports a PID using the sound devices when that PID does not exist. Attempts to open the
sound devices result in EBUSY.

>How-To-Repeat:
- Install KDE :)
- Login, run artsd.
- /dev/sndstat shows arts using the device as expected.
- Play music.
- Run the 'Sound System' control centre item
- Toggle an option so that it will let you apply changes. Hit apply.
- Repeatedly cat /dev/sndstat and watch a new PID appear and use the device.
- Listen to the sound judder, then stop.
- Two dialogs pop up saying artsd cannot use the sound device as it's busy.
- cat /dev/sndstat again and note the PID is the same as previous.
- Run ps - the PID using the sound driver doesn't exist.

chowder 10:12] ~ >sysctl hw.snd
hw.snd.targetirqrate: 32
hw.snd.report_soft_formats: 1
hw.snd.verbose: 2
hw.snd.maxautovchans: 0
hw.snd.pcm0.buffersize: 4096
hw.snd.pcm0.vchans: 0
hw.snd.pcm0.hwvol_step: 5
hw.snd.pcm0.hwvol_mixer: vol

[chowder 10:13] ~ >cat /dev/sndstat
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: <ESS Technology Maestro3> at io 0xdc00 irq 5 (4p/1r/0v channels duplex)
        [pcm0:play:0]: spd 44100, fmt 0x10000010, flags 00007030, pid 4404
	interrupts 2217, underruns 0, ready 57344
	{userland} -> feeder_root(0x10000010) -> {hardware}
	[pcm0:play:1]: spd 0, fmt 0x00000000/0x00000008, flags 00000000
	interrupts 0, underruns 0, ready 0
	{userland} -> feeder_root(0x00000000) -> {hardware}
	[pcm0:play:2]: spd 0, fmt 0x00000000/0x00000008, flags 00000000
	interrupts 0, underruns 0, ready 0
	{userland} -> feeder_root(0x00000000) -> {hardware}
	[pcm0:play:3]: spd 0, fmt 0x00000000/0x00000008, flags 00000000
	interrupts 0, underruns 0, ready 0
	{userland} -> feeder_root(0x00000000) -> {hardware}
	[pcm0:record:0]: spd 44100, fmt 0x10000010, flags 00007030, pid 4404
	interrupts 2217, overruns 0, hfree 4096, sfree 57344
	{hardware} -> feeder_root(0x10000010) -> {userland}

[chowder 10:13] ~ >ps -lawwwp 4404
  UID   PID  PPID CPU PRI NI   VSZ  RSS WCHAN  STAT  TT       TIME COMMAND
   1007  4404   416   0   2  0  8048 6140 poll   S     ??    0:01.15 artsd -F 14 -S 4096 -d -n -s 5 -m artsmessage -l 3 -f
													
[ restart artsd ]

[chowder 10:14] ~ >cat /dev/sndstat
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: <ESS Technology Maestro3> at io 0xdc00 irq 5 (4p/1r/0v channels duplex)
        [pcm0:play:0]: spd 44100, fmt 0x10000010, flags 00000000
        interrupts 0, underruns 0, ready 0
        {userland} -> feeder_root(0x10000010) -> {hardware}
        [pcm0:play:1]: spd 44100, fmt 0x10000010, flags 00007030, pid 4424
        interrupts 15, underruns 0, ready 224
        {userland} -> feeder_root(0x10000010) -> {hardware}
        [pcm0:play:2]: spd 0, fmt 0x00000000/0x00000008, flags 00000000
        interrupts 0, underruns 0, ready 0
        {userland} -> feeder_root(0x00000000) -> {hardware}
        [pcm0:play:3]: spd 0, fmt 0x00000000/0x00000008, flags 00000000
        interrupts 0, underruns 0, ready 0
        {userland} -> feeder_root(0x00000000) -> {hardware}
        [pcm0:record:0]: spd 44100, fmt 0x10000010, flags 00007020, pid 4424
        interrupts 15, overruns 0, hfree 4096, sfree 5312
        {hardware} -> feeder_root(0x10000010) -> {userland}

[chowder 10:16] ~ >ps -lawwwp 4424
  UID   PID  PPID CPU PRI NI   VSZ  RSS WCHAN  STAT  TT       TIME COMMAND

[chowder 10:17] ~ >ps -axw| grep art
  399  ??  I      0:00.01 /bin/sh /usr/local/bin/startkde
 4427  ??  S      0:09.70 artsd -F 14 -S 4096 -d -n -s 5 -m artsmessage -l 3 -f

[ Here is is running with the null driver ]

[chowder 10:16] ~ >fstat /dev/dsp0
USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W NAME

>Fix:

The vchans remain unbusy, so I can use those as a work around, or reboot.
(Although the record channel remains glued busy)


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307030102.h6312XBr004640>