Registered Member
|
I just tried downloading a ~180MB video with KTorrent 1.1rc1 but when I got to the end I couldn't open the video.
I realised the video was corrupt, so I opened the torrent with bittornado and it found the file was only 92.8% complete. Is it possible that KTorrent's SHA1 piece checksumming is not working properly? KTorrent told me the file was complete but 7.2% of the file did not checksum correctly (possibly poisoned by fake clients?). |
Registered Member
|
It's strange that you couldn't even open that video. You only need a few first chunks of the file to start the video. If the video file is corrupt in somewhere in the middle or it has missing chunks that part is skipped in most video players. Is the first chunk downloaded? Does the KT show "Preview" - "yes" in FileView? Try previewing that file from KT.
Anyway, you should send that torrent to us so we can check it out. See FAQ on main page for email. Another thing, try installing latest development version and use the tools from 'debugtools' directory. You'll find 'ktcachecheck' program and you can use it to scan your torX directory. It'll show you if any chunk has wrong checksum. |
Moderator
|
Forget the lastest development version you can find the a 1.1 tarball here :
http://ktorrent.pwsp.net/downloads/1.1/ After you install it, cd to the folder to store temporary files (see settings dialog of ktorrent). And in that directory : ktcachcheck torX Replacing X by the right number |
Moderator
|
No checksumming works, poisoned chunks will be detected (unless they find a way to generate random data, which has the same checksum as the chunk). The bug has to happen when we write the chunk to disk. |
Registered Member
|
|
Registered Member
|
Ok, after a bit of Python scripting
I filtered out bytes that differ, and they are not remotely random. I managed to compress the 13MB of differences down to 160KB with bzip2. file identifies the poison as MPEG ADTS, layer I, v1, Monaural, which is what it identifies the corrupt download as. The valid download is correctly identified as an AVI stream.
I assure you that it is impossible to forge a 160-bit SHA1 cryptographic hash Besides, btdownloadcurses successfully identified the broken sections and replaced them.
The data that I've extracted suggest that what has been wrongly written is low entropy (just looking at it, it's very repetitive), concentrated towards the start of the file, and is totally wrong rather than just the occasional byte error. I can't imagine why a bug in writing the data would produce these statistics but I don't know the code. |
Moderator
|
Send me the torrent, you can find my e-mail address in the faq
http://ktorrent.pwsp.net/index.php?page=faq#q2 |
Registered Member
|
Hi from 2010. I have the same problem.
I've downloaded a video. Ktorrent says that torrent is ok and re-checks it successfully twice. Then video stucks on third minute. I re-check the torrent and around 50% of downloaded chunks are SUDDENLY appear to be broken. Then ktorrent re-downloads broken chunks. After re-checking it has about 5% of broken chunks. Another re-download, torrent completed. Fact that I have to make client re-download torrent from two up to ten times disappoint me. Used version: 3.2.4, but the problem appears in newer and older versions. Any ideas? Upd. Now the video stalled on the 14th minute. After re-checking ktorrent found 85 corrupted chunks. Torrent attached: [attachment=0]346a14ffc44172ed919f0c0f7c2b1ccf718db827.torrent[/attachment]. Note that other clients do not have this problem, but ktorrent does not load CPU up to 100%. |
Moderator
|
Sounds to me like something else is corrupting that video, if a data check succeeds after the download, then it is fully downloaded.
What video player are you using ? Do you still seed the torrent once it is finished downloading ? |
Registered Member
|
>Sounds to me like something else is corrupting that video
Probably. But no other programs except KTorrent and video player are reading/writing to the file. >if a data check succeeds after the download, then it is fully downloaded. It would be just perfect. As I said before, KTorrent says that the video is downloaded and does data check after it. Data check is successful. To make sure, I re-check it twice and there are no corrupted chunks. >What video player are you using ? MPlayer and VLC. Mplayer exits with "Exiting... (End of file)" message, VLC shows glitches (like http://www.donrelyea.com/readymade_glit ... C03648.jpg), and video is freezes for few seconds. Then I start re-checking video and KTorrent finds up to 50% undownloaded/corrupted chunks. >Do you still seed the torrent once it is finished downloading ? Yes, I do. I've set "check chunks while uploading", but that has no effort. |
Moderator
|
What if you stop the torrent once it is finished, exit ktorrent and then start playing the video ?
|
Registered Member
|
Nice idea. Will report after doing it.
<...> It works. MD5 sum matches, video plays smoothly. Thanks. But how about seeding while watching? |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]