When I start downloading torrents with rtorrent, I get these messages in journalctl:
b艡e 26 12:59:42 simserver kernel: attempt to access beyond end of device
b艡e 26 12:59:42 localhost kernel: sdc1: rw=1, want=3884075360, limit=3710935453
b艡e 26 12:59:42 localhost kernel: attempt to access beyond end of device
b艡e 26 12:59:42 localhost kernel: sdc1: rw=1, want=3884077408, limit=3710935453
b艡e 26 12:59:42 localhost kernel: attempt to access beyond end of device
b艡e 26 12:59:42 localhost kernel: sdc1: rw=1, want=3884079104, limit=3710935453
b艡e 26 12:59:42 localhost kernel: attempt to access beyond end of device
b艡e 26 12:59:42 localhost kernel: sdc1: rw=1, want=3884083200, limit=3710935453
b艡e 26 12:59:42 localhost kernel: attempt to access beyond end of device
b艡e 26 12:59:42 localhost kernel: sdc1: rw=1, want=3884085248, limit=3710935453
b艡e 26 12:59:42 localhost kernel: attempt to access beyond end of device
b艡e 26 12:59:46 localhost kernel: btrfs_dev_stat_print_on_error: 18 callbacks suppressed
b艡e 26 12:59:46 localhost kernel: BTRFS error (device sdc1): bdev /dev/sdc1 errs: wr 1525345, rd 813, flush 0, corrupt 0, gen 0
b艡e 26 12:59:46 localhost kernel: attempt to access beyond end of device
b艡e 26 12:59:46 localhost kernel: sdc1: rw=1, want=3861230848, limit=3710935453
b艡e 26 12:59:46 localhost kernel: BTRFS error (device sdc1): bdev /dev/sdc1 errs: wr 1525346, rd 813, flush 0, corrupt 0, gen 0
b艡e 26 12:59:46 localhost kernel: attempt to access beyond end of device
b艡e 26 12:59:46 localhost kernel: sdc1: rw=1, want=3861231744, limit=3710935453
b艡e 26 12:59:46 localhost kernel: BTRFS error (device sdc1): bdev /dev/sdc1 errs: wr 1525347, rd 813, flush 0, corrupt 0, gen 0
Torrent download usually fails with the message:
Inactive: Hash check on download completion found bad chunks, consider using "safe_sync".
but when I addsafe_sync = yes to rtorrent.rc, rtorrent doesn't start because it doesn't recognize the command.
I ran btrfs check --repair /dev/sdc1 which repaired some errors, but when I start rtorrent, the whole process starts over. Running smartctl -t short /dev/sdc found no HDD errors.
Arch linux, rtorrent 0.9.6
Diagnostics w/o a config doesn't work. Plus info about the metafile in question, like the data size.
but when I add
safe_sync = yesto rtorrent.rc, rtorrent doesn't start
Name of the command is changed, use: pieces.sync.always_safe.set=1
I can't help with the other problems, since I don't have these using ext4 on Ubuntu 14.04.
Btw, which version do you use on what OS?
Arch linux, rtorrent 0.9.6
Thank you @chros73. After adding the above setting to rtorrent.rc I don't get the hash check failed error anymore, but torrents just stop at various stages of completion with the status "Inactive:" and no other message. I enabled logging:
log.open_file = "rtorrent.log", (cat,/tmp/rtorrent.log.,(system.pid))
log.add_output = "info", "rtorrent.log"
log.add_output = "warn", "rtorrent.log"
log.add_output = "error", "rtorrent.log"
log.add_output = "critical", "rtorrent.log"
log.add_output = "notice", "rtorrent.log"
log.add_output = "debug", "rtorrent.log"
and the log file is full of these messages:
1490629551 I handshake_manager->255.255.255.255: Adding incoming connection: fd:15.
1490629551 I handshake_manager->255.255.255.255: Received error: message:6 unknown download.
(I replaced the real ip address with 255.255.255.255)
I switched from rtorrent to Transmission and so far not a single issue, so there is definitely something wrong with rtorrent.
The way rTorrent and Transmission do file and network stuff is very different, and my client has exposed more than a few kernel bugs.
So when there are weird issues that only seem to happen for certain combinations of kernel versions and file systems, etc, I've learned to be a bit skeptic. This smells of a filesystem+mmap issue.
The log says the file size is limited to 3710935453, what is the size of the file on the filesystem and the torrent?
I had a very similar issue to this by having a file open in OSX when creating a torrent in transmission, "scp"ing the torrent's contents into a server and then attempting to seed the torrent with rtorrent on said server.
b艡e 26 12:59:42 localhost kernel: sdc1: rw=1, want=3884075360, limit=3710935453
b艡e 26 12:59:42 localhost kernel: attempt to access beyond end of device
Are you sure the partition is sized appropriately for the block device containing it? This "attempt to access beyond end of device" often happens if a partition is cloned from another disk with the same nominal size (in this case, 2 TiB) but a differing (less) total block count.
It started happening with transmission as well, so this is not an rtorrent issue. I think you are right @runderwo
Just in case someone stumbles upon this issue, I have reformatted the partition to EXT4 and it works flawlessly.
I had this problem with a btrfs file-system. Also happened with transmission. Alternative solution: I was able to make a RAM-disk, torrent into there, then copy the file to hard-disk.
Most helpful comment
Just in case someone stumbles upon this issue, I have reformatted the partition to EXT4 and it works flawlessly.