If the kgssapi.ko is loaded in the system and the gssd daemon is not running, the NFS server will hang during startup trying to do an upcall to the gssd. The workaround is either "don't load the kgssapi.ko" or run the gssd. (The rest of Kerberos doesn't need to be working, but the gssd daemon does need to be running.) I am working on a patch.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=455c354dd4dbba9b9ec9c68e335ab3aa46dca438 commit 455c354dd4dbba9b9ec9c68e335ab3aa46dca438 Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2026-06-21 23:15:23 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2026-06-21 23:15:23 +0000 gss_impl.c: Fix a nfsd hang when the kgssapi.ko is loaded, but no gssd After the conversion to using netlink, the kgssapi had no way of knowing if the gssd daemon was running. As such, a boot where the kgssapi is loaded, but the gssd is not enabled would hang the nfsd for a very long time. (Many timeouts at 300sec each.) This patch adds a Null RPC upcall with a 200msec timeout to check to see if the gssd is running. If the gssd is not running, the nfsd starts up (without Kerberos support) with only a 200msec delay.) Also, move the svc_svc_nl_create() and svc_reg() calls in gssd.c to before the daemon() call, so they are guaranteed to have been done before the nfsd(8) daemon is started by the rc scripts. PR: 295714 Reviewed by: glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57455 sys/kgssapi/gss_impl.c | 42 ++++++++++++++++++++++++++++++++++++++++-- usr.sbin/gssd/gssd.c | 22 +++++----------------- 2 files changed, 45 insertions(+), 19 deletions(-)
Patches have been committed and will be MFC'd.
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=0c48190463a5c895270be09c45b1471633ddd602 commit 0c48190463a5c895270be09c45b1471633ddd602 Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2026-06-21 23:15:23 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2026-07-05 23:02:37 +0000 gss_impl.c: Fix a nfsd hang when the kgssapi.ko is loaded, but no gssd After the conversion to using netlink, the kgssapi had no way of knowing if the gssd daemon was running. As such, a boot where the kgssapi is loaded, but the gssd is not enabled would hang the nfsd for a very long time. (Many timeouts at 300sec each.) This patch adds a Null RPC upcall with a 200msec timeout to check to see if the gssd is running. If the gssd is not running, the nfsd starts up (without Kerberos support) with only a 200msec delay.) Also, move the svc_svc_nl_create() and svc_reg() calls in gssd.c to before the daemon() call, so they are guaranteed to have been done before the nfsd(8) daemon is started by the rc scripts. PR: 295714 (cherry picked from commit 455c354dd4dbba9b9ec9c68e335ab3aa46dca438) sys/kgssapi/gss_impl.c | 42 ++++++++++++++++++++++++++++++++++++++++-- usr.sbin/gssd/gssd.c | 22 +++++----------------- 2 files changed, 45 insertions(+), 19 deletions(-)
Patch has been MFC'd.