Unable to mount NFS shares

Hello,

after upgrading to latest kernel system is not able to mount NFS shares - at least those with sec=krb5p. With version 5.14.21-150500.55.52-default there is no such problem.

There were some bugs solved with latest kernel update, however I am not sure if this behavior is bug or intended consequence of upgrade.

Shares are mounted with options nfsvers=4.1,rw,soft,sec=krb5p.

Could someone help me to solve this issue? Many thanks in advance.

Hopefully relevant output of log:

Call Trace:
 <TASK>
 gss_marshal+0x181/0x320 [auth_rpcgss c26335fc9ca1755964421970836c0101605b9490]
 ? __rpc_sleep_on_priority_timeout+0xf0/0xf0 [sunrpc c6db284f7f72062c59f09f2f594ee19a421ccf15]
 ? call_encode+0x151/0x310 [sunrpc c6db284f7f72062c59f09f2f594ee19a421ccf15]
 ? gss_create_cred+0xe0/0xe0 [auth_rpcgss c26335fc9ca1755964421970836c0101605b9490]
 call_encode+0x151/0x310 [sunrpc c6db284f7f72062c59f09f2f594ee19a421ccf15]
 ? rpc_malloc+0x4d/0x90 [sunrpc c6db284f7f72062c59f09f2f594ee19a421ccf15]
 ? call_decode+0x210/0x210 [sunrpc c6db284f7f72062c59f09f2f594ee19a421ccf15]
 __rpc_execute+0xb7/0x4d0 [sunrpc c6db284f7f72062c59f09f2f594ee19a421ccf15]
 rpc_execute+0x6b/0xd0 [sunrpc c6db284f7f72062c59f09f2f594ee19a421ccf15]
 rpc_run_task+0x111/0x130 [sunrpc c6db284f7f72062c59f09f2f594ee19a421ccf15]
 nfs4_run_exchange_id+0x1fe/0x300 [nfsv4 7a81e979346bb4c055c48e0da360809de74a6034]
 ? select_task_rq_fair+0x186/0x13b0
 _nfs4_proc_exchange_id+0x34/0x550 [nfsv4 7a81e979346bb4c055c48e0da360809de74a6034]
 ? try_to_wake_up+0x177/0x550
 nfs4_proc_exchange_id+0x3e/0x50 [nfsv4 7a81e979346bb4c055c48e0da360809de74a6034]
 nfs41_discover_server_trunking+0x1c/0xa0 [nfsv4 7a81e979346bb4c055c48e0da360809de74a6034]
 nfs4_discover_server_trunking+0x72/0x2a0 [nfsv4 7a81e979346bb4c055c48e0da360809de74a6034]
 nfs4_init_client+0x6e/0x130 [nfsv4 7a81e979346bb4c055c48e0da360809de74a6034]
 nfs4_set_client+0xef/0x140 [nfsv4 7a81e979346bb4c055c48e0da360809de74a6034]
 nfs4_create_server+0x128/0x2b0 [nfsv4 7a81e979346bb4c055c48e0da360809de74a6034]
 nfs4_try_get_tree+0x33/0xd0 [nfsv4 7a81e979346bb4c055c48e0da360809de74a6034]
 vfs_get_tree+0x25/0xd0
 path_mount+0x6f2/0x9c0
 do_mount+0x79/0x90
 __x64_sys_mount+0x86/0xe0
 do_syscall_64+0x5b/0x80
 ? syscall_exit_to_user_mode+0x1f/0x40
 ? do_syscall_64+0x67/0x80
 ? syscall_exit_to_user_mode+0x1f/0x40
 ? do_syscall_64+0x67/0x80
 ? exc_page_fault+0x67/0x150
 entry_SYSCALL_64_after_hwframe+0x6b/0xd5

Which log?

Sorry, forget to mention that. This is log from OpenSUSE Leap 15.5 NFS client.

Server is running FreeBSD 13.3.

Given that, the current NFS clients negotiate the NFS protocol version number with the NFS server and, the same for the security flavour to be used (the “sec” mount option), is there any particular reason for hard-coding these values?

You are right, this is relict from times where server was serving some data via NFSv3 protocol and this was attempt to force NFSv4.

However, this change didn’t correct erroneous behavior. I have suspicion that even NFS shares with sec=sys aren’t working, but I have to do some checks before knowing it for sure.

I can confirm this, we have exactly the same problem. Mounting NFS shares works with kernel 5.14.21-150500.55.52, it doesn’t work with kernel 5.14.21-150500.55.59.1.
We also use krb5p security flavour. Our kernel call trace looks the same.

No amount of “me too”'s on tis forum is going to fix it. Someone who can reproduce this problem should open bug report.

@tomasciernik:
@fnmoeller:

Strange – with this Leap 15.5 Kernel –

 # uname --kernel-release --kernel-version
5.14.21-150500.55.59-default #1 SMP PREEMPT_DYNAMIC Thu Apr 18 12:59:33 UTC 2024 (e8ae24a)
 #

autofs NFS mounts to a QNAP NAS with the parameters “-rw,hard” exhibit the following automatically decided mount parameters –

type nfs4 (rw,relatime,vers=4.1,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp6,timeo=600,retrans=2,sec=sys,clientaddr=«*IPV6 address*»,local_lock=none,addr=«*IPv6 address*»)

N.B.: “sec=sys” …