Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 May 2011 23:42:32 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        Kirk McKusick <mckusick@mckusick.com>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: Nasty non-recursive lockmgr panic on softdep only enabled UFS partition when filesystem full
Message-ID:  <BANLkTikAQ6Jz4Jbjxh51iA-cjCYmdx1mSg@mail.gmail.com>
In-Reply-To: <201105040559.p445xEJ5024585@chez.mckusick.com>
References:  <BANLkTik4=O_1PWB2GzGzY=m51dG-Kbhe%2BQ@mail.gmail.com> <201105040559.p445xEJ5024585@chez.mckusick.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 3, 2011 at 10:59 PM, Kirk McKusick <mckusick@mckusick.com> wrot=
e:
>> 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 <yanegomi@gmail.com>
>> To: Jeff Roberson <jeff@freebsd.org>,
>> =A0 =A0 =A0 =A0 Marshall Kirk McKusick <mckusick@mckusick.com>
>> Cc: FreeBSD Current <freebsd-current@freebsd.org>
>>
>> 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-current
> 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.

    I've applied it, rebuilt and installed the kernel, and trying to
repro the case again. Will let you know how things go!
Thanks!
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTikAQ6Jz4Jbjxh51iA-cjCYmdx1mSg>