Page 1 of 1
File corruption in Deluge 1.3.2
Posted: Mon Jun 06, 2011 6:34 pm
by jeps
I am using "Deluge 1.3.2" on a Ubuntu natty, 64 bit server.
When the download reaches 100% finished (and still seeding) I download the files to my work PC by using a FTP program.
I often get "archive corrupt" warnings when extracting the archives on my home PC.
I then have to have my FTP program "re-download" the bugged files again and hope for success the second time.
The file on the server is OK.
The only bullet proof way is to pause the torrent on the server, download the files and then start the torrent again.
My theory is, that something in the cache is not right.
Is there a way to force Deluge to write-out finished blocks immitiately?
Or is there something else I have to do?
Re: File corruption in Deluge 1.3.2
Posted: Tue Jun 07, 2011 2:51 am
by johnnyg
Do you have move completed enabled?
If you have move completed enabled and your ftp program automatically copies the file when it completes then I'd say what is happening is that the FTP program is transferring the file before it has a chance to be fully moved.
Re: File corruption in Deluge 1.3.2
Posted: Tue Jun 07, 2011 5:18 am
by jeps
No, "unfortunately" I don't have move completed set to enable.
Just for the sake of comparison

I have used several other bit torrent programs, and none of them show the same behavior.
So I am confident that the server file-system is sound and running.
Anything else I should try?
Re: File corruption in Deluge 1.3.2
Posted: Wed Jun 08, 2011 9:55 pm
by Cas
to debug properly you should do md5sum checks to see whether the archive file is corrupted during transfer and also test archive integrity before transfer.
Re: File corruption in Deluge 1.3.2
Posted: Fri Jun 10, 2011 5:19 am
by jeps
I have (I think!) got rid of the error. I have set "Cache size = 0".
Thereby forcing Deluge to write out all completed blocks of data at once.
Why does Deluge (and all other bittorrent programs) have a cache of the own instead of using the general cache in the OS?
Re: File corruption in Deluge 1.3.2
Posted: Fri Jun 10, 2011 10:40 am
by jeps
Well, I actually didn't get rid of the error.
The only 100% sure way to go is to pause the torrent, download the files and then restart the torrent.
This is a bit annoying.
Re: File corruption in Deluge 1.3.2
Posted: Fri Jun 10, 2011 12:49 pm
by Cas
Have you tried using the move complete command as that may ensure that the file is completed. Otherwise have you delayed the transfer by a minute or two to see if that gives it time to write out.
Re: File corruption in Deluge 1.3.2
Posted: Sat Jun 11, 2011 6:45 am
by jeps
I am considering trying the "move completed" feature.
Maybe I'll try it this weekend.
The FTP download doesn't start just a split second after bittorrent download says 100%. Normally 5 minutes till several hours pass before the FTP transfer starts.
And still I get the error.
The file on the server hard disk isn't corrupt, since the second FTP download of the file is okay.
Re: File corruption in Deluge 1.3.2
Posted: Sat Jun 11, 2011 7:06 am
by johnnyg
As Cas said, you could use a checksum like md5 or sha1 to determine where the problem is.
- When the download finishes, md5sum the file
- Pause, then restart the torrent to force it to write to disk
- Verify that the md5sum is the same
If it's not then you are correct in that the file isn't being written to disk properly and it's a libtorrent bug.
If it is the same then something is going wrong when you transfer it.
You could also try using something other than FTP (like rsync) to see if that's the problem.