Re: 5.2-BETA dsp.c duplicate lock

From: Maxime Henrion <mux_at_freebsd.org>
Date: Mon, 1 Dec 2003 15:20:22 +0100
Jesse Guardiani wrote:
> Jesse Guardiani wrote:
> 
> > I get this every time I `startx`. I didn't see it in
> > the archive either:
> > 
> > 
> > acquiring duplicate lock of same type: "pcm channel"
> >  1st pcm0:record:0 _at_ /usr/src/sys/dev/sound/pcm/dsp.c:144
> >  2nd pcm0:virtual:0 _at_ /usr/src/sys/dev/sound/pcm/dsp.c:146
> > Stack backtrace:
> > backtrace(c089b7e5,c3c96a54,c0a8f35a,92,200246) at backtrace+0x17
> > witness_lock(c3c6aa80,8,c0a8f35a,92,20000002) at witness_lock+0x672
> > _mtx_lock_flags(c3c6aa80,0,c0a8f35a,92,c4) at _mtx_lock_flags+0xba
> > getchns(c3d07700,e473faf0,e473faf4,30000000,c3b86980) at getchns+0x1b5
> > dsp_poll(c3d07700,c4,c403e640,c097fce0,0) at dsp_poll+0x46
> > spec_poll(e473fb48,e473fb68,c06d600c,e473fb48,c0937ca0) at spec_poll+0x180
> > spec_vnoperate(e473fb48,c0937ca0,c438db2c,c4,c4361a80) at
> > spec_vnoperate+0x18 vn_poll(c4599110,c4,c4361a80,c403e640,c4361a80) at
> > vn_poll+0x3c pollscan(c403e640,e473fbd8,3,3e1,18) at pollscan+0xb3
> > poll(c403e640,e473fd14,c08b631d,3ee,3) at poll+0x252
> > syscall(2f,2f,2f,ffffffff,bfbfe748) at syscall+0x2c0
> > Xint0x80_syscall() at Xint0x80_syscall+0x1d
> > --- syscall (209), eip = 0x2869322f, esp = 0xbfbfe70c, ebp = 0xbfbfe768
> > ---
> > 
> 
> I this a known LOR? Or do I need to submit a pr?

This isn't a LOR at all.  Could you please try the attached patch?  It
should fix your problem.

To the sound guys : I believe it's expected that the pcm code will
sometimes acquire several channels lock at once, but I am not 100% sure.
If it's not, this patch isn't a fix but a workaround.

Cheers,
Maxime

Received on Mon Dec 01 2003 - 05:20:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:32 UTC