Re: panic: mutex nfsd_mtx owned at nfsserver/nfs_serv.c:2160

From: Peter Holm <peter_at_holm.cc>
Date: Thu, 27 Oct 2005 08:09:17 +0200
On Wed, Oct 26, 2005 at 05:14:23PM +0400, Gleb Smirnoff wrote:
> On Wed, Oct 26, 2005 at 03:09:26PM +0200, Peter Holm wrote:
> P> > On Wed, Oct 26, 2005 at 09:23:37AM +0200, Peter Holm wrote:
> P> > P> While stress testing RELENG_6_0 with a nfs mounted file system on a 
> P> > P> box running HEAD from Oct 24 13:21 UTC I got this panic (on HEAD):
> P> > P> http://people.freebsd.org/~pho/stress/log/nfsd.html
> P> > 
> P> > let's try out this one.
> P> > 
> P> 
> P> With this patch I got a (unrelated ?)
> P> panic: lock (sleep mutex) Giant not locked _at_ nfsserver/nfs_serv.c:2193
> 
> Related. Please try out a corrected patch.
> 
After running for +15 hours I think that I can conclude that this
patch has fixed the problem?

- Peter
> -- 
> Totus tuus, Glebius.
> GLEBIUS-RIPN GLEB-RIPE

> Index: nfs_serv.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/nfsserver/nfs_serv.c,v
> retrieving revision 1.156
> diff -u -r1.156 nfs_serv.c
> --- nfs_serv.c	17 Apr 2005 16:25:36 -0000	1.156
> +++ nfs_serv.c	26 Oct 2005 13:13:25 -0000
> _at__at_ -2092,6 +2092,8 _at__at_
>  	tl = nfsm_dissect_nonblock(u_int32_t *, NFSX_UNSIGNED);
>  	vtyp = nfsv3tov_type(*tl);
>  	if (vtyp != VCHR && vtyp != VBLK && vtyp != VSOCK && vtyp != VFIFO) {
> +		NFSD_UNLOCK();
> +		mtx_lock(&Giant);	/* VFS */
>  		error = NFSERR_BADTYPE;
>  		goto out;
>  	}
> _at__at_ -2108,6 +2110,8 _at__at_
>  	 * Iff doesn't exist, create it.
>  	 */
>  	if (nd.ni_vp) {
> +		NFSD_UNLOCK();
> +		mtx_lock(&Giant);	/* VFS */
>  		error = EEXIST;
>  		goto out;
>  	}
Received on Thu Oct 27 2005 - 04:09:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:46 UTC