Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Aug 2010 12:25:37 -0300
From:      Renato Botelho <rbgarga@gmail.com>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        Peter Holm <pho@freebsd.org>, Michael Butler <imb@protected-networks.net>, Jeff Roberson <jroberson@jroberson.net>, current@freebsd.org
Subject:   Re: softupdate with journal panic
Message-ID:  <AANLkTik8P3=9fAv-AfUxwDLpJ4=uMQfeQf-jF6k=8PnC@mail.gmail.com>
In-Reply-To: <20100823211257.GI2396@deviant.kiev.zoral.com.ua>
References:  <4C7011B9.4020902@protected-networks.net> <20100822132104.GA7300@x2.osted.lan> <20100823211257.GI2396@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 23, 2010 at 6:12 PM, Kostik Belousov <kostikbel@gmail.com> wrot=
e:
>
> On Sun, Aug 22, 2010 at 03:21:04PM +0200, Peter Holm wrote:
> > On Sat, Aug 21, 2010 at 01:49:45PM -0400, Michael Butler wrote:
> > > While updating sysutils/coreutils port on -current as of this morning
> > > (SVN r211550), I noted a panic during the directory rename config tes=
t.
> > >
> >
> > Your problem seems identical to this report:
> >
> > http://docs.freebsd.org/cgi/mid.cgi?AANLkTinPjiOV21kDLZYV5WScrhLMN7DY8E=
8jVHWPU5mC
> >
> I believe that dotdotremref in this case is legitimately NULL. With this
> assumption, the following patch would help.
>
> diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
> index b666c0f..65e5255 100644
> --- a/sys/ufs/ffs/ffs_softdep.c
> +++ b/sys/ufs/ffs/ffs_softdep.c
> @@ -6770,7 +6794,8 @@ cancel_diradd(dap, dirrem, jremref, dotremref, dotd=
otremref)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mkdir->md_jaddref =3D NULL=
;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (mkdir->md_state & MKDI=
R_PARENT) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (cancel=
_jaddref(jaddref, NULL,
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &di=
rrem->dm_jwork) =3D=3D 0) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &di=
rrem->dm_jwork) =3D=3D 0 &&
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 dot=
dotremref !=3D NULL) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0free_jremref(dotdotremref);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0dotdotremref =3D NULL;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}

I was having a kernel panic trying to build coreutils, at configure
time it make some tests with rename() and system crashed. It was
just happening on the box i'm using SUJ. After apply this patch
everything went fine. Thanks!

--
Renato Botelho



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik8P3=9fAv-AfUxwDLpJ4=uMQfeQf-jF6k=8PnC>