Re: lock problems with uaudio full-duplex

From: Artem Ignatiev <zazubrik_at_mail.ru>
Date: Mon, 27 Jun 2005 17:27:33 +0400
On 22.06.2005, at 16:08, Artem Ignatiev wrote:

> Hi,
> I'm trying to get usb sound working in full-duplex, but still no  
> success.
> Once it worked (on 5.3 with patches from appropriate PRs), and then  
> it began to fail.
> I've tried to use that at 5.4, then at 6.0-CURRENT - that, with  
> GENERIC kernel produced some interesting kernel output (on 5.3 and  
> 5.4 I didn't used KDB, WITNESS and INVARIANTS).
>
> The machine is cvsupped just before build, and `uname -a` produces:
> FreeBSD pager.int.connecto.tv 6.0-CURRENT FreeBSD 6.0-CURRENT #1:  
> Tue Jun 14 16:43:54 MSD 2005     root_at_pager.int.connecto.tv:/usr/ 
> obj/usr/src/sys/GENERIC  i386
>
> I've got following:
>
> Jun 14 18:56:03 pager kernel: Sleeping on "usbsyn" with the  
> following non-sleepable locks held:
> kernel: exclusive sleep mutex pcm0:record:0 (pcm record channel) r  
> = 0 (0xc2494840) locked _at_ /usr/src/sys/modules/sound/sound/../../../ 
> dev/sound/pcm/dsp.c:145
>
> Jun 14 18:56:03 pager kernel: malloc(M_WAITOK) of "512", forcing  
> M_NOWAIT with the following non-sleepable locks held:
> Jun 14 18:56:03 pager kernel: exclusive sleep mutex pcm0:record:0  
> (pcm record channel) r = 0 (0xc2494840) locked _at_ /usr/src/sys/ 
> modules/sound/sound/../../../dev/sound/pcm/dsp.c:145
>
> Jun 14 18:56:07 pager kernel: Sleeping on "usbdly" with the  
> following non-sleepable locks held:
> Jun 14 18:56:07 pager kernel: exclusive sleep mutex pcm0:record:0  
> (pcm record channel) r = 0 (0xc2494840) locked _at_ /usr/src/sys/ 
> modules/sound/sound/../../../dev/sound/pcm/dsp.c:363

another thing:
lock order reversal
  1st 0xc2483200 pcm0:record:0 (pcm record channel) _at_ /usr/src/sys/ 
dev/sound/pcm/dsp.c
  2nd 0xc093dc80 Giant (Giant) _at_ /usr/src/sys/kern/kern_sync.c:236
KDB: stack backtrace:
kdb_backtrace(0, ffffffff, c094d9e0, c094f088, c08d8424) at  
kdb_backtrace+0x29
witness_checkorder(c093dc80, 9, c087161e, ec) at witness_checkorder 
+0x564
_mtx_lock_flags(c093dc80, 0, c087161e, ec) at _mtx_lock_flags+0x5b
msleep(c28a2200, 0, 4c, c086787a, 0) at msleep+0x386
usbd_transfer(c28a2200, e745eae8, c05ec4f5, c28a2200, 262) at  
usbd_transfer+0x151
usbd_sync_transfer(c28a2200, 262, 10, e745eae0, c2481bb8) at  
usbd_sync_transfer+0x11
usbd_do_request_flags_pipe(c2482000,c2481e80,e745eb40, 0, 0) at  
usbd_do_request_flags_pipe+0x5d
usbd_do_request_flags(c2482000, e745eb40, 0, 0, 0) at  
usbd_do_request_flags+0x20

usbd_do_request(c2482000, e745eb40, 0, 10b01, 2) at usbd_do_request+0x1a
usbd_set_interface(c2481bb8,1) at usbd_set_interface+0x75
uaudio_chan_open(c242e000, c242e29c) at uaudio_chan_open+0x68
uaudio_trigger_input(c2481e00) at uaudio_trigger_input+0x56
ua_chan_trigger(c2485c90,c24818ac,1) at ua_chan_trigger+0x53
chn_trigger(c2481700,0) at chn_start+0xcf
chn_read(c2481700,e745ec78,c2481700,c2481780,0) at chn_read+0x3d
dsp_read(c2479100,e345ec78,0,1e0,c2479100) at dsp_read+0x8b
devfs_read_f(c282ce10,e745ec78,c298a400,0,c28a7480) at devfs_read_f+0x87
dofileread(c28a7480,c282ce10,1b,8641000,1e0) at dofileread+0xad
read(c28a7480,e745ed04,3,0,286)at read+0x3b
syscall(3b,3b,3b,8641200,1b) at syscall+0x22f
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (3, FreeBSD ELF32, read), eip 0x2887f67b, esp =  
0xbeff4cfc, ebp = 0xbeff4d28 ---
Received on Mon Jun 27 2005 - 11:27:48 UTC

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