qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
27.67k stars 3.92k forks source link

Incomplete download at 100% #7850

Open IvayloTsvetkov opened 6 years ago

IvayloTsvetkov commented 6 years ago

Please provide the following information

qBittorrent version and Operating System

Windows 10 64bit, (10.0.1xxxx) qbittorrent version 4.0.1

What is the problem

Often when i download video files (100%), i can't open them. So I have to do Force checks just to see that it's 99.9% instead of 100%. This problem wasn't present prior to 4.0.0

What is the expected behavior

It shouldn't say 100% when it's not really at 100%

Steps to reproduce

Obvious to reproduce. Download more than 1 video file until the problem occures, because the problem is inconsistent.

WickedtMe commented 3 years ago

I am having the same problems, except, if i try to open a file that says 100%, it freezes up my computer, and i have to do a manual reset, it sucks. Also if its downloading more then 1 file, i have to wait for all files to download, so i can re check them 1 at a time, do i need to change programs or is there a fix, because this is not aceptable.

shiftypenguin commented 3 years ago

For context, I'm running qbit 4.1.5 on Debian 10, which is being virtualized in bhyve with the files shared over virtio-9p. I don't think the virtualization or virtio-9p is a factor...

I migrated my config and torrents from 4.3.1 and it had to re-check all 183 of my torrents, I assume because fastresume files changed formats or something. But 3 torrents so far have gotten stuck at 99.9% and stalled. So it seems to happen also when just re-checking, not just when downloading.

Just force-rechecking those didn't fix them. I deleted the fastresume files for those 3 torrents, and I closed qbit, and opened it again, and it rechecked those three automatically, and it completed them. I can provide the fastresume and torrent files (backed up before deleting them) if that's helpful.

ujjwalk308 commented 3 years ago

I'm on v4.3.4.1 (Win10). This happens to me every time I have multiple torrents with active downloads. All default options set with no changes in Settings/Options. I was able to complete the downloads by forcing a recheck from the context menu.

samayo commented 3 years ago

always the same issue with this client

Asday commented 3 years ago

I can provide the fastresume and torrent files (backed up before deleting them) if that's helpful.

@shiftypenguin it sounds like they were exactly the issue in your case, so providing them would be very helpful.

DrivebyCoding commented 3 years ago

As an extra point of data, not exactly matching the "100%" description of the issue, but perhaps related:

I have reproduced getting stuck at the last little bit while being connected to only 100% peers several times by downloading a large number of torrents (100s) in parallel while running out of disk space. So far cleaning out some space and a recheck has solved the problem each time; this usually lowers the complete percentage by 0.1% or so. Only cleaning out space gets a spike of activity and then it's stuck at 99.9%.

The only non-standard config is that I allow for several times more connections than default and that downloads are done to a smaller disk and automatically moved to a large enough disk when finished.

qBittorrent 4.3.3 on Ubuntu

matiaszanolli commented 2 years ago

I can confirm this issue is still happening in v4.3.9, Arch Linux amd64.

I've download a lot of torrents before without issue, yet when I was downloading a database backup from the Internet Archive a single ~670MB file stalled with only 50KB remaining. The weirdest thing is that having the Internet Archive has HTTP sources on their torrents to avoid this, yet qBittorrent seems to be ignoring them.

Please let me know if there's anything I can do to give a hand testing anything (or I don't mind getting my hands dirty with the code, I've been developing for over 15 years :) ). I love qBitTorrent and it would be awesome to have this bug finally fixed.

shiftypenguin commented 2 years ago

I had to re-add all my torrents recently, and a few didn't check completely. They got stuck at 99.9%. It could be related, but what I found out was the files I was checking had single null bytes in the blocks that wouldn't check. Their location seems random. I have to assume that was qbit's doing, but I've had the files forever, so I have no idea what version would have done that.

glo888 commented 2 years ago

I still experience this on 4.4.0 I initially thought it was a problem with my internet connection or occurred when I stopped and resumed a torrent but it happens to most large torrents 2gb+. I have to manually recheck every torrent to download(redownload?) the last 1 or 2mb. It's not much but it's enough to render the download corrupt and unable to open. Having to recheck 40-50gb torrents each time can get pretty annoying.

lslqtz commented 2 years ago

Same issue 4.3.9 (and 4.4.2, sometime)

Krolitian commented 2 years ago

Also having the same issue on 4.4.2. All torrents get stuck at 100%, where download cuts off when according to the Content tab, a few percent still remains and Remaining detail says 0 B left in the torrent window. Tried to force a recheck as others suggested, but it always just gets stuck on Checking Resume Data because it refuses to connect with peers as it thinks it's 100% downloaded.

idk commented 2 years ago

Same issue, Windows 10, i9 9900k, RTX 3070, longtime qbitorrent user, I've had this problem in the past years off and on but it seemed to go away right away or I just dealt with it for a few weeks and then it went back to normal again or it seemed to get fixed after an update perhaps?

Downloaded 55 torrents earlier today, 49 still say downloading (progress meter says 100% and has 0 current download activity) with 6 completed/seeding.

Each torrent in question when you look at the Client shows 100% but in content tab it's not, it's a lower incomplete percentage. Like 63% or 45.2% etc.

Most of my torrents I downloaded in past week this problem happens, it started happening a few weeks ago and today I tried in older version 4.4.1 as well after all these incompletes and it persists/didn't remedy it.

Also once torrent is 100% (but incomplete), in the Content tab I can tick/untick boxes and it has no effect on the torrent, it does not change from 100% meter ever or start downloading newly requested files.

Checking torrents does not fix it.

Also qbitorrent does not shut down when it has torrents in this state, the client closes but it remains in task manager and in task area icon saying "qbitorrent shutting down", it remains for 2+ hours, I finally killed the process.

The only thing that seems to fix it is eventually, (hopefully) leaving the client open, depending on number/size of torrents after many minutes/hours/days the torrent file(s) becomes completed and it starts seeding.

Any recommendations on how to start fresh to avoid this issue as it seems constant now for me or on how to fix the incomplete files I still have here after many hours without having to leave client open for hours to complete them? I see after 5 minutes of typing this reply that 2 of the 49 broken torrents are now Seeding and complete.

Is there more info I can offer from my end to help fix this bug?

glassez commented 2 years ago

Is there more info I can offer from my end to help fix this bug?

Could you select one of such torrents and get a screenshot of general tab with ‘Pieces:’ in view?

idk commented 2 years ago

This? https://imgur.com/a/0qQNI9q

Here's Content Tab as well: https://imgur.com/a/jRwgP0X

MaverickBlue commented 2 years ago

Also having the same issue on 4.4.2. All torrents get stuck at 100%, where download cuts off when according to the Content tab, a few percent still remains and Remaining detail says 0 B left in the torrent window. Tried to force a recheck as others suggested, but it always just gets stuck on Checking Resume Data because it refuses to connect with peers as it thinks it's 100% downloaded.

Same here, this last week it's now been showing torrents @ 100%, still staying in either "Downloading" or "Stalled" status, never shows as seeding, and sometimes when I click the torrent the reported amount of the files downloaded doesn't match the torrent list amount of torrent downloaded

MrDzmitry commented 2 years ago

Mac OS 12.2.1, qbittorrent 4.4.2 problem is here. Download 80+gb file, recheck = 98.5% completed, download missed, recheck = 99% completed, repeat again for some times, then it's okay.

Some weeks before I rechecked all my torrents (200), they all were on different ssd (i have 8 1-2tb) and 50% of them were incompleted. I thought APFS or SSD is the reason, but my new hdd 8tb has the same problems.

mxtsdev commented 2 years ago

Had this problem and a heap of other issues with qBittorrent 4.4.2 x64 Qt5, Windows 10 x64 including stalling downloads, slow downloads, slow rechecks, application crashes on recheck, failing to retrieve metadata etc.

Could not find anything in the logs so I tried a number of different settings to see if it had any effect but without result. I reinstalled, downloaded to a local disk, -network path, multiple torrents at once, single torrent, turned all anti-virus off, lowered file pool size to 1, disabled the os cache, retried rechecked failed downloads multiple times and redownloaded the same torrents multiple times to compare.

Same issue one each attempt - different files fully or partially filled with zeros with progress showing 100% and all pieces downloaded. The pieces are downloaded but never gets written to the file.

Checked the forum and the issue tracker here to get a sense of what issues were being reported by other users and compared with the issues reported for libtorrent and there is a considerable overlap. Figured I'd install qBittorrent (3.3.9) to see if the same issue was present in that version but instead found there was a download for a version 4.4.2 compiled against libtorrent 1.2.x (RC_1_2 branch). I uninstalled qBittorent, wiped the settings and reinstalled qBittorent 4.4.2 x64 Qt5 libtorrent 1.2.x. https://sourceforge.net/projects/qbittorrent/files/qbittorrent-win32/qbittorrent-4.4.2/qbittorrent_4.4.2_RC_1_2_qt5_x64_setup.exe/download

I have since downloaded the same torrents a number of times using the new qBittorent install and have yet to experience a incomplete download or any of the other issues mentioned which previously happened with 100% frequency.

jpschafer commented 2 years ago

I am currently having an odd albeit similar problem, where certain files will report as 0% near 99%, but I check them, and they are fully downloaded.

ghost commented 2 years ago

This? https://imgur.com/a/0qQNI9q

Here's Content Tab as well: https://imgur.com/a/jRwgP0X

This indicates that the download is completed 100% but pieces are still being validated/written to disk. If you wait some time the download should complete on its own.

glassez commented 2 years ago

IIRC, the root of this problem (and maybe of some other related problems) is that there is some inconsistency in how libtorrent accounts for progress (I do not know if there is some bug there, or if it is done so intentionally). It turns out that the data is counted as downloaded before the libtorrent completely finishes processing them, so we have this picture when some time may pass from the moment 100% progress is achieved to the finishing of the torrent (as can be seen from the reports, it can be quite long).

glassez commented 2 years ago

@arvidn, have you something to say about?

ghost commented 2 years ago

Libtorrent counts total_wanted_done before validating or writing the pieces I guess. It should be the other way around.

MaverickBlue commented 2 years ago

It was never completing, unless it is expected behaviour for it to take up to a day or more for that last percent(which is where I stopped waiting), when the rest of the torrent completed in minutes, and there were copious numbers of seeds.

chhil commented 2 years ago

I have this problem mostly on torrents that have multiple files.

Shows 100% for torrent and each file. The files are not 100% downloaded, a force recheck shows it's not 100%, then I resume the torrent it downloads, still at times it may be correctly showing 100% or incorrectly showing 100%

ICEknigh7 commented 2 years ago

Just happened to me on 4.4.3.1, Windows 10. Went to play a bunch of 100% video files and, after seeing that some of them were corrupted, a re-check revealed that they were, indeed, incomplete.

Only workaround right now is to enable "Recheck torrents on completion" under Advanced Options to see if anything's missing, so I suggest having it on as the default until this (kind of important) bug is fixed.

jcpoyser commented 1 year ago

I have been experiencing this issue on Mac Big Sur 11.7.1 and QBittorrent 4.4.3.1 - I was getting green, garbled or jumpy video files periodically. I thought it was bad source files... It seems to be happening to me when I had about 10 simultaneous downloads. and they were not multipart files. I happened to stop and restart qBittorrent and suddenly a bunch of files that were seeding at 100% suddenly appeared as 93 to 95% complete. I have just tried the workaround to enable "Recheck on completion" but it is curious this issue has been happening since 2017?

Asday commented 1 year ago

but it is curious this issue has been happening since 2017?

The likelihood is that it's not one single issue, it's more likely a symptom that's been happening for many many years, and it has a wide variety of causes, so it's not something that can easily be investigated and fixed, especially seeing as it's so sporadic and hard to reproduce.

IlyStra commented 1 year ago

Version: QBittorrent 4.5.0 lt20 qt6 64-bitQt: 6.4.0Libtorrent: 2.0.8.0Boost: 1.80.0OpenSSL: 1.1.1sZLib: 1.2.13 Torrent magnet link: magnet:?xt=urn:btih:089e8ddefcafbc0c5091ae78e156908f062ed3f6&dn=Better%20Call%20Saul%20(Season%2002)%20LostFilm&tr=udp%3a%2f%2fopentor.org%3a2710&tr=http%3a%2f%2fretracker.local%2fannounce&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80&tr=udp%3a%2f%2ftracker.leechers-paradise.org%3a6969&tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969&tr=udp%3a%2f%2ftracker.blackunicorn.xyz%3a6969&tr=http%3a%2f%2fpubt.net%3a2710%2fannounce&tr=udp%3a%2f%2fipv6.leechers-paradise.org%3a6969

At the beginning the torrent is downloading normally, the speed is normal and the peers above the roof, but when all the files reach 100% download I recheck them forcibly and all torrents are at 0% download, the speed drops to 0 b\s instantly and all peers disappear, this behavior lasts about 15-20 minutes, then the download begins as in the beginning. (Forgive the bad translation if it is bad)

Energiz3r commented 1 year ago

Is there more info I can offer from my end to help fix this bug?

Could you select one of such torrents and get a screenshot of general tab with ‘Pieces:’ in view?

Any update on this issue? Or at least how to fix the broken torrents so I can have them finish and move on?

I see the same as @idk - Torrent shows as Stalled at 100%, but in General tab, I see Pieces: 1117 x 8.0 MiB (have 1116) and on Content tab, one file shows Progress: 99%, Remaining: 7.9 MiB, Availability: 100%

Force re-check usually fixes it, but a couple of times it hasn't. I currently have a torrent in my list if you'd like to connect with me to take a look - feel free to add me on Discord Tangles#6014, or let me know how else I can help.

Torinde commented 1 year ago

@Asday - at least one of the cases should be easy to reproduce: #18318 I'm pretty certain of what sequence of user actions led to it (e.g. deselecting and re-selecting a file inside a torrent).

Energiz3r commented 1 year ago

@Asday - at least one of the cases should be easy to reproduce: #18318 I'm pretty certain of what sequence of user actions led to it (e.g. deselecting and re-selecting a file inside a torrent).

Hey you're right, can confirm in my cases I've deselected files then reselected them

Torinde commented 1 year ago

and that makes sense - when you deselect the non-finished files and leave selected only finished files, then you have 100% readiness for the current selection.

The problem is that this "sticks" and isn't recalculated to 99.9% when you re-select one of the missing files. I assume 100% is a trigger for moving the whole torrent to some "ready" category, which subsequently doesn't bother with readiness % anymore. That can be tested: deselect only one of multiple non-finished files. Readiness will increase from 98% to 99% (for example)? Re-select the file. If assumption is correct - readiness will go back to 98%.

Energiz3r commented 1 year ago

I'll note that this happens when the affected file was in low percentages rather than near completion

Rasanga commented 1 year ago
  1. Does this happen with other torrent clients as well?
  2. Does anyone know the root cause of this issue?
gcjbr commented 1 year ago

Happening to me

Mac Ventura, client is 4.5.2

I'm doing no partial downloads by deselecting parts of it. It will complete downloads and mark it as 100%, and if I force recheck it will sometimes drop to 80%

DiarrheaMcgee commented 1 year ago

same problem

armyatcdude commented 1 year ago

I'm going back to Tixati. This is ridiculous. I only tried this because of a suggestion. Tixati has never failed me.

glassez commented 1 year ago

I'll note that this happens when the affected file was in low percentages rather than near completion

What does it mean - "was in low percentages rather than near completion"? What moment are you talking about?

Energiz3r commented 1 year ago

idk but how hard is it for the software to look at the file completion % value, the overall torrent completion % value, and go "d'oh! better recheck!" even if you can't fix the root cause at least the bug won't exist for another 5 years

glassez commented 1 year ago

how hard is it for the software to look at the file completion % value, the overall torrent completion % value

