• NFS locks debian12/debian13/Opensuse

    From Ralf Fassel@3:633/10 to All on Thu Feb 5 17:53:55 2026
    [Please advice if a better group exists for this question]

    I have three PCs (1 each of Debian-12, Debian-13 and OpenSuse-15.6).
    Each PC NFS-mounts a common directory from an NFS-Server (OpenSuse-15.6).

    Mount options look the same on all three:

    Opensuse:
    xxx on xxx type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.164,local_lock=none,addr=192.168.1.190)

    Debian12
    xxx on xxx type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.168,local_lock=none,addr=192.168.1.190)

    Debian13
    xxx on xxx type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.179,local_lock=none,addr=192.168.1.190)


    When I try to 'flock' a file in a directory on that share simultaneously
    on all 3 machines:
    % flock foobar sh -c 'echo start ; sleep 10 ; echo end'

    - when any Debian-machine holds the lock:
    - the other two block as expected

    - when the Opensuse machine holds the lock:
    - the Debian-12 machine blocks as expected
    - the Debian-13 machine fails with
    % flock foobar sh -c 'echo start ; sleep 10 ; echo end'
    flock: foobar: Input/output error

    Any hint why the Debian-13 fails when Opensuse holds the lock?
    Any hint where to start to look for answers?

    TNX
    R'

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lumin Etherlight@3:633/10 to All on Mon Feb 16 22:22:55 2026
    Ralf Fassel <ralfixx@gmx.de> writes:

    When I try to 'flock' a file in a directory on
    that share simultaneously on all 3 machines:

    - when the Opensuse machine holds the lock:
    - the Debian-12 machine blocks as expected
    - the Debian-13 machine fails with
    % flock foobar sh -c 'echo start ; sleep 10 ; echo end'
    flock: foobar: Input/output error

    Any hint why the Debian-13 fails when Opensuse
    holds the lock? Any hint where to start to look
    for answers?

    I would start by trying to build and run
    different versions of flock, from Linux utils[1],
    by building those versions and seeing if the same
    issue holds. Build the newest version, and run it
    on all machines, and try to also build the oldest
    version you're using and run it on all machines.
    If issues seem to get fixed by some combination,
    then a bug report against flock might be helpful.
    If the same issue still holds, then it probably is
    a kernel issue.

    If you are up for it, compile and install
    different versions of the Linux kernel on those
    machines and OSes. See if that would fixes the
    issue. In that case you can probably report the
    issue against the Linux kernel.

    In all cases, you should report the issues
    to your distribution's maintainers first, and not
    to the Linux upstream directly.

    If you are system-programming-inclined, you
    can use strace on flock to see what system calls
    flock was calling when the error occurred, which
    might help you figure out the source of the issue,
    with the help of flock's source code.

    [1]: https://www.kernel.org/pub/linux/utils/util-linux/


    Best Regards,
    Lumin Etherlight

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)