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

Hash check on download completion found bad chunks, consider using "safe_sync" #585

Closed
JanSimek opened this Issue Mar 26, 2017 · 11 comments

Comments

Projects
None yet
6 participants
@JanSimek

JanSimek commented Mar 26, 2017

When I start downloading torrents with rtorrent, I get these messages in journalctl:

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

@pyroscope

This comment has been minimized.

Contributor

pyroscope commented Mar 26, 2017

Diagnostics w/o a config doesn't work. Plus info about the metafile in question, like the data size.

@JanSimek

This comment has been minimized.

@chros73

This comment has been minimized.

chros73 commented Mar 26, 2017

but when I add safe_sync = yes to 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?

@pyroscope

This comment has been minimized.

Contributor

pyroscope commented Mar 26, 2017

Arch linux, rtorrent 0.9.6

@JanSimek

This comment has been minimized.

JanSimek commented Mar 27, 2017

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)

@JanSimek

This comment has been minimized.

JanSimek commented Apr 17, 2017

I switched from rtorrent to Transmission and so far not a single issue, so there is definitely something wrong with rtorrent.

@rakshasa

This comment has been minimized.

Owner

rakshasa commented Apr 21, 2017

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?

@johnhamelink

This comment has been minimized.

johnhamelink commented Apr 21, 2017

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.

@runderwo

This comment has been minimized.

runderwo commented Jun 3, 2017

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.

@JanSimek

This comment has been minimized.

JanSimek commented Jul 2, 2017

It started happening with transmission as well, so this is not an rtorrent issue. I think you are right @runderwo

@JanSimek JanSimek closed this Jul 2, 2017

@JanSimek

This comment has been minimized.

JanSimek commented Jul 23, 2017

Just in case someone stumbles upon this issue, I have reformatted the partition to EXT4 and it works flawlessly.

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