From owner-freebsd-current@FreeBSD.ORG Wed Aug 10 05:54:53 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 779BC16A49E for ; Wed, 10 Aug 2005 05:54:30 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3948E44958 for ; Tue, 9 Aug 2005 23:10:35 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with ESMTP id DF8CB46B08; Tue, 9 Aug 2005 19:10:34 -0400 (EDT) Date: Wed, 10 Aug 2005 00:13:52 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Gordon Bergling In-Reply-To: <42F0F43C.2040902@0xfce3.net> Message-ID: <20050810001154.N1953@fledge.watson.org> References: <42F0F43C.2040902@0xfce3.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-current@freebsd.org Subject: Re: [LOR] bpf.c:403 and if_fxp.c:2388 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: Wed, 10 Aug 2005 05:54:54 -0000 On Wed, 3 Aug 2005, Gordon Bergling wrote: > > I am gettings this LOR while using tcpdump on /dev/fxp0. I am found a > similar looking entry at the LOR database, but the Line Numbers are > different and the stacktrace is different. Hmm. That's odd. Normally, this is the correct lock order, with the global bpf lock before interface locks, for precisely the case below (BPF calls into the interface code during detach). This suggests that the real bug is that there's a situation where the fxp lock is being held inappropriately over a call into an attach routine in if_fxp or the like. What version of src/sys/dev/fxp/if_fxp.c are you running with on this system? Robert N M Watson > > So I think it should be posted. (?) > > lock order reversal > 1st 0xc07380a0 bpf global lock (bpf global lock) @ /usr/src/sys/net/bpf.c:403 > 2nd 0xc1604018 fxp0 (network driver) @ /usr/src/sys/dev/fxp/if_fxp.c:2388 > KDB: stack backtrace: > kdb_backtrace(0,ffffffff,c06fa8d8,c06f9730,c06c0b24) at kdb_backtrace+0x29 > witness_checkorder(c1604018,9,c06776a8,954) at witness_checkorder+0x564 > _mtx_lock_flags(c1604018,0,c06776a8,954) at _mtx_lock_flags+0x5b > fxp_ioctl(c1646800,80206910,d1e729e0,1,c0684a3d) at fxp_ioctl+0x4a > ifpromisc(c1646800,0) at ifpromisc+0xc4 > bpf_detachd(c2955600) at bpf_detachd+0xa8 > bpfclose(c294fa00,3,2000,c1bd9900,c06e98c0) at bpfclose+0x83 > devfs_close(d1e72aa4) at devfs_close+0x2f1 > VOP_CLOSE_APV(c06b9640,d1e72aa4) at VOP_CLOSE_APV+0x7e > vn_close(c210cbb0,3,c2acab80,c1bd9900,c0682492) at vn_close+0x8b > vn_closefile(c1786d38,c1bd9900,d1e72b5c,c04d8470,c1786d38) at > vn_closefile+0xca > devfs_close_f(c1786d38,c1bd9900) at devfs_close_f+0xf > fdrop_locked(c1786d38,c1bd9900,c1533394,0,c0682492) at fdrop_locked+0x88 > fdrop(c1786d38,c1bd9900,d1e72ba8,c0514bd0,c0682492) at fdrop+0x24 > closef(c1786d38,c1bd9900) at closef+0x35f > fdfree(c1bd9900,c1bd8d94,0,c068902a,6ac) at fdfree+0x473 > exit1(c1bd9900,100,d1e72d30,c064eb4f,c1bd9900) at exit1+0x3f6 > exit1(c1bd9900,d1e72d04,1,9,296) at exit1 > syscall(3b,3b,3b,809f45a,bfbfe8dc) at syscall+0x22f > Xint0x80_syscall() at Xint0x80_syscall+0x1f > --- syscall (1, FreeBSD ELF32, sys_exit), eip = 0x28237383, esp = 0xbfbfe83c, > ebp = 0xbfbfe858 --- > > Information about the notebook can be found at > http://generic.0xfce3.net/laptop/ > > regards, > > Gordon > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >