Re: nfsd Security: /// bad export. error

Philippe Troin (phil@fifi.org)
12 Sep 1999 14:19:16 -0700


"T.A. dos Santos" <teste@naomi.fe.up.pt> writes:

> Some time ago i reported receiving this error in a knfsd 1.4.4 and
> later setup with kernels 2.2.7 and above. This happened only under extreme
> stress in the 100GB+ nfs export - at night during a backup with Arkeia, in
> this case. I was asked to patch the kernel with the following patch, in
> order to get some information about the moment it happens. The patch is:
>
> --- nfsfh.c.orig Thu Jul 15 20:37:20 1999
> +++ nfsfh.c Thu Jul 15 20:37:55 1999
> @@ -1143,6 +1143,10 @@
> printk("nfsd Security: %s/%s bad export.\n",
> dentry->d_parent->d_name.name,
> dentry->d_name.name);
> + printk("nfsd Security: %p %p %p.\n",
> + exp->ex_dentry,
> + tdentry,
> + dentry);
> goto out;
> }
> }
>
>
>
> Anyway, it finally happened, after almost two months. To fix it was
> only a matter of restarting nfs. No reboot needed. The results were:
>
> Sep 6 22:34:59 jerry kernel: nfsd Security: /// bad export.
> Sep 6 22:34:59 jerry kernel: nfsd Security: c0083e60 d0621140 d0621140.
> Sep 6 22:35:00 jerry kernel: nfsd Security: /// bad export.
> Sep 6 22:35:00 jerry kernel: nfsd Security: c0083e60 d0621140 d0621140.
> ... ... ...
> Sep 7 06:46:14 jerry kernel: nfsd Security: /// bad export.
> Sep 7 06:46:14 jerry kernel: nfsd Security: c0083e60 d0621140 d0621140.
>
>
> I hope it helps someone to solve the problem. It is the only problem we
> have been having with it in a heavily used server. And it only happens
> each two months or so.

I've also seen this problem, but it happens every few days on a NFS
server with linux 2.2.12 UP + HJL's knfs patches.

I came with this patch to trace the problem:

--- /usr/local/src/linux-2.2.12/fs/nfsd/nfsfh.c.linus Mon Aug 30 18:39:52 1999
+++ /usr/local/src/linux-2.2.12/fs/nfsd/nfsfh.c Fri Sep 10 00:59:34 1999
@@ -1240,11 +1240,22 @@
}
} while ((tdentry != tdentry->d_parent));
if (exp->ex_dentry != tdentry) {
+ struct dentry *pdentry = dentry;
error = nfserr_stale;
nfsdstats.fh_stale++;
printk("nfsd Security: %s/%s bad export.\n",
dentry->d_parent->d_name.name,
dentry->d_name.name);
+ while (pdentry != pdentry->d_parent)
+ {
+ printk(" dentry dump = %08X %s\n",
+ pdentry, pdentry->d_name.name);
+ pdentry = pdentry->d_parent;
+ }
+ printk(" dentry dump = %08X %s\n",
+ pdentry, pdentry->d_name.name);
+ printk(" export dentry = %08X %s\n",
+ exp->ex_dentry, exp->ex_dentry->d_name.name);
goto out;
}
}

These are what I find in the log when the problem occurs:

kernel: nfsd Security: /// bad export.
kernel: dentry dump = C73F38A0 /
kernel: export dentry = C7DD2840 /

Repeated a few gazillion times.

When the problem occurs, all clients experience a "stale NFS
file handle" on the affected share. After this ESTALE storm, everything
is back to normal (without remounting or anything...).

Still investigating, but help accepted :-)

Phil.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/