From owner-freebsd-current@FreeBSD.ORG Wed Dec 19 02:29:19 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 218D616A46B; Wed, 19 Dec 2007 02:29:19 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from webaccess-cl.virtdom.com (webaccess-cl.virtdom.com [216.240.101.25]) by mx1.freebsd.org (Postfix) with ESMTP id D10D813C4D1; Wed, 19 Dec 2007 02:29:18 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from [192.168.1.107] (cpe-24-94-75-93.hawaii.res.rr.com [24.94.75.93]) (authenticated bits=0) by webaccess-cl.virtdom.com (8.13.6/8.13.6) with ESMTP id lBJ2T7EU064674; Tue, 18 Dec 2007 21:29:13 -0500 (EST) (envelope-from jroberson@chesapeake.net) Date: Tue, 18 Dec 2007 16:30:01 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Ed Maste In-Reply-To: <20071218221018.GA71002@sandvine.com> Message-ID: <20071218162919.B899@desktop> References: <20071218194312.GB40055@sandvine.com> <20071218101806.J899@desktop> <20071218221018.GA71002@sandvine.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: bzeeb+freebsd+lor@zabbadoz.net, freebsd-current@freebsd.org Subject: Re: LOR kqueue / sleep mtxpool for LOR list 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, 19 Dec 2007 02:29:19 -0000 On Tue, 18 Dec 2007, Ed Maste wrote: > On Tue, Dec 18, 2007 at 10:20:21AM -1000, Jeff Roberson wrote: > >> On Tue, 18 Dec 2007, Ed Maste wrote: >> >>> I just saw this LOR during startup of an application while testing >>> 8-CURRENT on a dev box. I've done no investigation yet. >>> >>> FreeBSD TPC-D13-08.phaedrus 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Mon Dec 17 >>> 16:27:54 EST 2007 >>> emaste@bsd-build3.phaedrus:/d2/emaste/HEAD/obj/d2/emaste/HEAD/src/sys/GENERIC i386 >>> >>> lock order reversal: >>> 1st 0xc42b7580 kqueue (kqueue) @ >>> /d2/emaste/HEAD/src/sys/kern/kern_event.c:1397 >>> 2nd 0xc3ece8e0 sleep mtxpool (sleep mtxpool) @ >>> /d2/emaste/HEAD/src/sys/kern/sys_generic.c:1255 >>> [...] >> >> Thanks, this is interesting. The mtxpool should always be the leaf. The >> opposite order is the bug. Can you add them to the static order list and >> tell me where the reverse order is observed? > > After adding it to the list this is what I got: Ah this is sort of ridiculous. Thanks. I will fix this within a week or two. Jeff > > Mounting NFS file systems:lock order reversal: > 1st 0xc3ece280 sleep mtxpool (sleep mtxpool) @ /d2/emaste/HEAD/src/sys/kern/kern_event.c:993 > 2nd 0xc4320d80 kqueue (kqueue) @ /d2/emaste/HEAD/src/sys/kern/kern_event.c:1001 > KDB: stack backtrace: > db_trace_self_wrapper(c0b08831,e683daac,c079cabe,c0b0ada3,c4320d80,...) at db_trace_self_wrapper+0x26 > kdb_backtrace(c0b0ada3,c4320d80,c0b01d5d,c0b01d5d,c0b01a4d,...) at kdb_backtrace+0x29 > witness_checkorder(c4320d80,9,c0b01a4d,3e9,7db,...) at witness_checkorder+0x6de > _mtx_lock_flags(c4320d80,0,c0b01a4d,3e9,0,...) at _mtx_lock_flags+0xbc > kqueue_acquire(c445eaa0,4,e683db5c,c0b04436,f0,...) at kqueue_acquire+0x72 > kern_kevent(c445eaa0,4,1,1,e683dc60,...) at kern_kevent+0x47 > kevent(c445eaa0,e683dcfc,18,c0b0bacf,c0bb92e8,...) at kevent+0x19b > syscall(e683dd38) at syscall+0x2b3 > Xint0x80_syscall() at Xint0x80_syscall+0x20 > --- syscall (363, FreeBSD ELF32, kevent), eip = 0x2813dafb, esp = 0xbfbfd28c, ebp = 0xbfbfd388 --- > > -Ed >