Project

General

Profile

Bug #7588

Disabling NFSv4 messes up NFS service

Added by Boris Neubert over 5 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
Josh Paetzel
Category:
OS
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Steps to reproduce:
1. Disable NFS service in the UI
2. Configure NFS service: uncheck the NFSv4 check box
3. Re-enable NFS service
4. Trying to mount NFS share on a client hangs.
5. Disabling NFS service in the UI hangs.
6. Need a reboot to bring NFS back to live
(tried this two times)

This is what is shown in the UI console at the bottom:

Jan 20 10:14:33 nas notifier: rpcbind not running?
Jan 20 10:14:33 nas notifier: lockd not running?
Jan 20 10:14:33 nas notifier: statd not running?
Jan 20 10:14:33 nas notifier: gssd not running?
Jan 20 10:14:33 nas notifier: nfsuserd not running?
Jan 20 10:14:33 nas notifier: mountd not running? (check /var/run/mountd.pid).
Jan 20 10:14:33 nas notifier: nfsd not running?
Jan 20 10:14:35 nas notifier: rpcbind not running?
Jan 20 10:14:35 nas notifier: lockd not running?
Jan 20 10:14:35 nas notifier: statd not running?
Jan 20 10:14:35 nas notifier: gssd not running?
Jan 20 10:14:35 nas notifier: nfsuserd not running?
Jan 20 10:14:35 nas notifier: mountd not running? (check /var/run/mountd.pid).
Jan 20 10:14:35 nas notifier: nfsd not running?
Jan 20 10:14:36 nas notifier: mountd not running? (check /var/run/mountd.pid).
Jan 20 10:14:36 nas notifier: Starting gssd.
Jan 20 10:14:36 nas notifier: Starting rpcbind.
Jan 20 10:14:36 nas notifier: Starting mountd.
Jan 20 10:14:36 nas notifier: Starting nfsuserd.
Jan 20 10:14:36 nas notifier: Starting nfsd.
Jan 20 10:14:36 nas notifier: Starting statd.
Jan 20 10:14:36 nas notifier: Starting lockd.
Jan 20 10:14:37 nas nfsd: can't register svc name
Jan 20 10:14:39 nas init: getty repeating too quickly on port /dev/ttyv0, sleeping 30 secs
Jan 20 10:15:12 nas notifier: Stopping rpcbind.
Jan 20 10:15:12 nas notifier: Waiting for PIDS: 6251.
Jan 20 10:15:12 nas notifier: Stopping lockd.
Jan 20 10:15:12 nas notifier: Waiting for PIDS: 6369.
Jan 20 10:15:12 nas notifier: Stopping statd.
Jan 20 10:15:12 nas notifier: Waiting for PIDS: 6337.
Jan 20 10:15:12 nas notifier: Stopping gssd.
Jan 20 10:15:12 nas notifier: Waiting for PIDS: 6217.
Jan 20 10:15:12 nas notifier: Stopping nfsuserd.
Jan 20 10:15:12 nas notifier: Waiting for PIDS: 6290 6291 6292 6293 6294.
Jan 20 10:15:12 nas notifier: Stopping mountd.
Jan 20 10:15:12 nas notifier: Waiting for PIDS: 6255.
Jan 20 10:15:12 nas notifier: Stopping nfsd.
Jan 20 10:15:12 nas nfsd[6312]: rpcb_unset failed
Jan 20 10:15:12 nas notifier: Waiting for PIDS: 6312 6329.
Jan 20 10:15:13 nas init: getty repeating too quickly on port /dev/ttyv0, sleeping 30 secs
Jan 20 10:15:16 nas notifier: rpcbind not running?
Jan 20 10:15:16 nas notifier: lockd not running?
Jan 20 10:15:16 nas notifier: statd not running?
Jan 20 10:15:16 nas notifier: gssd not running?
Jan 20 10:15:16 nas notifier: nfsuserd not running?
Jan 20 10:15:16 nas notifier: mountd not running? (check /var/run/mountd.pid).
Jan 20 10:15:17 nas notifier: nfsd not running?
Jan 20 10:15:19 nas notifier: rpcbind not running?
Jan 20 10:15:19 nas notifier: lockd not running?
Jan 20 10:15:19 nas notifier: statd not running?
Jan 20 10:15:19 nas notifier: gssd not running?
Jan 20 10:15:19 nas notifier: nfsuserd not running?
Jan 20 10:15:19 nas notifier: mountd not running? (check /var/run/mountd.pid).
Jan 20 10:15:19 nas notifier: nfsd not running?
Jan 20 10:15:19 nas notifier: mountd not running? (check /var/run/mountd.pid).
Jan 20 10:15:19 nas notifier: Starting rpcbind.
Jan 20 10:15:19 nas notifier: Starting mountd.
Jan 20 10:15:20 nas notifier: NFSv4 is disabled
Jan 20 10:15:20 nas notifier: Starting nfsd.
Jan 20 10:15:20 nas notifier: Starting statd.
Jan 20 10:15:20 nas notifier: Starting lockd.
Jan 20 10:15:47 nas init: getty repeating too quickly on port /dev/ttyv0, sleeping 30 secs
Jan 20 10:16:22 nas init: getty repeating too quickly on port /dev/ttyv0, sleeping 30 secs
Jan 20 10:16:31 nas notifier: Stopping rpcbind.
Jan 20 10:16:31 nas notifier: Waiting for PIDS: 8203.
Jan 20 10:16:31 nas notifier: Stopping lockd.
Jan 20 10:16:31 nas notifier: Waiting for PIDS: 8299.
Jan 20 10:16:31 nas notifier: Stopping statd.
Jan 20 10:16:31 nas notifier: Waiting for PIDS: 8267.
Jan 20 10:16:31 nas notifier: gssd not running?
Jan 20 10:16:31 nas notifier: nfsuserd not running?
Jan 20 10:16:31 nas notifier: Stopping mountd.
Jan 20 10:16:31 nas notifier: Waiting for PIDS: 8207.
Jan 20 10:16:31 nas notifier: Stopping nfsd.
Jan 20 10:16:31 nas nfsd[8242]: rpcb_unset failed

