From owner-freebsd-current@FreeBSD.ORG Mon May 7 20:12:01 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2BEAE106566B; Mon, 7 May 2012 20:12:01 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 6162C8FC08; Mon, 7 May 2012 20:12:00 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so1819836wgb.31 for ; Mon, 07 May 2012 13:11:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=ltL/qNCS02M8jAGzEL+l+EWAOB9v4O3z7lG5OJDgH8s=; b=x1AcNeYno6P88f+lxW8sYJJbpbKkx2369IbJOkFsbrUnBn8vGNuGJ/JiAUXwohLYCA iIBJtA8d2mEfZZAh0unqkKsFHLSUxlvbb5k0E9cLZE3E5vJULpRgJpvGDkY0r/uvVwzl BegydeYNMghdNux43Su48O0OfZ5IkfOnIZ0dqSUxGyHMxGqEP/CJJQOmiTnSkrYQvtll B2tRwNv8SakrYLHAIfvAg0X6h8UGjoRV8QzmX+b6B34LGPPzmYSUdhl364sYh0RcE5sv SkwqIfU4NhUi+yZQf4VawzsbbMfL5ZM8v/4qHzNZ2rT/HZBB4yiOja7MoSma4H1iDtAF RGvg== Received: by 10.216.135.131 with SMTP id u3mr10373807wei.46.1336421519262; Mon, 07 May 2012 13:11:59 -0700 (PDT) Received: from dft-labs.eu (dft-labs.eu. [80.87.128.179]) by mx.google.com with ESMTPS id du4sm37498734wib.10.2012.05.07.13.11.57 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 May 2012 13:11:57 -0700 (PDT) Date: Mon, 7 May 2012 22:11:53 +0200 From: Mateusz Guzik To: Doug Barton Message-ID: <20120507201153.GA19942@dft-labs.eu> References: <4FA6F324.4080107@FreeBSD.org> <4FA82269.6080406@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4FA82269.6080406@FreeBSD.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: mckusick@freebsd.org, Sergey Kandaurov , freebsd-current Subject: Re: panic, seems related to r234386 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: Mon, 07 May 2012 20:12:01 -0000 On Mon, May 07, 2012 at 12:28:41PM -0700, Doug Barton wrote: > On 05/06/2012 15:19, Sergey Kandaurov wrote: > > On 7 May 2012 01:54, Doug Barton wrote: > >> I got this with today's current, previous (working) kernel is r232719. > >> > >> panic: _mtx_lock_sleep: recursed on non-recursive mutex struct mount mtx > >> @ /frontier/svn/head/sys/kern/vfs_subr.c:4595 > > ... > > > Please try this patch. > > > > Index: fs/ext2fs/ext2_vfsops.c > > =================================================================== > > --- fs/ext2fs/ext2_vfsops.c (revision 235108) > > +++ fs/ext2fs/ext2_vfsops.c (working copy) > > @@ -830,7 +830,6 @@ > > /* > > * Write back each (modified) inode. > > */ > > - MNT_ILOCK(mp); > > loop: > > MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { > > if (vp->v_type == VNON) { > > > > Didn't help, sorry. I put 234385 through some pretty heavy load > yesterday, and everything was fine. As soon as I move up to 234386, the > panic triggered again. So I cleaned everything up, applied your patch, > built a kernel from scratch, and rebooted. It was Ok for a few seconds > after boot, then panic'ed again, I think in a different place, but I'm > not sure because subsequent attempts to fsck the file systems caused new > panics which overwrote the old ones before they could be saved. > Another MNT_ILOCK was hiding few lines below, try this patch: http://student.agh.edu.pl/~mjguzik/patches/ext2fs-ilock.patch I've tested this a bit and I believe this fixes your problem. -- Mateusz Guzik