From davidt@yadt.co.uk  Sun Apr  8 04:50:55 2001
Return-Path: <davidt@yadt.co.uk>
Received: from mail.yadt.co.uk (yadt.demon.co.uk [158.152.4.134])
	by hub.freebsd.org (Postfix) with SMTP id DF58437B423
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  8 Apr 2001 04:50:52 -0700 (PDT)
	(envelope-from davidt@yadt.co.uk)
Received: (qmail 19796 invoked from network); 8 Apr 2001 11:50:46 -0000
Received: from gattaca.local.yadt.co.uk (HELO mail.gattaca.yadt.co.uk) (qmailr@10.0.0.2)
  by xfiles.yadt.co.uk with SMTP; 8 Apr 2001 11:50:46 -0000
Received: (qmail 1316 invoked by uid 1000); 8 Apr 2001 11:50:41 -0000
Message-Id: <20010408115041.1315.qmail@gattaca.yadt.co.uk>
Date: 8 Apr 2001 11:50:41 -0000
From: davidt@yadt.co.uk
Reply-To: davidt@yadt.co.uk
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: -CURRENT panics on cat /dev/dsp or cat /dev/audio
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         26430
>Category:       kern
>Synopsis:       [sound] -CURRENT panics on cat /dev/dsp or cat /dev/audio
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sound
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 08 05:00:02 PDT 2001
>Closed-Date:    Tue Jun 14 12:33:11 GMT 2005
>Last-Modified:  Tue Jun 14 12:33:11 GMT 2005
>Originator:     David Taylor
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD gattaca.yadt.co.uk 5.0-CURRENT FreeBSD 5.0-CURRENT #13: Sun Apr 8 03:17:36 BST 2001 davidt@gattaca.yadt.co.uk:/usr/obj/usr/src/sys/GATTACA i386

$ cat /dev/sndstat
FreeBSD Audio Driver (newpcm) Apr  8 2001 02:51:47
Installed devices:
pcm0: <Creative EMU10K1> at io 0x10a0 irq 10 (4p/3r channels duplex)

>Description:

	attempting to read from /dev/audio and /dev/dsp causes the
	kernel to panic.

panic: mutex pcm0:record:0 not owned at /usr/src/sys/kernl/kern_sync.c:404
Debugger("panic")
Stopped at	Debugger+0x45:	pushl %ebx
db> call dumpsys

dumping to dev ad0s4b, offset 584197
dump ata0: resetting devices .. panic: mutex sched lock recursed at /usr/src/sys/kernl/kern_sync.c:855
Uptime: 9m30s
Dump already in progress, bailing...
Automatic reboot in 15 seconds - press a key on the console to abort
--> Press a key on the console to reboot <--
Rebooting..

	... Unfortunately, since it refuses to give a dump, I can't get
	a backtrace.. and I forgot to try to get a trace from ddb..
	I'll attempt to copy that down next time, and add it to this PR,
	oops.

	(On the plus side, at least current doesn't display the odd
	 left channel only behaviour in 26304) 
>How-To-Repeat:

	$ cat /dev/audio
>Fix:
>Release-Note:
>Audit-Trail:

From: David Taylor <davidt@yadt.co.uk>
To: FreeBSD-gnats-submit@freebsd.org
Cc:  
Subject: Re: kern/26430: -CURRENT panics on cat /dev/dsp or cat /dev/audio
Date: Sun, 8 Apr 2001 14:01:58 +0100

 On Sun, 08 Apr 2001, davidt@yadt.co.uk wrote:
 > >Description:
 > 
 > 	attempting to read from /dev/audio and /dev/dsp causes the
 > 	kernel to panic.
 > 
 
 Here's a copy of a trace from ddb:
 
 panic: mutex pcm0:record:0 not owned at /usr/src/sys/kernl/kern_sync.c:404
 Debugger("panic")
 Stopped at	Debugger+0x45:	pushl %ebx
 db> trace
 Debugger(c02df07b) at Debugger+0x45
 panic(c02de2a8,c0e55838,c02df840,194,4) at panic+0x70
 _mtx_assert(c1658c80,9,c02df840,194) at _mtx_assert+0x4e
 msleep(c1663a00,c1658c80,14c,c02d6685,1) at msleep+2a3
 chn_sleep(c0e55800,c02d6685,1,4,0) at chn_sleep+0x21
 chn_read(c0e55800,cecc4ef0,cecc4ef0,cecc4ef0,c0e55800) at chn_read+0x164
 dsp_read(c164c800,0,cecc4ef0,20000,cece9500) at dsp_read+0x172
 sndread(c036b50c,cecc4ef0,20000,c036b50c,0) at sndread+0x5b
 spec_read(cecc4e80,cecc4e94,c01ec3f7,cecc4e80,cecc4ef0) at spec_read+0x74
 spec_vnoperate(cecc4e80,cecc4ef0,cecc4f80,400,0) at spec_vnoperate+0x15
 vn_read(c1c57a00,cecc4ef0,c2096200,0,cec1cfe0) at vn_read+0x17
 dofileread(cec1cfe0,c1c57a00,3,805c000,400) at dofileread+0xb2
 read(cec1cfe0,cecc4f80,bfbffb60,3,1) at read+0x3b
 syscall(2f,2f,2f,1,3) at syscall+0x59d
 syscall_with_err_pushed() at syscall_with_err_pushed+0x1b
 db> call dumpsys
 
 dumping to dev ad0s4b, offset 584197
 dump ata0: resetting devices .. panic: mutex sched lock recursed at /usr/src/sys/kernl/kern_sync.c:855
 Uptime: 1h13m41s
 Dump already in progress, bailing...
 Automatic reboot in 15 seconds - press a key on the console to abort
 --> Press a key on the console to reboot <--
 Rebooting..
 
 -- 
 David Taylor
 davidt@yadt.co.uk
Responsible-Changed-From-To: freebsd-bugs->cg 
Responsible-Changed-By: dd 
Responsible-Changed-When: Sat Apr 28 19:16:30 PDT 2001 
Responsible-Changed-Why:  
Over to sound guy. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26430 
Responsible-Changed-From-To: cg->sound 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Sep 9 19:30:34 GMT 2004 
Responsible-Changed-Why:  
With permission, reassign to mailing list alias. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26430 
State-Changed-From-To: open->closed 
State-Changed-By: arved 
State-Changed-When: Tue Jun 14 12:31:56 GMT 2005 
State-Changed-Why:  
A lot changed in CURRENT since 2001. 

I can't reproduce the problem on a recent CURRENT, so this is 
most likely fixed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26430 
>Unformatted:
