snowyu / libtorrent

Automatically exported from code.google.com/p/libtorrent
Other
1 stars 0 forks source link

zombie sparse flag remains set on fully downloaded files #695

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
A torrent containing a Matroska video file downloads completely with no hashing 
errors, yet a re-check produces an I/O error. The sparse flag seems to be 
involved in some way.

What steps will reproduce the problem?

1.Using qBittorrent 3.0.8 download the following to 100% (6.8GB):

magnet:?xt=urn:btih:411a7a164505636ab1a8276395b375a3a30bff32&dn=TPB.AFK.2013.108
0p.h264-SimonKlose&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2
Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969&tr=udp%3A%2F%
2Ftracker.ccc.de%3A80

The film is under a CC-BY-NC-ND license. Sharing via torrent is encouraged by 
the author.

2. After downloading to 100%, right click -> force re-check on the torrent

3. At some point re-checking stops with the following error message: "An I/O 
error occured for torrent TPB.AFK.2013.1080p.h264-SimonKlose. Reason: 
TPB.AFK.2013.1080p.h264-SimonKlose file 
(C:</path/to/>TPB.AFK.2013.1080p.h264-SimonKlose.mkv) error: The file or 
directory is corrupt."

What is the expected output? What do you see instead?

Expected output is a working mkv file, since it downloads to 100% with no 
hashing errors at first. Instead playing back 
TPB.AFK.2013.1080p.h264-SimonKlose.mkv in MPC-HC from the CCCP codec pack 
(http://www.cccp-project.net) resulted in video and audio freezing at a certain 
point. This is how i first noticed the problem, which lead me to do the 
re-check that produces the above mentioned error.

Re-checking the same file in utorrent 2.2.1 also fails with "error: the file or 
directory is corrupted and unreadable".

What version of the product are you using? On what operating system?

qBittorrent 3.0.8 which uses libtorrent 0.16.7.

OS: Windows 7 SP 1 64bit fully patched.

I was able to reproduce the error on another machine, OS Win 7 SP 1 32bit fully 
patched, by downloading the torrent again.

Please provide any additional information below.

The reason i'm calling this the zombie sparse flag 
(https://code.google.com/p/libtorrent/issues/detail?id=143) is that right click 
-> properties, details tab shows "Attributes AP". To my knowledge P stands for 
Sparse 
(http://serverfault.com/questions/34692/windows-file-and-folder-attributes-a-or-
c/34711#34711). Yet checking the file with "fsutil sparse queryflag" reveals 
that "This file is NOT set as sparse".

Setting the file as sparse using "fsutil sparse setflag", it becomes playable 
in MPC-HC without freezing. Re-checking the file in utorrent (to avoid 
qBittorrent re-setting the sparse flag) afterwards shows it to be 99.7% 
complete.

I'll be happy to provide any additional info if needed.

Original issue reported on code.google.com by emptyeig...@gmail.com on 12 Feb 2013 at 7:07