From owner-freebsd-current@FreeBSD.ORG Mon Jun 27 13:27:48 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 92E0F16A41C for ; Mon, 27 Jun 2005 13:27:48 +0000 (GMT) (envelope-from zazubrik@mail.ru) Received: from mx2.mail.ru (mx2.mail.ru [194.67.23.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 482FE43D53 for ; Mon, 27 Jun 2005 13:27:48 +0000 (GMT) (envelope-from zazubrik@mail.ru) Received: from [195.149.104.100] (port=60557 helo=[10.13.66.7]) by mx2.mail.ru with esmtp id 1DmteN-0001gS-00 for freebsd-current@freebsd.org; Mon, 27 Jun 2005 17:27:47 +0400 Mime-Version: 1.0 (Apple Message framework v730) In-Reply-To: <51A402CE-C1A2-48EB-B0B7-80448B91B422@mail.ru> References: <51A402CE-C1A2-48EB-B0B7-80448B91B422@mail.ru> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <58332786-1C92-40AB-B147-9627D6AAD490@mail.ru> Content-Transfer-Encoding: 7bit From: Artem Ignatiev Date: Mon, 27 Jun 2005 17:27:33 +0400 To: freebsd-current@freebsd.org X-Mailer: Apple Mail (2.730) Subject: Re: lock problems with uaudio full-duplex X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2005 13:27:48 -0000 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@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 @ /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 @ /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 @ /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) @ /usr/src/sys/ dev/sound/pcm/dsp.c 2nd 0xc093dc80 Giant (Giant) @ /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 ---