From owner-freebsd-smp Wed Feb 20 20:32:43 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by hub.freebsd.org (Postfix) with ESMTP id 6CE7537B400 for ; Wed, 20 Feb 2002 20:32:41 -0800 (PST) Received: (qmail 15063 invoked from network); 21 Feb 2002 04:32:39 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([65.91.152.92]) (envelope-sender ) by mail5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 21 Feb 2002 04:32:39 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020220224600.GK12136@elvis.mu.org> Date: Wed, 20 Feb 2002 23:32:38 -0500 (EST) From: John Baldwin To: Alfred Perlstein Subject: Re: Lock order reversal Cc: FreeBSD-SMP@FreeBSD.Org, Bob Van Valzah Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 20-Feb-02 Alfred Perlstein wrote: > * John Baldwin [020220 14:31] wrote: >> >> On 17-Feb-02 Bob Van Valzah wrote: >> > Sorry if this isn't the right place to report this. Maybe I should >> > sendpr this kind of >> > thing? Sorry, I don't know the protocol. >> > >> > I shutdown my laptop (running -CURRENT as of Tuesday afternoon) and saw >> > this: >> > >> > syncing disks.. 6 5 4 3 2 2 1 1 >> > done >> > lock order reversal >> > 1st 0xc03a9d40 allproc @ /usr/src/sys/kernvfs_syscalls.c:452 >> > 2nd 0xc2880234 filedesc structure @ /usr/src/sys/kern/vfs_syscalls.c:457 >> > Uptime: 1d14h10m48s >> > /dev/vmmon: Module vmmon: unloaded >> > >> > The operating system has halted. >> > Please press any key to reboot. >> >> Yes, this one is a bit tough to fix. It will probably involve some changes >> to >> selwakeup() and possibly struct selinfo as well. The pfind() in selwakeup() >> is >> what ends up being the root cause here. > > Where is selwakeup being called with a filedesc held? It's not that direct. :) It's more like filedesc is sometimes held when a bpf lock is acquired, and the allproc lock is acquired by pfind in selwakeup when bpf is held sometimes. So it's not a direct lock order relationship. My preferred solution is to remove the pfind from selwakeup if possible, but that isn't entirely trivial to do. > -Alfred -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message