arvidn / libtorrent

an efficient feature complete C++ bittorrent implementation
http://libtorrent.org
Other
5.1k stars 984 forks source link

Files are corrupted on Mac when copied. #7360

Open Stokestack opened 1 year ago

Stokestack commented 1 year ago

libtorrent version (or branch): Reportedly 2.0

platform/architecture: Mac OS

compiler and compiler version: Don't know

After a torrent completes its download, it appears to be fine when left where it was deposited by the BitTorrent client. But (this is often seen with video files) if you copy the file to another drive, it is corrupted. In my case this happened with almost all files. This probably is fairly widely reported and it's discussed here: https://github.com/qbittorrent/qBittorrent/issues/16843

I tried different types of destination drives for the copy, and the problem is quite reproducible.

arvidn commented 1 year ago

What file system do you use on the download drive? I image it's either APFS or HFS+.

If you copy the file to the same drive, does that still exhibit the corruption?

Stokestack commented 1 year ago

The download drive is APFS. The copied-to drives were ExFAT.

Unfortunately it looks like I deleted the older downloads. I've since updated QBitTorrent to the non-libtorrent20 version.

Stokestack commented 3 months ago

Looks like this is still ruining files for people. Anybody have insights on it? Thanks!

vincejv commented 3 months ago

+1 i can confirm this issue as well not mac, but on linux BTRFS ssd to BTRFS hdd moving files through incomplete/complete download feature on torrent client, it starts to seed after the files were moved from incomplete folder to complete then detects then midway it detects a "corruption", then redownloads the file again, probably due to the new broken disk io on v2, i'm reverting to Libtorrent v1.

Weird thing is it's consistent, when it's corrupted (doesn't happen all the time), only 1 piece (or the the last piece) gets corrupted and redownloaded, and the rest of the file seems to pass the hash check, so I don't see it being a hardware or ram corruption issue.

I have noticed this issue of Libtorrent 2 only, not on Libtorrent 1, using the latest Kernel LTS v6.6.23. As previous users mentioned, mostly occurs when downloading very large files >20gb

QBT 4.6.4