Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 May 2021 14:54:11 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 255945] FuseFS breaks Flock on FreeBSD 13 RELEASE
Message-ID:  <bug-255945-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255945

            Bug ID: 255945
           Summary: FuseFS breaks Flock on FreeBSD 13 RELEASE
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: jSML4ThWwBID69YC@protonmail.com

Hello,=20

Flock no longer works on FreeBSD 13p0 when using FuseFS. This has been test=
ed
with two different fusefs clients.=20

Tested: MooseFS 3.0.115 from the ports tree.=20
Tested: fusefs-sshfs-3.7.1 from packages.=20

Here's a simple test to demonstrate the issue using sshfs.=20

1: Install fusefs-sshfs, flock, and bash.

pkg install fusefs-sshfs flock bash

2: Create a sshfs mount. You can do this locally by allowing root login over
ssh, or any other user. I'll use root to avoid any permission type issues.=
=20

service sshd onestart
mkdir /mnt/test
sshfs root@127.0.0.1:/root /mnt/test

The contents of /root should now be showing at /mnt/test

3: Create the test script at /mnt/test/flock-test.sh=20

-------------------
#!/usr/bin/env bash

exec 200> ./lock.file
echo "Acquire lock"
flock -n 200 || exit 1
echo "Sleep 5 secs."
sleep 5
echo "Release lock"
flock -u 200 || exit 2
echo "Lock released"
exit
---------------

4: Make the script executable

chmod u+x flock-test.sh

5: Run the script twice.=20

./flock-test.sh

There seems to be different errors depending on if the 'lock.file' previous=
ly
exists.=20

Note, the same issue happens on MooseFS, but it's more complicated to setup.
Here are MooseFS setup instructions, previously written for bug #245689,
https://bz-attachments.freebsd.org/attachment.cgi?id=3D213598

The flock-test.sh script works as expected on FreeBSD 12.2.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255945-227>