Associated revisions

Revision e361dca6 (diff)
Added by Josh Paetzel over 5 years ago

Workaround bug in FreeBSD nfsd When nfsd is started with NFSv4 support it requires nfsuserd and gssd for proper operation of the NFSv4 stack. If NFSv4 support is disabled, FreeNAS stops gssd and nfsuserd as those are needed as part of the NFSv3 stack. However, something in the kernel doesn't get reset properly, and even though nfsd has no support for NFSv4 and will not provide NFSv4 service, it gets stuck due to gssd not being available. As a workaround this changes causes FreeNAS to always run the full NFSv4 stack, even if NFSv4 support is not enabled. All checking the V4 box does now is put the appropriate entries in /etc/exports. Ticket: #7588

Revision 7e42983b (diff)
Added by Josh Paetzel over 5 years ago

Workaround bug in FreeBSD nfsd When nfsd is started with NFSv4 support it requires nfsuserd and gssd for proper operation of the NFSv4 stack. If NFSv4 support is disabled, FreeNAS stops gssd and nfsuserd as those are needed as part of the NFSv3 stack. However, something in the kernel doesn't get reset properly, and even though nfsd has no support for NFSv4 and will not provide NFSv4 service, it gets stuck due to gssd not being available. As a workaround this changes causes FreeNAS to always run the full NFSv4 stack, even if NFSv4 support is not enabled. All checking the V4 box does now is put the appropriate entries in /etc/exports. Ticket: #7588 (cherry picked from commit e361dca6885aa26299a79a85d3f3cba18cd8f429)

History

#1 Updated by Jordan Hubbard over 5 years ago

  • Category set to 92
  • Assignee set to Josh Paetzel
  • Target version set to Unspecified

#2 Updated by Josh Paetzel over 5 years ago

  • Status changed from Unscreened to Investigation

#3 Updated by Josh Paetzel over 5 years ago

I can repro your findings. It looks like nfsd gets wedged.

[root@freenas] ~# procstat -k 15321
PID TID COMM TDNAME KSTACK
15321 101601 nfsd - mi_switch sleepq_timedwait _sleep clnt_reconnect_call clnt_call_private gssd_import_name_1 gss_import_name rpc_gss_acquire_svc_cred rpc_gss_set_svc_name nfsrvd_nfsd nfssvc_nfsd sys_nfssvc amd64_syscall Xfast_syscall

#4 Updated by Josh Paetzel over 5 years ago

  • Status changed from Investigation to Fix In Progress

So, I found the bug.

If nfsd is started with v4 support enabled, it requires gssd.

If you stop nfsd, disabled V4 support, then start nfsd again, even though gssd is't required for NFSv3 operation, nfsd gets stuck because it still requires it. (probably a kernel bug where a global variable doesn't get reset properly)

We can work around this bug by always running gssd, but the real fix would be to fix the nfsd bug.

#5 Updated by Josh Paetzel over 5 years ago

  • Status changed from Fix In Progress to Ready For Release

#6 Updated by Boris Neubert over 5 years ago

Thank you.
Boris

#7 Updated by Jordan Hubbard over 5 years ago

  • Status changed from Ready For Release to Resolved

#8 Avatar?id=14398&size=24x24 Updated by Kris Moore about 4 years ago

  • Target version changed from Unspecified to N/A

Also available in: Atom PDF