Local Exception [Errno 2] No such file or directory
This issue recently occurred although I didn't make any modification. As you can see below, my repo. accessed through ssh. I'm suspect this issue related to borg but I'm not pretty sure.
Exception: Local Exception
Error: Repository already in use. – Failed to create/acquire the lock /run/user/1000/gvfs/sftp:host=****.com,port=225,user=userk/home/userk/Storage/Backup/lock.exclusive (timeout).
Unknown Message: Exception ignored in: <function Repository.__del__ at 0x7f694202bd80>
Unknown Message: Traceback (most recent call last):
Unknown Message: File "/app/lib/python3.11/site-packages/borg/repository.py", line 192, in __del__
Unknown Message: self.close()
Unknown Message: File "/app/lib/python3.11/site-packages/borg/repository.py", line 481, in close
Unknown Message: self.lock.release()
Unknown Message: File "/app/lib/python3.11/site-packages/borg/locking.py", line 422, in release
Unknown Message: self._roster.modify(EXCLUSIVE, REMOVE)
Unknown Message: File "/app/lib/python3.11/site-packages/borg/locking.py", line 325, in modify
Unknown Message: self.save(roster)
Unknown Message: File "/app/lib/python3.11/site-packages/borg/locking.py", line 291, in save
Unknown Message: with open(self.path, "w") as f:
Unknown Message: ^^^^^^^^^^^^^^^^^^^^
Unknown Message: FileNotFoundError: [Errno 2] No such file or directory: '/run/user/1000/gvfs/sftp:host=****.com,port=225,user=userk/home/userk/Storage/Backup/lock.roster'
Error: Exception – Local Exception
Error: Traceback (most recent call last):
File "/app/lib/python3.11/site-packages/borg/archiver.py", line 190, in wrapper
return method(self, args, repository=repository, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/borg/archiver.py", line 682, in do_create
create_inner(archive, cache, fso)
File "/app/lib/python3.11/site-packages/borg/archiver.py", line 615, in create_inner
self._rec_walk(path=path, parent_fd=None, name=None,
File "/app/lib/python3.11/site-packages/borg/archiver.py", line 830, in _rec_walk
self._rec_walk(
File "/app/lib/python3.11/site-packages/borg/archiver.py", line 830, in _rec_walk
self._rec_walk(
File "/app/lib/python3.11/site-packages/borg/archiver.py", line 830, in _rec_walk
self._rec_walk(
[Previous line repeated 1 more time]
File "/app/lib/python3.11/site-packages/borg/archiver.py", line 793, in _rec_walk
status = self._process_any(path=path, parent_fd=parent_fd, name=name, st=st, fso=fso, cache=cache,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/borg/archiver.py", line 695, in _process_any
return fso.process_file(path=path, parent_fd=parent_fd, name=name, st=st, cache=cache)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/borg/archive.py", line 1413, in process_file
with self.create_helper(path, st, None) as (item, status, hardlinked, hardlink_master): # no status yet
File "/usr/lib/python3.11/contextlib.py", line 144, in __exit__
next(self.gen)
File "/app/lib/python3.11/site-packages/borg/archive.py", line 1333, in create_helper
self.add_item(item, stats=self.stats)
File "/app/lib/python3.11/site-packages/borg/archive.py", line 606, in add_item
self.items_buffer.add(item)
File "/app/lib/python3.11/site-packages/borg/archive.py", line 358, in add
self.flush()
File "/app/lib/python3.11/site-packages/borg/archive.py", line 386, in flush
self.chunks.append(self.write_chunk(chunk))
^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/borg/archive.py", line 402, in write_chunk
id_, _, _ = self.cache.add_chunk(self.key.id_hash(chunk), chunk, self.stats, wait=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/borg/cache.py", line 950, in add_chunk
data = self.key.encrypt(chunk)
^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/borg/crypto/key.py", line 442, in encrypt
next_iv = self.nonce_manager.ensure_reservation(self.cipher.next_iv(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/borg/crypto/nonces.py", line 79, in ensure_reservation
repo_free_nonce = self.get_repo_free_nonce()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/borg/crypto/nonces.py", line 38, in get_repo_free_nonce
return self.repository.get_free_nonce()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/borg/repository.py", line 350, in get_free_nonce
raise AssertionError("bug in code, exclusive lock should exist here")
AssertionError: bug in code, exclusive lock should exist here
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/lib/python3.11/site-packages/borg/archiver.py", line 5401, in main
exit_code = archiver.run(args)
^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/borg/archiver.py", line 5321, in run
return set_ec(func(args))
^^^^^^^^^^
File "/app/lib/python3.11/site-packages/borg/archiver.py", line 175, in wrapper
with repository:
File "/app/lib/python3.11/site-packages/borg/repository.py", line 217, in __exit__
self.close()
File "/app/lib/python3.11/site-packages/borg/repository.py", line 481, in close
self.lock.release()
File "/app/lib/python3.11/site-packages/borg/locking.py", line 422, in release
self._roster.modify(EXCLUSIVE, REMOVE)
File "/app/lib/python3.11/site-packages/borg/locking.py", line 325, in modify
self.save(roster)
File "/app/lib/python3.11/site-packages/borg/locking.py", line 291, in save
with open(self.path, "w") as f:
^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/run/user/1000/gvfs/sftp:host=****.com,port=225,user=userk/home/userk/Storage/Backup/lock.roster'
Platform: Linux personal-laptop 5.15.0-105-generic #115-Ubuntu SMP Mon Apr 15 09:52:04 UTC 2024 x86_64
Linux: Unknown Linux
Borg: 1.2.8 Python: CPython 3.11.9 msgpack: 1.0.8 fuse: pyfuse3 3.3.0 [pyfuse3,llfuse]
PID: 668 CWD: /home/laptop
sys.argv: ['/app/bin/borg', 'create', '--rsh', 'ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new', '--progress', '--json', '--compression=zstd', '--log-json', '--exclude=pp:/home/.mount/Files1/.Trash-1000', '--exclude=pp:/home/.mount/Files1/lost+found', '--exclude=pp:/home/.mount/Files2/.Trash-1000', '--exclude=pp:/home/.mount/Files2/Audio', '--exclude=pp:/home/.mount/Files2/Downloads', '--exclude=pp:/home/.mount/Files2/Pictures', '--exclude=pp:/home/.mount/Files2/Programs', '--exclude=pp:/home/.mount/Files2/Public', '--exclude=pp:/home/.mount/Files2/Videos', '--exclude=pp:/home/.mount/Files2/VirtualBox VMs', '--exclude=pp:/home/laptop/', '--exclude=pp:/home/laptop/.Feishin', '--exclude=pp:/home/laptop/.Private', '--exclude=pp:/home/laptop/.Sonixd', '--exclude=pp:/home/laptop/.android', '--exclude=pp:/home/laptop/.blender', '--exclude=pp:/home/laptop/.containes', '--exclude=pp:/home/laptop/.docker', '--exclude=pp:/home/laptop/.ecryptfs', '--exclude=pp:/home/laptop/.flutter', '--exclude=pp:/home/laptop/.gnupg', '--exclude=pp:/home/laptop/.go', '--exclude=pp:/home/laptop/.go-pkg', '--exclude=pp:/home/laptop/.godot', '--exclude=pp:/home/laptop/.hamster', '--exclude=pp:/home/laptop/.kodi/userdata/Thumbnails', '--exclude=pp:/home/laptop/.mount', '--exclude=pp:/home/laptop/.npm', '--exclude=pp:/home/laptop/.npm-packages', '--exclude=pp:/home/laptop/.phpls', '--exclude=pp:/home/laptop/.pub-cache', '--exclude=pp:/home/laptop/.tartube', '--exclude=pp:/home/laptop/.var/app/org.gnome.World.PikaBackup/data/flatpak/', '--exclude=pp:/home/laptop/Audio', '--exclude=pp:/home/laptop/Downloads', '--exclude=pp:/home/laptop/Music', '--exclude=pp:/home/laptop/Programs', '--exclude=pp:/home/laptop/Public', '--exclude=pp:/home/laptop/Server', '--exclude=pp:/home/laptop/Videos', '--exclude=pp:/home/laptop/VirtualBox VMs', '--exclude=re:/\\.var/app/[^/]+/cache/', '--exclude=pp:/home/laptop/.cache', '--exclude=re:^home/laptop/\\.var/app/[^/]+/cache/', '--exclude-caches', '--exclude=pp:/home/laptop/.local/share/Trash', '--exclude=re:^home/laptop/\\.local/share/flatpak/(?!overrides)', '--exclude=pp:/home/laptop/.local/share/gnome-boxes', '--exclude=pp:/home/laptop/.var/app/org.gnome.Boxes', '--exclude=pp:/home/laptop/.var/app/org.gnome.BoxesDevel', '--exclude=pp:/home/laptop/.local/share/bottles', '--exclude=pp:/home/laptop/.var/app/com.usebottles.bottles', '--exclude=pp:/home/laptop/.local/share/libvirt', '--exclude=pp:/home/laptop/.config/libvirt', '--exclude=pp:/home/laptop/.local/share/containers', '--exclude=pp:/home/laptop/.local/share/docker', '--', '/run/user/1000/gvfs/sftp:host=****.com,port=225,user=userk/home/userk/Storage/Backup::cloud-b0b3adf6', '/home/.mount/Files1', '/home/.mount/Files2', '/home/laptop/']
SSH_ORIGINAL_COMMAND: None
- Version: 0.7.2
- Commit: 18558cd1
- App ID: org.gnome.World.PikaBackup
- Sandboxed: true (flatpak)
- BorgBackup Version: borg 1.2.8
OS Information
NAME="Linux Mint"
VERSION="21.3 (Virginia)"
ID=linuxmint
ID_LIKE="ubuntu debian"
PRETTY_NAME="Linux Mint 21.3"
VERSION_ID="21.3"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.linuxmint.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=virginia
UBUNTU_CODENAME=jammy
Flatpak Information
Ok(
FlatpakInfo {
instance: Instance {
app_commit: Some(
"600509c7af859f7ad91bc1b1e7211ede60ee38ab054ddea683dcf6833015f303",
),
flatpak_version: Some(
"1.12.7",
),
},
context: {
"shared": "network;ipc;",
"features": "devel;",
"filesystems": "/home/laptop/.themes;host-etc;/home/laptop;xdg-data/flatpak:ro;xdg-run/gvfs;!~/.var/app;xdg-run/gvfsd;/var:ro;xdg-run/pika-backup:create;host;host-os;/usr/share/themes;home;",
"unset-environment": "LD_PRELOAD;",
"devices": "dri;all;",
"sockets": "x11;wayland;session-bus;system-bus;fallback-x11;ssh-auth;",
},
session_bus_policy: {
"org.freedesktop.Flatpak.*": "talk",
"org.gtk.vfs.*": "talk",
"org.gtk.MountOperationHandler": "talk",
},
system_bus_policy: {
"org.freedesktop.UPower": "talk",
"org.freedesktop.secrets": "talk",
},
},
)
User Autostart
[Desktop Entry]
Type=Application
Name=org.gnome.World.PikaBackup
Exec=flatpak run --command=pika-backup-monitor org.gnome.World.PikaBackup
X-Flatpak=org.gnome.World.PikaBackup
Global Autostart