Skip to content
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

borg crashing my system - why does it open "dev/..." files ? #3159

Closed
devZer0 opened this issue Oct 13, 2017 · 4 comments
Closed

borg crashing my system - why does it open "dev/..." files ? #3159

devZer0 opened this issue Oct 13, 2017 · 4 comments

Comments

@devZer0
Copy link

devZer0 commented Oct 13, 2017

i found that my virtual backup machine constantly crashed when running borg 1.1.0. no problems with 1.0.11

despite the fact that it´s weird that "head -n0 /dev/hpet" is crashing my virtual xenserver backup VM - i wonder why borg 1.1.0 does open() on device files at all while borg 1.0.11 doesn`t - and while rsync can handle and transfer that without a problem ( i rsync different VMs to centralized location and do borg backup from there - including /dev directory)

no problem:

# strace -f ./borg_1.0.11_backup.sh 2>&1 |grep "dev/hpet"
[pid  1727] lstat("dev/hpet", {st_mode=S_IFCHR|0600, st_rdev=makedev(10, 228), ...}) = 0
[pid  1727] llistxattr("dev/hpet", "", 4096) = 0
[pid  1727] getxattr("dev/hpet", "system.posix_acl_access", NULL, 0) = -1 ENODATA (No data available)
[pid  1727] getxattr("dev/hpet", "system.posix_acl_default", NULL, 0) = -1 ENODATA (No data available)

borg 1.1.0 crashing my machine:

# strace -f ./borg_1.1.0_backup.sh 2>&1 |grep "dev/hpet"
[pid  1945] lstat("dev/hpet", {st_mode=S_IFCHR|0600, st_rdev=makedev(10, 228), ...}) = 0
packet_write_wait: Connection to backupvm2 port 22: Broken pipe

repro-case:

# head -n0 /dev/hpet
<crash>

let´s have a look what it`s doing on other device files which do not crash machine on open():

# strace -f ./borg_1.1.0_one.sh 2>&1 |grep "dev/fuse"
[pid  1552] lstat("dev/fuse", {st_mode=S_IFCHR|0666, st_rdev=makedev(10, 229), ...}) = 0
[pid  1552] open("dev/fuse", O_RDONLY|O_NONBLOCK|O_NOFOLLOW|O_CLOEXEC) = 5
[pid  1552] llistxattr("dev/fuse", "", 4096) = 0
[pid  1552] open("dev/fuse", O_RDONLY|O_NONBLOCK|O_NOFOLLOW|O_CLOEXEC) = 5
[pid  1552] getxattr("dev/fuse", "system.posix_acl_access", NULL, 0) = -1 ENODATA (No data available)
[pid  1552] getxattr("dev/fuse", "system.posix_acl_default", NULL, 0) = -1 ENODATA (No data available)
@ThomasWaldmann
Copy link
Member

duplicate of #3130

@ThomasWaldmann
Copy link
Member

It's a bit strange though that opening some dev files is enough to crash a machine.
borg does not even read from the open file, it just does some ioctl and closes it again.

@enkore
Copy link
Contributor

enkore commented Oct 14, 2017

Just opening /dev/hpet crashing the machine is probably a Linux kernel bug. On my system the file has group perms for the "audio" group, so this might be a denial of service on some systems.

@devZer0
Copy link
Author

devZer0 commented Oct 14, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants