FreeBSD v14.1-RELEASE-p3: NFSv3 - no lock available

Dear @ll,

I have upgraded to FreeBSD 14.1-RELEASE-p3 and now it seems that nfs lockd is no longer working.

Code:
# /etc/rc.conf
rpcbind_enable="YES"
mountd_enable="YES"
rpc_statd_enable="YES"
rpc_lockd_enable="YES"
nfs_server_enable="YES"

Code:
zfs get sharenfs zroot/data/test
zroot/data/test sharenfs -maproot=root local

Code:
touch /data/test/myfile
# obtain nfs lock from FreeBSD client
lockf /data/test/myfile true && echo ok || echo nok
# obtain nfs lock from Linux client
flock /data/test/myfile true && echo ok || echo nok

Code:
# rpcinfo executed from the nfs server
$ rpcinfo -s bsdnfs
program   version(s)  netid(s)                 service     owner
100000    2,3,4       local,udp6,tcp6,udp,tcp  rpcbind     superuser
100005    3,1         tcp,udp,tcp6,udp6        mountd      superuser
100003    3,2         tcp6,tcp,udp6,udp        nfs         superuser
100024    1           tcp,udp,tcp6,udp6        status      superuser
100021    4,3,1,0     tcp,udp,tcp6,udp6        nlockmgr    superuser

# rpcinfo for the client from the server
$ rpcinfo -s client
program   version(s)  netid(s)                 service     owner
100000    2,3,4       local,udp6,tcp6,udp,tcp  rpcbind     superuser
100024    1           tcp6,udp6,tcp,udp        status      superuser
100021    4,3,1,0     tcp6,udp6,tcp,udp        nlockmgr    superuser

Anyone experiencing the same issue?

Edit:

Corrected the FreeBSD release. Thanks to Emrion!
 
Just tried FreeBSD-RELEASE-13.3 and nfs including locking is working like a charm, so there is an issue with FreeBSD-14.1-RELEASE-p3.

Can anyone confirm this ?
 
Seems like FreeBSD RELEASE-13.3 has been affected as well. o_O

Put some heavy IO on the nfsd and after almost 60 min, the error message appears that no lock can be obtained.

Anyway to check what changed between 13.2 and 13.3 ?

Anyway to roll back to 13.2 ?
 
Code:
touch /data/test/myfile
# obtain nfs lock from FreeBSD client
lockf /data/test/myfile true && echo ok || echo nok
# obtain nfs lock from Linux client
flock /data/test/myfile true && echo ok || echo nok

Why do you use flock on Linux instead of lockf ?
On the same machine with a nfs directory, doing
Code:
lockf -t 10 test.lock sleep 10 &
lockf -t 1 test.lock echo not locked || echo already locked
return
lockf: test.lock: already locked
already locked
 
monwarez, issue persists with lockf on linux as well.

Just upgraded RELEASE-13.3 to RELEASE-13.3-p5.

Let's see if this makes any difference. *fingers crossed*
 
Seems like the issue persists on the latest RELEASE-13.3-p5 as well.

The client is unable to obtain a lock for the file from the nfs server after 30 minutes of heavy IO.

Can anyone confirm this locking issues with NFS ?
 
Is there any way to track this further down?

On 14.1-p3 it seems pretty predictable. I mount the share on two clients, checking the lock availability using lockf on the first client to obtain and release the lock works. Trying the same afterwards on the 2nd client fails.

Is there anyway to dive deeper into this?
 
Just for testing I switched the NFS server to Alma Linux 9.2 latest release and the issue is gone.:-/
 
I have been using FreeBSD as NFS server for a couple of years now, and the experience was quite enjoyable. Decent performance, no issues regarding locking, any client os worked out of the box.

I’m still testing Alma, but it looks like the locking issue is gone.

I’ll try to recreate the issue reliable in a VM setup.
 
Nasty bugs! We could not get our Telephone system working for months because of one too. The system was fixed after a major upgrade. It was a bhyve bug.
 
NFSv4 works, so I guess I will just abandon v3 and move with v4.

Still interested though, if someone experiences the lock issue with v3.
 
Back
Top