Excuse me, look - where? Isn't the problem that it is seen as 100%, but the files on the disk have some missing data? So the only way to obtain up-to-date progress is a complete recheck of the files on the disk.

glassez commented 1 year ago

For those who really want to help solve this problem. Could you watch (or maybe even test purposely) if there is a problem in all of the following cases:

  1. The torrent is downloaded completely continuously (i.e. qBittorrent was not restarted during the torrent download)
  2. There was at least one restart of qBittorrent during the torrent download: 2.1. qBittorrent was restarted manually 2.2. qBittorrent was restarted due to system shutdown/restart
Torinde commented 1 year ago

how hard is it for the software to look at the file completion % value, the overall torrent completion % value

Excuse me, look - where? Isn't the problem that it is seen as 100%, but the files on the disk have some missing data? So the only way to obtain up-to-date progress is a complete recheck of the files on the disk.

The software can check the two values I describe in #18318:

At the end I still had the Content tab showing 99.9% (and those files as not yet downloaded), but in the main list the torrent became "100% Completed" despite having ALL files selected

At least my case seems straightforward - due to user deselecting/selecting files - one of the two values gets "confused" and shows wrong number. Unfortunately that's the value driving the work of the torrent. It just has to be synched with the other value (which is correct, but not "effective")

If the description of actions in my issue is unclear - let me know to rephrase. You can also see my comments in this thread further up.

glassez commented 1 year ago

At least my case seems straightforward - due to user deselecting/selecting files

Well, when different issues are discussed in the same topic, it's really confusing...

JamesENicholson commented 1 year ago

This seems to be happening more and more to me. You can clearly see that the torrent says it is 100% complete but the green highlights show it is not and it is still trying to download. Screenshot 2023-06-02 at 7 39 50 AM

glassez commented 1 year ago

This seems to be happening more and more to me.

So would you mind to investigate into it a bit? https://github.com/qbittorrent/qBittorrent/issues/7850#issuecomment-1551004440

JamesENicholson commented 1 year ago

I am happy to investigate. I have torrents which go past 100% (to like 100.2%) but are clearly not complete and go back and forth between checking and download and moving until final the progress indicator bar FINALLY shows as 100% blue and then the torrent finally completes. There is something wrong with the qbittorrent client. as this happens with nearly every torrent that downloads "quickly" meaning that availability is high and download rates are high. Torrents that only have 1 or 2 seeds and download slowly almost never exhibit this behavior. It is almost like a fast download outpaces error checking etc. and then gets to the end too fast and has to go back and check and redownload some small pieces it missed that it thought it got.

deadblue22 commented 1 year ago

Same problem. And checking on the 'Recheck torrents on completion' also useless.

gcjbr commented 1 year ago

I can confirm this happens for Torrents there are downloaded integrally without interruptions.

Em seg., 12 de jun. de 2023 15:37, deadblue @.***> escreveu:

Same problem. And checking on the 'Recheck torrents on completion' also useless.

— Reply to this email directly, view it on GitHub https://github.com/qbittorrent/qBittorrent/issues/7850#issuecomment-1587873000, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6DCUXEZBHKKOEM4GPQ2O3XK5OU7ANCNFSM4EFDRREA . You are receiving this because you commented.Message ID: @.***>

JamesENicholson commented 1 year ago

Yes, it seems to happen for me on torrents that are dowloaded very quickly, almost like in burst mode, where the download rate exceeds 1MB/sec usually with lots of seeds. On a slow download (less than 1MB/sec) and maybe 1 or 2 seeds it never happens. It is almost as if it can't write to the disk fast enough so it keeps it in memory and then doesn't clear the buffer or memory to the disk fast enough and then gets confused. On a recheck there are invariably 5, 10, 20, 100 pieces that were not downloaded and the torrent requeues for download to grab the sections that it didn't actually get. This never used to happen in earlier versions of qbittorrent (like versions 3.x or 4.1.x). But it seems to be happening more and more with more recent versions of qbittorrent.

spencercnorton commented 1 year ago

@JamesENicholson I get the exact same indications - high download speed on smaller sized torrents seems to have a much higher likelihood of creating the issue.