Closed nodiex-cloud closed 2 years ago
Interesting, could you, please, paste the full stacktrace?
Sure, this is what I am getting:
('Could not unlock the acquired lock opened on `%s`', b'/cg/j/restore_dest_5/data/elv_main/lockfile')
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/fasteners/process_lock.py", line 166, in release
self.unlock()
File "/usr/local/lib/python3.8/site-packages/fasteners/process_lock.py", line 193, in unlock
self._unlock(self.lockfile)
File "/usr/local/lib/python3.8/site-packages/fasteners/process_lock.py", line 430, in _unlock
fcntl.lockf(lockfile, fcntl.LOCK_UN)
TypeError: argument must be an int, or have a fileno() method.
I see the same trace from duplicity 0.8.19 built with fasteners 0.16.1, at the end of every run.
This is on a Linux host, duplicity run from within a container based on docker.io/library/python:3.9.5-slim
.
The volume /archive
is mounted from a ZFS filesystem in the container.
('Could not unlock the acquired lock opened on `%s`', b'/archive/firsa_home_b2/lockfile')
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/fasteners/process_lock.py", line 166, in release
self.unlock()
File "/usr/local/lib/python3.9/site-packages/fasteners/process_lock.py", line 193, in unlock
self._unlock(self.lockfile)
File "/usr/local/lib/python3.9/site-packages/fasteners/process_lock.py", line 430, in _unlock
fcntl.lockf(lockfile, fcntl.LOCK_UN)
TypeError: argument must be an int, or have a fileno() method.
@nodiex-cloud @shoop I cannot replicate this, could you please provide an example I could run and a bit more details about your environment?
I myself tried cygwin on windows 10 with python36 and python36-venv installed as cygwin packages. I then ran the tests for the process lock and they all pass.
Also, 0.16.1 was an errorneous release (my screw up, appologies for that!), could you please try with 0.16.2 or with master?
Hi @psarka , sorry for the delay in response. I can confirm that with fasteners 0.16.3 the problem has gone away for me.
Great, thanks!
Note: I found the root cause of this issue (see #82), and it has nothing to do with cygwin. Fasteners on cygwin run fine, and I would like them to continue to run fine.
Hello, I (with duplicity the backup soft) am using fastener from cygwin and creating a lock with InterProcessLock. When releasing the lock I am receiving the above error.