From owner-freebsd-current Sun Mar 17 13:14:34 2002 Delivered-To: freebsd-current@freebsd.org Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by hub.freebsd.org (Postfix) with ESMTP id 84F2F37B400; Sun, 17 Mar 2002 13:14:25 -0800 (PST) Received: (from jake@localhost) by k6.locore.ca (8.11.6/8.11.6) id g2HLLga78665; Sun, 17 Mar 2002 16:21:42 -0500 (EST) (envelope-from jake) Date: Sun, 17 Mar 2002 16:21:42 -0500 From: Jake Burkholder To: Alfred Perlstein Cc: Robert Watson , Munehiro Matsuda , tanimura@r.dl.itc.u-tokyo.ac.jp, phk@FreeBSD.ORG, hitmaster2k@yahoo.com, current@FreeBSD.ORG, smp@FreeBSD.ORG Subject: Re: -current lock warning... Message-ID: <20020317162142.J52298@locore.ca> References: <20020317163953.GY4857@elvis.mu.org> <20020317171722.GZ4857@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020317171722.GZ4857@elvis.mu.org>; from bright@mu.org on Sun, Mar 17, 2002 at 09:17:22AM -0800 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Apparently, On Sun, Mar 17, 2002 at 09:17:22AM -0800, Alfred Perlstein said words to the effect of; > * Robert Watson [020317 09:08] wrote: > > > > On Sun, 17 Mar 2002, Alfred Perlstein wrote: > > > > > * Munehiro Matsuda [020317 06:36] wrote: > > > > > > > > PS. I got another message that happend when I ^C'ed a buildworld earlier, > > > > with same kernel. May be it should go to Alfred Perlstein? > > > > > > > > lock order reversal > > > > 1st 0xc198eec0 pipe mutex @ ../../../kern/sys_pipe.c:779 > > > > 2nd 0xc0367fe0 Giant @ ../../../i386/i386/trap.c:716 > > > > > > I think there's a place where the pipe can fault on an address while > > > copying, I'll take a look at this. > > > > Are there any assertions that should be in place for copyin/copyout > > requring fault handling? It sounds like somewhere we need to assert that > > Giant is held... > > No, you need to assert that no other mutex other than Giant is held. > > It would be nice... :) You can do this like at the bottom of syscall and trap, with witness_list(). It'll even print out what the other locks are and where they were acquired. But yeah, if you're going to access pageable memory in kernel mode you pretty much have to have no other locks held. Good work on pipe locking btw. Jake To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message