From owner-freebsd-stable@FreeBSD.ORG Mon Dec 18 18:14:51 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C2E5916A4FE for ; Mon, 18 Dec 2006 18:14:51 +0000 (UTC) (envelope-from sven@dmv.com) Received: from smtp-gw-cl-d.dmv.com (smtp-gw-cl-d.dmv.com [216.240.97.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F57943CBD for ; Mon, 18 Dec 2006 18:14:29 +0000 (GMT) (envelope-from sven@dmv.com) Received: from mail-gw-cl-b.dmv.com (mail-gw-cl-b.dmv.com [216.240.97.39]) by smtp-gw-cl-d.dmv.com (8.12.10/8.12.10) with ESMTP id kBIHTrJX093800; Mon, 18 Dec 2006 12:29:53 -0500 (EST) (envelope-from sven@dmv.com) Received: from lanshark.dmv.com (lanshark.dmv.com [216.240.97.46]) by mail-gw-cl-b.dmv.com (8.12.9/8.12.9) with ESMTP id kBIHTm8s038001; Mon, 18 Dec 2006 12:29:48 -0500 (EST) (envelope-from sven@dmv.com) From: Sven Willenberger To: Kostik Belousov In-Reply-To: <20061215212040.GG23698@deviant.kiev.zoral.com.ua> References: <20061205.004323.78708386.hrs@allbsd.org> <20061204160949.GM35681@deviant.kiev.zoral.com.ua> <20061205.123805.59655403.hrs@allbsd.org> <1166194879.6317.11.camel@lanshark.dmv.com> <20061215181548.GA58555@xor.obsecurity.org> <1166209936.6317.21.camel@lanshark.dmv.com> <20061215192958.GA86926@xor.obsecurity.org> <20061215212040.GG23698@deviant.kiev.zoral.com.ua> Content-Type: text/plain Date: Mon, 18 Dec 2006 12:33:20 -0500 Message-Id: <1166463200.11562.5.camel@lanshark.dmv.com> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.48 on 216.240.97.42 X-Scanned-By: MIMEDefang 2.48 on 216.240.97.39 Cc: stable@freebsd.org, Kris Kennaway Subject: Re: Not panic in nfsd (Re: panic in nfsd on 6.2-RC1) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Dec 2006 18:14:51 -0000 On Fri, 2006-12-15 at 23:20 +0200, Kostik Belousov wrote: > On Fri, Dec 15, 2006 at 02:29:58PM -0500, Kris Kennaway wrote: <> > > > > > FWIW, I do see the following appearing in the /var/log/messages: > > > ufs_rename: fvp == tvp (can't happen) > > > about once or twice a day, but cannot correlate those to lockup. Now > > > that I have enabled the options mentioned above in the kernel, I am > > > seeing some LOR issues: > > > > > > kernel: lock order reversal: > > > kernel: 1st 0xffffff00c3bab200 kqueue (kqueue) @ /usr/src/sys/kern/kern_event.c:1547 > > > kernel: 2nd 0xffffff0005bb6078 struct mount mtx (struct mount mtx) @ /usr/src/sys/ufs/ufs/ufs_vnops.c:138 > > > > OK, this is interesting, so let's proceed from here. > > > > Kris > > Try this. > > Index: ufs/ufs/ufs_vnops.c > =================================================================== > RCS file: /usr/local/arch/ncvs/src/sys/ufs/ufs/ufs_vnops.c,v > retrieving revision 1.283 > diff -u -r1.283 ufs_vnops.c > --- ufs/ufs/ufs_vnops.c 6 Nov 2006 13:42:09 -0000 1.283 > +++ ufs/ufs/ufs_vnops.c 15 Dec 2006 21:19:51 -0000 > @@ -133,19 +133,15 @@ > { > struct inode *ip; > struct timespec ts; > - int mnt_locked; > > ip = VTOI(vp); > - mnt_locked = 0; > - if ((vp->v_mount->mnt_flag & MNT_RDONLY) != 0) { > - VI_LOCK(vp); > + VI_LOCK(vp); > + if ((vp->v_mount->mnt_flag & MNT_RDONLY) != 0) > goto out; > + if ((ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE)) == 0) { > + VI_UNLOCK(vp); > + return; > } > - MNT_ILOCK(vp->v_mount); /* For reading of mnt_kern_flags. */ > - mnt_locked = 1; > - VI_LOCK(vp); > - if ((ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE)) == 0) > - goto out_unl; > > if ((vp->v_type == VBLK || vp->v_type == VCHR) && !DOINGSOFTDEP(vp)) > ip->i_flag |= IN_LAZYMOD; > @@ -172,10 +168,7 @@ > > out: > ip->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_UPDATE); > - out_unl: > VI_UNLOCK(vp); > - if (mnt_locked) > - MNT_IUNLOCK(vp->v_mount); > } > > /* Patch applied cleanly (offset 6 lines), make buildworld, make kernel, reboot, make installworld, etc. kernel: lock order reversal: kernel: 1st 0xffffff00b9181800 kqueue (kqueue) @ /usr/src/sys/kern/kern_event.c:1547 kernel: 2nd 0xffffff00c16030d0 vnode interlock (vnode interlock) @ /usr/src/sys/ufs/ufs/ufs_vnops.c:132