Re: Serious locking bug in Linux NFS

Ben 'The Con Man' Kahn (xkahn@cybersites.com)
Sat, 17 Oct 1998 01:16:53 -0400 (EDT)


Alright. I'll give my full list of problems with knfs. I loaded
kernel 2.1.125, and applied the patch supplied with knfsd-981014. Then I
compiled the kernel with nfs and nfs server compiled in.

I started portmap and loaded ./mountd and ./nfsd from the
knfs-981014 package. I also started statd. I could not find, nor have I
found lockd anywhere.

I had initial problems with the /va/lib/nfs/xtab directory.

Oct 15 22:10:45 nero exportfs[1192]: could not open /var/lib/nfs/xtab for
locking
Oct 15 22:10:45 nero exportfs[1192]: could not open /var/lib/nfs/xtab for
locking
Oct 15 22:10:45 nero exportfs[1192]: can't lock /var/lib/nfs/xtab for
writing

I touched the xtab file, and things went more smoothly. But then
I had similar problems with rmtab:

Oct 15 22:13:23 nero mountd[1264]: could not open /var/lib/nfs/rmtab for
locking

> > 1) Showmount doesn't always display who is mounted.
>
> I need to know how to reproduce it.

While rmtab didn't exist, showmount didn't work at all. But I'm
sure you know that. These files should be able to be created
automatically if they don't exist. After I created these two files,
showmount hasn't failed.

> > 2) The log file doesn't always seem to catch mount/unmount
> > requests.
>
> That is even stranger. I need to know how to reproduce it.

However, logging has not been reliable. I noticed a mount request
not be logged. But I haven't tested it enough to reproduce it. I'll look
into it on Monday.


> > 3) I got this message while starting statd:

> > Oct 16 13:50:15 linuxserver ./statd[23846]: address mismatch: expected
> > 240.92.123.21, got 240.92.123.21

> Here is the relevant code:

> if (lp->addr.s_addr != sin->sin_addr.s_addr)
> dprintf(L_WARNING, "address mismatch: "
> "expected %s, got %s\n",
> inet_ntoa(lp->addr),
> inet_ntoa(sin->sin_addr));

> I don't see how it can happen besides a bad compiler/HW. It looks
> like you may have a compiler/HW.

Alright... Well, maybe this is just a nameserver problem... This
worked the time before. (I killed the process and restarted it, got the
error, and tried again. It worked.) So this isn't a common error.
It could be hardware I guess...

> Here is a kernel patch. Please make sure lockd is runing on your client
> machine. You should start "portmap" before mounting NFS.

Okay. So lockd isn't running the clients. (which are all 2.0
kernels for the Linux boxen) Am I to understand that the clients need to
be running 2.1 kernels?? Is there a patch? This is fairly important.

AND, as a final note, the SGIs are running lockd. :^) Well, most
of them are.
-Ben

------------------------------------ |\ _,,,--,,_ ,) ----------
Benjamin Kahn /,`.-'`' -, ;-;;'
(212) 924 - 2220 |,4- ) )-,_ ) /\
ben@cybersites.com --------------- '---''(_/--' (_/-' ---------------
Meet Linux: Forrest Gump as an operating system.

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