From owner-freebsd-current@FreeBSD.ORG Fri Aug 12 13:36:49 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 4415F16A420 for ; Fri, 12 Aug 2005 13:36:49 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id A765743D48 for ; Fri, 12 Aug 2005 13:36:48 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Fri, 12 Aug 2005 09:51:40 -0400 From: John Baldwin To: freebsd-current@freebsd.org Date: Fri, 12 Aug 2005 09:16:13 -0400 User-Agent: KMail/1.8 References: <200508101658.09719.jhb@FreeBSD.org> <200508111124.11582.jhb@FreeBSD.org> <20050812121551.GA888@unixpages.org> In-Reply-To: <20050812121551.GA888@unixpages.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508120916.14378.jhb@FreeBSD.org> Cc: Subject: Re: Locking fixes for sf(4) 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: Fri, 12 Aug 2005 13:36:49 -0000 On Friday 12 August 2005 08:15 am, Christian Brueffer wrote: > On Thu, Aug 11, 2005 at 11:24:10AM -0400, John Baldwin wrote: > > On Thursday 11 August 2005 11:00 am, Christian Brueffer wrote: > > > On Wed, Aug 10, 2005 at 04:58:09PM -0400, John Baldwin wrote: > > > > I've fixed up the locking in sf(4) but do not have the hardware to > > > > test the changes. Can someone please test these patches? Thanks. > > > > > > > > http://www.freebsd.org/~jhb/patches/sf_locking.patch > > > > > > Results in a "recursed on non-recursive mutex" panic. Unfortunately > > > the dump looks busted, I'll get a good one tomorrow (can also test the > > > my(4) patch then). > > > > Ok. If you could just get the backtrace from ddb that would probably be > > sufficient. Thanks for testing! > > panic: _mtx_lock_sleep: recursed on non-recursive mutex sf0 @ > /usr/home/build/src/sys/modules/sf/.. > /../pci/if_sf.c:477 > > CPUID = 1 > KDB: enter: panic > [thread pid 220 tid 100072 ] > Stopped at kdb_enter+0x30: leave > db> tr > Tracing pid 220 tid 100072 td 0xc1d63480 > kdb_enter(c079421b,1,c0793681,d8945ab4,c1d63480) at kdb_enter+0x30 > panic(c0793681,c1ad6ab0,c08ed18a,1dd,1dd) at panic+0x14e > _mtx_lock_sleep(c1ac3c4c,c1d63480,0,c08ed18a,1dd) at _mtx_lock_sleep+0x47 > _mtx_lock_flags(c1ac3c4c,0,c08ed18a,1dd,0) at _mtx_lock_flags+0x9c > sf_ifmedia_upd(c1adb800,1000,c08ed18a,4b7,c1ac3c4c) at sf_ifmedia_upd+0x3e > sf_init_locked(c1ac3c4c,0,c08ed18a,4aa,c1adb800) at sf_init_locked+0x4bc > sf_init(c1ac3c00,740,c07a8534,8020690c,c1ac3c00) at sf_init+0x39 > ether_ioctl(c1adb800,8020690c,c1d67e00,c05a7cd1,0) at ether_ioctl+0x67 > sf_ioctl(c1adb800,8020690c,c1d67e00,100,1) at sf_ioctl+0xbb > in_ifinit(c1adb800,c1d67e00,c1cef3d0,0,1) at in_ifinit+0x208 > in_control(c1dfcde8,8040691a,c1cef3c0,c1adb800,c1d63480) at > in_control+0x986 ifioctl(c1dfcde8,8040691a,c1cef3c0,c1d63480,2) at > ifioctl+0x1cd > soo_ioctl(c1d59d80,8040691a,c1cef3c0,c19dca80,c1d63480) at soo_ioctl+0x3ef > ioctl(c1d63480,d8945d04,c,422,3) at ioctl+0x45d > syscall(3b,3b,3b,80beac0,1) at syscall+0x2c0 > Xint0x80_syscall() at Xint0x80_syscall+0x1f > --- syscall (54, FreeBSD ELF32, ioctl), eip = 0x8055473, esp = 0xbfbfe5fc, > ebp = 0xbfbfee68 --- Ah, ok, thanks. This is the first driver I've seen that calls its ifmedia_update routine internally. I'll fix this and update the patch. Thanks! -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org