Subject: Re: 4.99.16 (-current) panic
To: Antti Kantee <pooka@cs.hut.fi>
From: Gert Doering <gert@greenie.muc.de>
List: port-sparc64
Date: 04/09/2007 22:19:34
Hi,

(we're back in port-sparc64 - but if this is a more generic problem/bug,
feel free to move this to tech-kern)

On Mon, Apr 09, 2007 at 10:45:30PM +0300, Antti Kantee wrote:
> On Mon Apr 09 2007 at 21:30:43 +0200, Gert Doering wrote:
> > Starting mountd.
> > vput: bad ref count: tag VT_UFS(1) type VDIR(2), usecount -1, writecount 0, refcount 0, flags (0<LOCKSWORK>)
> > 	tag VT_UFS, ino 667648, on dev 12, 4 flags 0x0, effnlink 55, nlink 55
> > 	mode 040755, owner 202, group 0, size 1536 not locked
> > panic: vput: ref cnt
[..]
> 
> Ok, that's pretty obvious stuff.
> 
>         } else if (SCARG(uap, flags) & MNT_UPDATE) {
>                 error = mount_update(l, vp, SCARG(uap, path),
>                     SCARG(uap, flags), SCARG(uap, data), &nd);
>                 vput(vp);
> 
> and (mount_update())
> 
>         /* We can't operate on VROOT here. */
>         if ((vp->v_flag & VROOT) == 0) {
>                 vput(vp);
>                 error = EINVAL;
>                 goto out;
>         }

I need to believe that, if you say so :-)  (I find this quite non-obvious,
to be honest :-) ).


> 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?

gert
-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert@greenie.muc.de
fax: +49-89-35655025                        gert@net.informatik.tu-muenchen.de
-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert@greenie.muc.de
fax: +49-89-35655025                        gert@net.informatik.tu-muenchen.de