Open svvac opened 2 years ago
Strange error, but I'ld say file a bug against the cifs filesystem, borg only does normal filesystem operations and they should work without the filesystem going nuts.
Specifically:
You could also try to reproduce with the 1.2.0 package from https://launchpad.net/~costamagnagianfranco/+archive/ubuntu/borgbackup .
What you could also try is using that cifs mount manually, just use some file manager and copy a bigger amount of files into it, do some renames, deletes, copies in there.
Strange error, but I'ld say file a bug against the cifs filesystem, borg only does normal filesystem operations and they should work without the filesystem going nuts.
I completely agree, the blame almost certainly lies with cifs. But something must be different between the two versions to trigger the bug. I consistently have the issue with 1.2, and never with 1.1.
You could also try to reproduce with the 1.2.0 package from https://launchpad.net/~costamagnagianfranco/+archive/ubuntu/borgbackup .
I didn't try this one, but the system version from ubuntu exhibits the same behaviour.
What you could also try is using that cifs mount manually, just use some file manager and copy a bigger amount of files into it, do some renames, deletes, copies in there.
I'll try a few things and report back here if I find something interesting.
Fine, the jammy 1.2.0 version is from same maintainer. I just wanted to exclude any strange effects potentially coming from the pyinstaller-made fat binary (it bundles python and misc libs into the binary, but also uses kernel/glibc/related libs from the system).
I'll review locking and repository fs-related changes between 1.1.17 and 1.2.0, let's see if there is anything interesting...
notable fs-related change between 1.1.17 and 1.2.0 i found:
repository code:
borg check
writes to repo config (to support borg check --partial --max-duration
)os.statvfs(repo_path)
--> shutil.disk_usage(repo_path)
(this is to check free disk space before committing)truncate_and_unlink(file)
--> safe_unlink(file)
(this was changed to avoid collateral damage to hardlinked copies of repos. under normal conditions (== space is available on the fs), safe_unlink is just os.unlink
.)locking code:
tempfile.mkdtemp
+ os.rename
now (fixes some race conditions the 1.1 code had)Maybe producing a log with strace
could give some additional insights about where the problems begin and what was done immediately before that.
@svvac Do you have any new information about this?
I got the same error here. Nothing changed ever side and it was working some months ago.
some ideas from today's perspective:
cifs
(not in borg), maybe including this issue here.1.2.2 is available from the borgbackup ppa and also from the github releases page here.
I edited the title slightly to reflect that we currently only have evidence about this happening with borg 1.2.0 (and cifs).
Seems like I'm still on 1.1.16, so my comment is not relevant. I'll try to upgrade and see if I still stumble upon this problem.
I've been doing backups on a cifs mount for a while without any issues (
borg@1.1.15
,cifs-utils@2:6.14-1
,linux@5.15.0
, Ubuntu if that matters).However, when trying out 1.2.0, I encounter a rather strange behaviour. When attempting a
borg check
, the program crashes while trying to create the lock on the repo. The filesystem returns a permission denied error, not because of filesystem permissions, but because the mountpoint gets borked. After the crash, I cannot list any file under the share, and I am forced to unmount/remount the folder in order to repair it.I think the underlying issue is probably with cifs rather than borg, but I'm filing this here since it works before 1.2.
Test scenario
#
denotesroot
command ;$
denotesuser:group
command.Using the following mount:
borg 1.2.0
Binary downloaded from the releases page
The kernel and system logs don't report anything at all. After unmounting + remounting (
mount -o remount
doesn't work), the lockfile has been created and we need to break the lock. Acquiring the lock from CLI and reading the repo doesn't trigger the bug.borg 1.1.17
Binary downloaded from the release page