New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.1.0: strange slowdown when backupping device node files #3130
Comments
your borg command line? |
Addition: dmesg shows this:
|
|
Looks like a bug. As you did not use --read-special, there should be no reason to open device files. |
It's the bsdflags support trying to open every file, even device files:
For non-existent devices, there will be an OSError "no such device".
@enkore So, just skip bsdflags processing for fs items that are not regular files or directories? |
opening a device file for a non-existing device can be very slow. also: lstat -> stat(..., follow_symlinks=False) like everywhere else.
Fix in #3137 updated. |
bsdflags support: skip blk/chr/lnk file type, fixes #3130
opening a device file for a non-existing device can be very slow. symlinks will make the open() call fail as it is using O_NOFOLLOW. also: lstat -> stat(..., follow_symlinks=False) like everywhere else. (cherry picked from commit a6ee4e9)
bsdflags support: do not open BLK/CHR/LNK files, fixes #3130
I have several Debian build-roots, all created with pbuilder/cowbuilder on one system.
During the backup of those build-roots, borgbackup slows down to a crawl, when it hits devices in /dev/ where no hardware exists in the host, for example in my case the floppy drive devices.
strace shows this:
Note the 3 second delay after each
open(".../dev/fd0...")
. (According to strace(1) the timestamp at the start of a line is the time elapsed since the start of the syscall on the line before.)A normal "living" system wouldn't have any devices without the needed hardware, because
/dev
is a tmpfs populated by udev. But in the build-roots, borgbackup hits the real filesystem below the tmpfs with tons on unneeded devices nodes and things get strange.In my case, the backup time regresses from ~45 seconds with 1.0.11 to over 12 minutes with 1.1.0.
The text was updated successfully, but these errors were encountered: