#987177 lockfile-progs: lockfile creation failing on cifs mounts

Package:
lockfile-progs
Source:
lockfile-progs
Description:
Programs for locking and unlocking files and mailboxes
Submitter:
Nils
Date:
2021-09-06 11:00:02 UTC
Severity:
important
#987177#5
Date:
2021-04-19 07:12:10 UTC
From:
To:
Dear Maintainer,

lockfile creation fails on a cifs mounted drive with "lockfile creation failed: Value too large for defined data type"
The problem was seen on the running kernel 5.10.0 and also on linux-image-4.19.0-16-686-pae
The problem appeared only recently (last 2- weeks?) after an apt full-upgrade, but I don't recall what all changed there.
The created .lk*smidge file could be part of the problem. It disappears when it works, but stays wen it does not.
On an ubuntu machine the same lockfile-progs with newer dependencies works (see third paste below)

$ uname -a
Linux smidge 5.10.0-0.bpo.5-686-pae #1 SMP Debian 5.10.24-1~bpo10+1 (2021-03-29) i686 GNU/Linux
---TESTING IN HOME - WORKS
nils@smidge:~$ mkdir test
nils@smidge:~$ cd test
nils@smidge:~/test$ ll
total 8
drwxr-xr-x  2 nils nils 4096 Apr 19 08:52 ./
drwxr-xr-x 15 nils nils 4096 Apr 19 08:52 ../
nils@smidge:~/test$ lockfile-create testlock
nils@smidge:~/test$ ll
total 12
drwxr-xr-x  2 nils nils 4096 Apr 19 08:52 ./
drwxr-xr-x 15 nils nils 4096 Apr 19 08:52 ../
-rw-r--r--  1 nils nils    2 Apr 19 08:52 testlock.lock
nils@smidge:~/test$ cat testlock.lock
0
nils@smidge:~/test$ lockfile-remove testlock
nils@smidge:~/test$ ll
total 8
drwxr-xr-x  2 nils nils 4096 Apr 19 08:53 ./
drwxr-xr-x 15 nils nils 4096 Apr 19 08:52 ../
nils@smidge:~/test$
---TESTING IN CIFS - BROKEN nils@smidge:/mnt/nas/backup/scripts/smidge$ mkdir test nils@smidge:/mnt/nas/backup/scripts/smidge$ cd test nils@smidge:/mnt/nas/backup/scripts/smidge/test$ lockfile-create testlock lockfile creation failed: Value too large for defined data type nils@smidge:/mnt/nas/backup/scripts/smidge/test$ ll total 1 drwxr-xr-x 2 nils nils 0 Apr 19 08:54 ./ drwxr-xr-x 2 nils nils 0 Apr 19 08:54 ../ -rwxr-xr-x 2 nils nils 2 Apr 19 08:54 .lk013502smidge* -rwxr-xr-x 2 nils nils 2 Apr 19 08:54 testlock.lock* nils@smidge:/mnt/nas/backup/scripts/smidge/test$ cat .lk013502smidge 0 nils@smidge:/mnt/nas/backup/scripts/smidge/test$ cat testlock.lock 0 nils@smidge:/mnt/nas/backup/scripts/smidge/test$ lockfile-remove testlock nils@smidge:/mnt/nas/backup/scripts/smidge/test$ ll total 1 drwxr-xr-x 2 nils nils 0 Apr 19 08:54 ./ drwxr-xr-x 2 nils nils 0 Apr 19 08:54 ../ -rwxr-xr-x 1 nils nils 2 Apr 19 08:54 .lk013502smidge* nils@smidge:/mnt/nas/backup/scripts/smidge/test$
---TESTING IN CIFS FROM UBUNTU MACHINE - WORKS Works as expected on Ubuntu 20.10 (also with lockfile-progs 0.1.18), but has newer dependencies: nils@blackbox:/mnt/nas/backup/scripts/smidge/test$ uname -a Linux blackbox 5.8.0-49-generic #55-Ubuntu SMP Wed Mar 24 14:45:45 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux nils@blackbox:/mnt/nas/backup/scripts/smidge/test$ dpkg -l | grep libc6 ii libc6:amd64 2.32-0ubuntu3 amd64 GNU C Library: Shared libraries ii libc6:i386 2.32-0ubuntu3 i386 GNU C Library: Shared libraries ii libc6-dbg:amd64 2.32-0ubuntu3 amd64 GNU C Library: detached debugging symbols ii libc6-dev:amd64 2.32-0ubuntu3 amd64 GNU C Library: Development Libraries and Header Files ii libc6-i386 2.32-0ubuntu3 amd64 GNU C Library: 32-bit shared libraries for AMD64 nils@blackbox:/mnt/nas/backup/scripts/smidge/test$ dpkg -l | grep liblockfile1 ii liblockfile1:amd64 1.16-1.1 amd64 NFS-safe locking library nils@blackbox:/mnt/nas/backup/scripts/smidge/test$
#987177#10
Date:
2021-09-03 18:30:00 UTC
From:
To:
Nils <internationils@gmx.net> writes:

Hmm, lockfile-create is really a very simple wrapper around a call to
lockfile_create(1), and offhand, I don't see any obvious way the
arguments being passed could be causing an EOVERFLOW.

Offhand, I wonder if it's the liblockfile version difference.  From a
quick glance I see some upstream commits involving EOVERFLOW.
If you can still reproduce the problem, you might be able to verify that
by testing with dotlock instead of lockfile-create.

Thanks

#987177#15
Date:
2021-09-06 10:53:11 UTC
From:
To:
I can verify that it still exists on Buster:

nils@smidge:/mnt/nas/backup/scripts/smidge$ mkdir tmp_locktest
nils@smidge:/mnt/nas/backup/scripts/smidge$ cd tmp_locktest/
nils@smidge:/mnt/nas/backup/scripts/smidge/tmp_locktest$ lockfile-create
testlock
lockfile creation failed: Value too large for defined data type
nils@smidge:/mnt/nas/backup/scripts/smidge/tmp_locktest$ ll
total 1
drwxr-xr-x 2 nils nils 0 Sep  6 09:56 ./
drwxr-xr-x 2 nils nils 0 Sep  6 09:55 ../
-rwxr-xr-x 2 nils nils 2 Sep  6 09:56 .lk01464asmidge*
-rwxr-xr-x 2 nils nils 2 Sep  6 09:56 testlock.lock*
nils@smidge:/mnt/nas/backup/scripts/smidge/tmp_locktest$ lockfile-remove
testlock
nils@smidge:/mnt/nas/backup/scripts/smidge/tmp_locktest$ ll
total 1
drwxr-xr-x 2 nils nils 0 Sep  6 09:57 ./
drwxr-xr-x 2 nils nils 0 Sep  6 09:55 ../
-rwxr-xr-x 1 nils nils 2 Sep  6 09:56 .lk01464asmidge*
nils@smidge:/mnt/nas/backup/scripts/smidge/tmp_locktest$ uname -a
Linux smidge 5.10.0-0.bpo.5-686-pae #1 SMP Debian 5.10.24-1~bpo10+1
(2021-03-29) i686 GNU/Linux
nils@smidge:/mnt/nas/backup/scripts/smidge/tmp_locktest$ cat
/etc/debian_version
10.10
nils@smidge:/mnt/nas/backup/scripts/smidge/tmp_locktest$ dpkg -l | grep
libc6
ii  libc6:i386                          
2.28-10                                 i386         GNU C Library:
Shared libraries
rc  libc6-i686:i386                     
2.24-11+deb9u4                          i386         transitional dummy
package
nils@smidge:/mnt/nas/backup/scripts/smidge/tmp_locktest$ dpkg -l | grep
liblockfile1
ii  liblockfile1:i386                   
1.14-1.1                                i386         NFS-safe locking
library

#987177#20
Date:
2021-09-06 10:54:41 UTC
From:
To:
Also exists on Bullseye:

nils@smidge:/mnt/nas/backup/scripts/smidge/tmp_locktest$ lockfile-create testlock

lockfile creation failed: Value too large for defined data type

nils@smidge:/mnt/nas/backup/scripts/smidge/tmp_locktest$ ll

total 1

drwxr-xr-x 2 nils nils 0 Sep  6 12:51 ./

drwxr-xr-x 2 nils nils 0 Sep  6 09:55 ../

#987177#25
Date:
2021-09-06 10:57:36 UTC
From:
To:
dotlock / dotlock -u work fine without error messages