[Bug 206634] "panic: ncllock1" from FreeBSD client after NFSv4 server was taken offline and brought back to life; lots of spam about "protocol prob err=10006"

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Jan 28 00:20:49 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206634

rmacklem at uoguelph.ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rmacklem at uoguelph.ca

--- Comment #1 from rmacklem at uoguelph.ca ---
I will take a look at the panic someday, to see if it can
be avoided.
I will note that 10006 is NFSERR_SERVERFAULT, which is a "catch-all"
for "horrible bad things are happening that you want to avoid like
the plague".
(As such, a panic is probably a good thing to have happen.)

NFSv4 servers are not like NFSv3 ones. They are stateful. As such,
you need to always unmount all mounts before shutting down/rebooting
or similar to the server.
If the server crashes, then there is a recovery protocol after the
server reboots, but the server must crash/reboot to invoke this.
(If a crash/reboot happened, it is too late to figure out what went
 wrong, because you'd need a packet trace from the point where the
 server reboots to figure out what happened w.r.t. this recovery protocol.
 Btw, this recovery protocol is more complex than the entire NFSv3
 protocol, so I wouldn't be surprised if the code does have problems.)

You said "brought offline". If that didn't mean "reboot" when it came
back online, then you definitely would break any NFSv4 mounts badly.

The only exception would be a case where the server is offline (due to
network shutdown or killing/restarting the nfsd threads or ???) for
less than 1-2 minutes (the FreeBSD server uses a 2minute lease duration
and that is the upper bound on how long the server can be unavailable
without bad things happening).
The only use for this I can think of is:
- If you were running a kernel without "options NFSD", so the nfsd.ko
  is loaded.
- You wanted to replace the nfsd.ko with one that has been patched.
--> You could kill the nfsd threads, kldunload nfsd.ko, kldload the
    new nfsd.ko and restart the nfsd threads within 1minute.

There probably isn't anywhere in the man pages that emphasizes that
you can't take an NFSv4 server "offline" without unmounting all the
client mounts and this should be fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-fs mailing list