borg create (1.2.4) hangs on random files, no more activity nor IO, then get disconnected from remote. No issue when using rsync or netcat
- Dominant language
- Python
- Stars
- 13.7k
- Forks
- 875
- Avg merge
- 11h 15m
- Merged PRs (30d)
- 192
Description
## Have you checked borgbackup docs, FAQ, and open GitHub issues?
A lot
## Is this a BUG / ISSUE report or a QUESTION?
a BUG. And if I use `rsync`, there's no issue, so I guess the issue comes from `borg`, not from my network stack or routers across the network.
The filesystem is clean, `badblocks` and `e2fsck` passed, no error.
## System information. For client/server mode post info for both machines.
#### borg version
1.2.4 both sides
#### Operating system (distribution) and version.
Debian 12 both sides
#### Hardware / network configuration, and filesystems used.
##### client
- Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz 8 cores
- 16GiB RAM
- MTU 1500
- 10 MiB/S network speed
- ext4
##### server
- Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz 8 cores
- 32GiB RAM
- MTU 1500
- 10 MiB/S network speed
- ext4
#### How much data is handled by borg?
around 500GiB
#### Full borg commandline that lead to the problem (leave away excludes and passwords)
borg create -v -s -p --compression lz4 --lock-wait 6 root@backup:/home/borg/foobar/::2023-07-13_0421 /home /usr/local/bin /root /etc /opt
## Describe the problem you're observing.
`borg` hangs randomly everytime I run a backup.
1. the prompt hang on a file
2. then, no more IO activity detected in `htop`
3. `strace` on `borg` pid show tons of `pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)`
4. finally, the remote server kill the connection after around 10mn
5. the `strace` show that `borg` close file descriptors
#### Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.
Everytimes, yes. Just need to run `borg create ...`
#### Include any warning/errors/backtraces from the system logs
`strace` when `borg` hangs:
```
[...]
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=250787020})
read(7, "Timeout, server not responding.\r\n", 32768) = 45
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1706913, si_uid=0, si_status=255, si_utime=69 /* 0.69 s */, si_stime=21 /* 0.21 s */} ---
write(2, "Remote: Timeout, server not responding.\r\n", 53) = 53
pselect6(8, [5 7], [4], [4 5 7], {tv_sec=1, tv_nsec=0}, NULL) = 3 (in [5 7], out [4], left {tv_sec=0, tv_nsec=999995357})
read(5, "", 10485760) = 0
close(14) = 0
close(13) = 0
close(12) = 0
close(11) = 0
close(10) = 0
close(9) = 0
close(8) = 0
close(6) = 0
close(3) = 0
```
Contributor guide
Assessment
This issue has not been assessed yet.