From owner-freebsd-current@FreeBSD.ORG Wed May 4 06:58:51 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 319CF106564A; Wed, 4 May 2011 06:58:51 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id C36818FC0C; Wed, 4 May 2011 06:58:50 +0000 (UTC) Received: by vxc34 with SMTP id 34so1158771vxc.13 for ; Tue, 03 May 2011 23:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=clVKLWDJI4B2+SIVGFMHn/WFJtJLTCyXbYBNCO9A/JQ=; b=UNslqKxba87e1NJeXABnMUPlA8G6S8PRgjoIn9bbjBcqvr842OQl7tJ3WlarqqCemP +cW+AbQf5wPCfM6bRYUndEofjj02W7H2blPt5g7DX6BcOFFhGwFKdAaXd2eLH3DhkNlp nTY8Hjcc9/LAixELxktlDMHxrTyZcmh8ZULxg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=g3f0yuZA+P8iBbsuoxV2tYN9dnHcZP2Mml38lBVfMBFOo1JzKiJh2aA4R2Z4DiZoTt wXM1FkFBTozB3P7Ls8VzGi8JsONg+thwDtOOTOoMvckIbf6lgdHbAuhz5bQOpXotIEhP L7uVrq5Wdcd738kYNpXZm4XmGgl4OmDY2SFLg= MIME-Version: 1.0 Received: by 10.52.77.6 with SMTP id o6mr907343vdw.168.1304492329723; Tue, 03 May 2011 23:58:49 -0700 (PDT) Received: by 10.220.199.130 with HTTP; Tue, 3 May 2011 23:58:49 -0700 (PDT) In-Reply-To: References: <201105040559.p445xEJ5024585@chez.mckusick.com> Date: Tue, 3 May 2011 23:58:49 -0700 Message-ID: From: Garrett Cooper To: Kirk McKusick Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Current Subject: Re: Nasty non-recursive lockmgr panic on softdep only enabled UFS partition when filesystem full 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: Wed, 04 May 2011 06:58:51 -0000 On Tue, May 3, 2011 at 11:42 PM, Garrett Cooper wrote: > On Tue, May 3, 2011 at 10:59 PM, Kirk McKusick wr= ote: >>> Date: Tue, 3 May 2011 22:40:26 -0700 >>> Subject: Nasty non-recursive lockmgr panic on softdep only enabled UFS >>> =A0partition when filesystem full >>> From: Garrett Cooper >>> To: Jeff Roberson , >>> =A0 =A0 =A0 =A0 Marshall Kirk McKusick >>> Cc: FreeBSD Current >>> >>> Hi Jeff and Dr. McKusick, >>> =A0 =A0 Ran into this panic when /usr ran out of space doing a make >>> universe on amd64/r221219 (it took ~15 minutes for the panic to occur >>> after the filesystem ran out of space -- wasn't quite sure what it was >>> doing at the time): >>> >>> ... >>> >>> =A0 =A0 Let me know what other commands you would like for me to run in= kgdb. >>> Thanks, >>> -Garrett >> >> You did not indicate whether you are running an 8.X system or a 9-curren= t >> system. It would be helpful to know that. > > I've actually been running CURRENT for a few years now, but you're right = -- > I didn't mention that part. > >> Jeff thinks that there may be a potential race in the locking code for >> softdep_request_cleanup. If so, this patch for 9-current should fix it: >> >> Index: ffs_softdep.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- ffs_softdep.c =A0 =A0 =A0 (revision 221385) >> +++ ffs_softdep.c =A0 =A0 =A0 (working copy) >> @@ -11380,7 +11380,8 @@ >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0continue; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0MNT_IUNLOCK(mp); >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (vget(lvp, LK_EXCLUSIVE= | LK_INTERLOCK, curthread)) { >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (vget(lvp, LK_EXCLUSIVE= | LK_NOWAIT | LK_INTERLOCK, >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 curthread)) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0MNT_ILOCK= (mp); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0continue; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} >> >> If you are running an 8.X system, hopefully you will be able to apply it= . > > =A0 =A0I've applied it, rebuilt and installed the kernel, and trying to > repro the case again. Will let you know how things go! Happened again with the change. It's really easy to repro: 1. Get a filesystem with UFS+SU 2. Execute something that does a large number of small writes to a partitio= n. 3. 'dd if=3D/dev/zero of=3DFOO bs=3D10m' on the same partition The kernel will panic with the issue I discussed above. Thanks! -Garrett