Nasty non-recursive lockmgr panic on softdep only enabled UFS partition when filesystem full

Kirk McKusick mckusick at mckusick.com
Wed May 4 06:35:42 UTC 2011


> Date: Tue, 3 May 2011 22:40:26 -0700
> Subject: Nasty non-recursive lockmgr panic on softdep only enabled UFS
>  partition when filesystem full
> From: Garrett Cooper <yanegomi at gmail.com>
> To: Jeff Roberson <jeff at freebsd.org>,
>         Marshall Kirk McKusick <mckusick at mckusick.com>
> Cc: FreeBSD Current <freebsd-current at freebsd.org>
> 
> Hi Jeff and Dr. McKusick,
>     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):
> 
> ...
> 
>     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-current
system. It would be helpful to know that.

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
===================================================================
--- ffs_softdep.c	(revision 221385)
+++ ffs_softdep.c	(working copy)
@@ -11380,7 +11380,8 @@
 				continue;
 			}
 			MNT_IUNLOCK(mp);
-			if (vget(lvp, LK_EXCLUSIVE | LK_INTERLOCK, curthread)) {
+			if (vget(lvp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK,
+			    curthread)) {
 				MNT_ILOCK(mp);
 				continue;
 			}

If you are running an 8.X system, hopefully you will be able to apply it.

	Kirk McKusick


More information about the freebsd-current mailing list