From owner-freebsd-bugs@FreeBSD.ORG Wed Jul 2 18:10:24 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 12F4137B40D for ; Wed, 2 Jul 2003 18:10:23 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D6D1D43FF5 for ; Wed, 2 Jul 2003 18:10:17 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h631AHUp015808 for ; Wed, 2 Jul 2003 18:10:17 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h631AHNR015807; Wed, 2 Jul 2003 18:10:17 -0700 (PDT) Resent-Date: Wed, 2 Jul 2003 18:10:17 -0700 (PDT) Resent-Message-Id: <200307030110.h631AHNR015807@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Daniel O'Connor" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F4C337B401 for ; Wed, 2 Jul 2003 18:02:37 -0700 (PDT) Received: from chowder.gsoft.com.au (chowder.gsoft.com.au [203.31.81.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB45343F93 for ; Wed, 2 Jul 2003 18:02:35 -0700 (PDT) (envelope-from darius@chowder.gsoft.com.au) Received: from chowder.gsoft.com.au (localhost [127.0.0.1]) by chowder.gsoft.com.au (8.12.9/8.12.9) with ESMTP id h6312Y1Q004641 for ; Thu, 3 Jul 2003 10:32:34 +0930 (CST) (envelope-from darius@chowder.gsoft.com.au) Received: (from darius@localhost) by chowder.gsoft.com.au (8.12.9/8.12.9/Submit) id h6312XBr004640; Thu, 3 Jul 2003 10:32:33 +0930 (CST) Message-Id: <200307030102.h6312XBr004640@chowder.gsoft.com.au> Date: Thu, 3 Jul 2003 10:32:33 +0930 (CST) From: "Daniel O'Connor" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/54049: Sound driver reports device busy and shows non-existant PID in sndstat with artsd X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel O'Connor List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2003 01:10:24 -0000 >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: at io 0xdc00 irq 5 (4p/1r/0v channels duplex) pcm0: port 0xdc00-0xdcff mem 0xf6ffe000-0xf6ffffff irq 5 at device 3.0 on pci2 pcm0: >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: 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: 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: