From owner-freebsd-current@FreeBSD.ORG Sat Aug 4 05:44:35 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2256D16A419; Sat, 4 Aug 2007 05:44:35 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id B743813C428; Sat, 4 Aug 2007 05:44:34 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.1/8.14.1) with ESMTP id l745iXPi031606; Sat, 4 Aug 2007 09:44:33 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Sat, 4 Aug 2007 09:44:33 +0400 (MSD) From: Dmitry Morozovsky To: Pawel Jakub Dawidek In-Reply-To: <20070803164108.C569@woozle.rinet.ru> Message-ID: <20070804094047.V8449@woozle.rinet.ru> References: <20070802155317.X50347@woozle.rinet.ru> <20070803102019.GG37984@garage.freebsd.pl> <20070803164108.C569@woozle.rinet.ru> X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (woozle.rinet.ru [0.0.0.0]); Sat, 04 Aug 2007 09:44:33 +0400 (MSD) Cc: kib@freebsd.org, current@freebsd.org, howard0su@gmail.com Subject: Re: contemporary -current panic: locking against myself 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: Sat, 04 Aug 2007 05:44:35 -0000 On Fri, 3 Aug 2007, Dmitry Morozovsky wrote: DM> PJD> Here you can find two patches, which may or may not fix your problem. DM> PJD> The first one is actually only to improve debug. DM> PJD> DM> PJD> This patch adds all vnode flags to the output, because I believe you DM> PJD> have VI_OWEINACT set, but not printed: DM> PJD> DM> PJD> http://people.freebsd.org/~pjd/patches/vfs_subr.c.4.patch DM> PJD> DM> PJD> The problem here is that vm_object_reference() calls vget() without any DM> PJD> lock flag and vget() locks vnode exclusively when the VI_OWEINACT flag DM> PJD> is set. vget() should probably be fixed too, but jeff@ opinion is that DM> PJD> it shouldn't happen in this case, so this may be tmpfs bug. DM> PJD> DM> PJD> The patch below fixes some locking problems in tmpfs: DM> PJD> DM> PJD> http://people.freebsd.org/~pjd/patches/tmpfs.patch DM> PJD> DM> PJD> The problems are: DM> PJD> - tmpfs_root() should honour 'flags' argument, and not always lock the DM> PJD> vnode exclusively, DM> PJD> - tmpfs_lookup() should lock vnode using cnp->cn_lkflags, and not always DM> PJD> do it exclusively, DM> PJD> - in ".." case when we unlock directory vnode to avoid deadlock, we DM> PJD> should relock it using the same type of lock it was locked before and DM> PJD> not always relock it exclusively, DM> PJD> DM> PJD> Note, that this patch wasn't even compiled tested. DM> DM> Well, it at least compiled and booted on i386. Test release run is in progress DM> now, i'll followup with the results. Good news: It fills 4G of RAM + 2G of swap, bailed out but not paniced. If the error is not fixed, it at least well masked now. Please consider your patch for commit. Thanks! Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------