Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2009 22:08:07 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Jaakko Heinonen <jh@saunalahti.fi>
Cc:        7ogcg7g02@sneakemail.com, freebsd-current@freebsd.org
Subject:   Re: panic: Bad link elm, nfsd related?
Message-ID:  <20090324200807.GK31897@deviant.kiev.zoral.com.ua>
In-Reply-To: <20090324180437.GA952@a91-153-125-115.elisa-laajakaista.fi>
References:  <20090323140820.GA37093@zeeb.org> <20090324180437.GA952@a91-153-125-115.elisa-laajakaista.fi>

next in thread | previous in thread | raw e-mail | index | archive | help

--utPK4TBebyzZxMrE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Mar 24, 2009 at 08:04:38PM +0200, Jaakko Heinonen wrote:
> On 2009-03-23, Matthew West wrote:
> > After 1-2 weeks, the system will panic with the following:
> >=20
> > ----------
> > panic: Bad link elm 0xffffff0011febc00 next->prev !=3D elm
>=20
> It looks like an attempt to remove xprt twice from tail queue due to
> race. Does this patch make any difference?
>=20
> %%%
> Index: sys/rpc/svc.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
> --- sys/rpc/svc.c	(revision 189918)
> +++ sys/rpc/svc.c	(working copy)
> @@ -296,8 +296,10 @@ xprt_unregister_locked(SVCXPRT *xprt)
>  		TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink);
>  		xprt->xp_active =3D FALSE;
>  	}
> -	TAILQ_REMOVE(&pool->sp_xlist, xprt, xp_link);
> -	xprt->xp_registered =3D FALSE;
> +	if (xprt->xp_registered) {
> +		TAILQ_REMOVE(&pool->sp_xlist, xprt, xp_link);
> +		xprt->xp_registered =3D FALSE;
> +	}
>  }
> =20
>  void
> %%%
>=20
> This was also reported by Edward Fisk (Cc'd) in PR 132068.

Yes, I did it, and discussed exactly the same change with dfr@.
The patch only fixes symptom, the real problem is double unreg.

--utPK4TBebyzZxMrE
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAknJPaYACgkQC3+MBN1Mb4jaLwCeKPzeGt2Q5aHundbZFwl9W+21
QHgAoPSm7Tl7oetj1igMlUkGF8XvlHnW
=D3Y1
-----END PGP SIGNATURE-----

--utPK4TBebyzZxMrE--



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