From owner-freebsd-current@FreeBSD.ORG Tue Nov 23 19:11:35 2004 Return-Path: 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 7819616A4CE for ; Tue, 23 Nov 2004 19:11:35 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0610443D5F for ; Tue, 23 Nov 2004 19:11:35 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.13.1/8.13.1) with ESMTP id iANJ9kO8094138; Tue, 23 Nov 2004 14:09:47 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)iANJ9kPD094135; Tue, 23 Nov 2004 19:09:46 GMT (envelope-from robert@fledge.watson.org) Date: Tue, 23 Nov 2004 19:09:46 +0000 (GMT) From: Robert Watson X-Sender: robert@fledge.watson.org To: "M. Warner Losh" In-Reply-To: <20041123.120420.118628298.imp@bsdimp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: Known LoR? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Tue, 23 Nov 2004 19:11:35 -0000 On Tue, 23 Nov 2004, M. Warner Losh wrote: > Noticed this has startted popping up when I do a ispell-buffer in emacs. > Anybody know what's going on with it? Looks like it's somewhat Poul-Henning's fault :-). The pipe mutex isn't needed over the call to fsetown(), so you can just PIPE_UNLOCK(mpipe) before calling fsetown (make sure to get both uses) in the ioctl code before jumping to the end. The sigio uses its own mutexes to protect sigio data, and the reference to the pipe is still held by the caller. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research . > > Warner > > malloc(M_WAITOK) of "32", forcing M_NOWAIT with the following non-sleepable locks held: > exclusive sleep mutex pipe mutex r = 0 (0xc1d272d8) locked @ kern/sys_pipe.c:1263 > KDB: stack backtrace: > kdb_backtrace(1,1,1,20,c1045540) at kdb_backtrace+0x29 > witness_warn(5,0,c0621990,c0623a84,c06663e0) at witness_warn+0x19a > uma_zalloc_arg(c1045540,0,2) at uma_zalloc_arg+0x41 > malloc(14,c063ac00,2,c1d27180,80047476) at malloc+0xae > fsetown(fffffc88,c1d27214,0,0,80047476) at fsetown+0x32 > pipe_ioctl(c206f000,80047476,c1bb1640,c205f080,c1d48c00) at pipe_ioctl+0x11a > ioctl(c1d48c00,e6a37d14,3,0,206) at ioctl+0x370 > syscall(2f,2f,bfbf002f,bfbfdd28,7) at syscall+0x213 > Xint0x80_syscall() at Xint0x80_syscall+0x1f > --- syscall (54, FreeBSD ELF32, ioctl), eip = 0x284b210b, esp = 0xbfbfdc7c, ebp = 0xbfbfdc98 --- > lock order reversal > 1st 0xc1d272d8 pipe mutex (pipe mutex) @ kern/sys_pipe.c:1263 > 2nd 0xc06626c0 proctree (proctree) @ kern/kern_descrip.c:881 > KDB: stack backtrace: > kdb_backtrace(0,ffffffff,c0668298,c0668338,c063edac) at kdb_backtrace+0x29 > witness_checkorder(c06626c0,1,c060ae84,371) at witness_checkorder+0x54c > _sx_slock(c06626c0,c060ae7b,371,c205f080) at _sx_slock+0x50 > fsetown(fffffc88,c1d27214,0,0,80047476) at fsetown+0x6b > pipe_ioctl(c206f000,80047476,c1bb1640,c205f080,c1d48c00) at pipe_ioctl+0x11a > ioctl(c1d48c00,e6a37d14,3,0,206) at ioctl+0x370 > syscall(2f,2f,bfbf002f,bfbfdd28,7) at syscall+0x213 > Xint0x80_syscall() at Xint0x80_syscall+0x1f > --- syscall (54, FreeBSD ELF32, ioctl), eip = 0x284b210b, esp = 0xbfbfdc7c, ebp = 0xbfbfdc98 --- > _______________________________________________ > 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" >