Bug 26430

Summary: [sound] -CURRENT panics on cat /dev/dsp or cat /dev/audio
Product: Base System Reporter: davidt <davidt>
Component: kernAssignee: sound
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   

Description davidt 2001-04-08 13:00:02 UTC
	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
Comment 1 davidt 2001-04-08 14:01:58 UTC
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
Comment 2 dd freebsd_committer freebsd_triage 2001-04-29 03:16:30 UTC
Responsible Changed
From-To: freebsd-bugs->cg

Over to sound guy.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2004-09-09 20:30:34 UTC
Responsible Changed
From-To: cg->sound

With permission, reassign to mailing list alias.
Comment 4 Tilman Keskinoz freebsd_committer freebsd_triage 2005-06-14 13:31:56 UTC
State Changed
From-To: open->closed

A lot changed in CURRENT since 2001. 

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