Ticket #66 (closed defect: worksforme)

Opened 7 years ago

Last modified 4 years ago

completed torrent drops to 0%

Reported by: yoshi3@autograf.pl Owned by: rakshasa
Priority: normal Component: rtorrent
Version: Severity: critical
Keywords: Cc:

Description

when download completes file gets wiped out and starts from 0 MB again. this could be an error with hashing or so.

happened with rtorrent 0.7.5

i'll test it some more. maybe it was just random. but i lost my 4GB download. :/

Change History

Changed 7 years ago by rakshasa

Are you sure it got wiped and that it isn't just checking the hash? check_hash is by default turned on now.

Changed 7 years ago by Suger

Same thing just happened to me now. Download on a 1.3 Go file just restarted from zilch :-( It's not hashing : I'm downloading at 100 KB/s

Changed 7 years ago by Suger

and strangely enough, on relaunching today, it started hashing and then seeding, while the DL wasn't complete yesterday ??

Changed 7 years ago by rakshasa

  • status changed from new to assigned

It wouldn't actually wipe the data from the disk, but when completing it propably messes up by clearing the state and forgetting to do hash checking. I'll look into it.

Changed 7 years ago by rakshasa

BTW, what OS, compiler and file systems are you using? Does this bug accure repeately or did those just happen once?

Changed 7 years ago by rakshasa

Looking at the code, I realize that it doesn't give an error when files can't be opened, but instead just skips those in the hash check.

I should propably add some handling for that, so it gives an error message instead.

Changed 7 years ago by rakshasa

This patch will throw an exception for two possible places it could have been going wrong.

Changed 7 years ago by yoshi3@autograf.pl

to the first question -> after it finished downloading the file was full of identical bytes, they shown as "." when viewed via mc (i threw the file away, so i don't really remember what was there)

partial files are fine. only the finished download is broken.

i use gentoo linux, data files are on ext3 partition, system is on reiserfs (v3.6) compiled with gcc-3.4.4

Changed 7 years ago by rakshasa

'mc' wouldn't happen to be midnight commander? Please use hexdump to see the data, if they are zero'ed out then there might be a problem with the files being overwritten when restarting the torrent.

But i explicitly tell it to open files with only the O_CREAT flag, not O_TRUNC. But tell me... is it possible that you deleted the files being downloaded? The download would go on like normal since they arn't purged before all references to the files are closed. But when it stops to recheck the hash it will close those files, thereby losing all the data.

Changed 7 years ago by rakshasa

  • status changed from assigned to closed
  • resolution set to worksforme

I'm closing this ticket as I fixed things that could have been causing this problem. If this problem is still present in 0.7.6, please reopen this ticket or create a new one.

Changed 4 years ago by margo

hAdXAL f85fkalfbc63m7jgd82hk0

Note: See TracTickets for help on using tickets.