Subject: Re: 4.99.16 (-current) panic
To: Gert Doering <gert@greenie.muc.de>
From: Antti Kantee <pooka@cs.hut.fi>
List: port-sparc64
Date: 04/09/2007 23:31:58
On Mon Apr 09 2007 at 22:19:34 +0200, Gert Doering wrote:
> Hi,
> 
> (we're back in port-sparc64 - but if this is a more generic problem/bug,
> feel free to move this to tech-kern)

Ok, let's try again, although I think the problem is solved.

> > Index: vfs_syscalls.c
> > ===================================================================
> > RCS file: /cvsroot/src/sys/kern/vfs_syscalls.c,v
> > retrieving revision 1.306
> > diff -u -r1.306 vfs_syscalls.c
> > --- vfs_syscalls.c      10 Mar 2007 16:50:01 -0000      1.306
> > +++ vfs_syscalls.c      9 Apr 2007 19:44:56 -0000
> > @@ -157,7 +157,6 @@
> >  
> >         /* We can't operate on VROOT here. */
> >         if ((vp->v_flag & VROOT) == 0) {
> > -               vput(vp);
> >                 error = EINVAL;
> >                 goto out;
> >         }
> 
> I gave that one a quick test, and it cures the "immediate crash when
> starting 2.0.3 mountd" crash.  I didn't test it on the "mail server 
> machine" yet, as this one needs to be up over night.
> 
> I'm wondering, though, why this is (was) only triggered with the 2.0.3 
> "mountd" binary.  Using the mountd binary from the 4.99.17 system, with 
> the exact same kernel binary, I can't get a crash.  That is:
> 
>  - 2.0.3 system with 4.99.17 kernel, with DIAGNOSTIC: as soon as mountd
>    is started, crash
> 
>  - 4.99.17 system with the very same kernel binary: mountd works, and
>    accessing the NFS exported file system, both locally and via NFS,
>    works perfectly well as well.  Copying over the mountd binary from
>    the 2.0.3 system, and running this, gives an immediate kernel panic.
> 
> Are the different mountd binaries excercising different code paths?

2.0.3 mountd does this:

	if (mount(fsp->f_fstypename, fsp->f_mntonname,
	    fsp->f_flags | MNT_UPDATE, &targs) == -1)
		syslog(LOG_ERR, "Can't delete exports for %s",
		    fsp->f_mntonname);

4.99.17 doesn't ;)
(since jmmv's nfs export rototill)

-- 
Antti Kantee <pooka@iki.fi>                     Of course he runs NetBSD
http://www.iki.fi/pooka/                          http://www.NetBSD.org/
    "la qualité la plus indispensable du cuisinier est l'exactitude"