Subject: Re: kern/36572: panic on NFS unmount
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: netbsd-bugs
Date: 06/28/2007 11:40:02
The following reply was made to PR kern/36572; it has been noted by GNATS.

From: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi)
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: kern/36572: panic on NFS unmount
Date: Thu, 28 Jun 2007 20:38:40 +0900 (JST)

 > When rebooting a diskless machine after quite some NFS usage I hit this panic:
 > 
 > panic: nfs_inactive: vp=0xd6dd9e0 error=0
 > 
 > nfs_inactive() + 0x13c
 > VOP_INACTIVE()
 > vclean()
 > vgonel()
 > vflush()
 > nfs_unmount()
 > dounmount()
 > vfs_unmountall()
 > 
 > It has a big XXX comment:
 > 
 > 0x1047d5c is in nfs_inactive (../../../../nfs/nfs_node.c:272).
 > 267                      */
 > 268     
 > 269                     error = vn_lock(sp->s_dvp, LK_EXCLUSIVE | LK_CANRECURSE);
 > 270                     if (error || sp->s_dvp->v_data == NULL) {
 > 271                             /* XXX should recover */
 > 272                             panic("%s: vp=%p error=%d", __func__, sp->s_dvp, error);
 > 273                     }
 > 274                     nfs_removeit(sp);
 > 275                     kauth_cred_free(sp->s_cred);
 > 276                     vput(sp->s_dvp);
 > 
 > What is this test for? Is it to protect vput()? But nfs_unlock() already deals
 > with v_data == 0. Or has this vnode been reclaimed already (how could I tell
 > from ddb?)
 
 sh vnode 0xd6dd9e0
 
 if dvp have been revoked (v_data == NULL), nfs_removeit() doesn't work.
 probably it isn't critical enough to panic, but it should be fixed eventually.
 
 > Might this be related to PR kern/36424 (wishfull thinking).
 
 i guess it's unrelated.
 
 YAMAMOTO Takashi