-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when checking torrent with piece size of 256.0 MiB #21011
Comments
This is a consequence of incorrect client configuration, also you didn't specify libtorrent version, I suspect it's 2.0.
|
here are my supplementary informations: crash reportqBittorrent version: v4.6.5 (64-bit) Caught signal: SIGABRT
Log
|
It looks like your qBittorrent installation is broken, so it can't produce a useful stack trace. |
I think it's just some random trace due to out of memory, I tried to reproduce but the crash reporter just crashed itself, and my PC almost crash too.
Im curious if there are some qbittorent settings that can get rid of that. How do I get the right configuration? |
@YouMiNope any crashdumps in also, run |
Related to #19745 |
I found two crashdumps titled qbittorrent.exe that created yesterday when my PC crashed. the |
Dump gives above but no symbols/real info to go on.
You have qBittorrent installed here, does it have an associated |
sorry I forgot to mention that I reinstalled my qbittorrent with latest v4.6.5 while the crashdumps were created when I was using v4.6.2, I don't know if the v4.6.5 .pdb will help. that file is too big to upload in github, if you want it I can email it to you. by the way I tested libtorrent 2.0 built and it works very well. |
No need to upload The issue seems to be only with libtorrent 1.2.x version, It would be most helpful & highly appreciated if you could try to produce a valid stack trace (using libtorrent 1.2.x version) from instructions/method in #20869 (comment) |
Seems like I captured a crash. the log file produced by debugdiag as follows: hope that will help |
@YouMiNope Can you share the torrent file or hash (if it's not a private torrent)? |
@scomnoob This type of crash only seems to manifest itself when using libtorrent 1.2.x - you are using 2.0.x (I am open to correction) Stack trace of
When this is produced, it also gives @arvidn Can you look at #19745 (comment) & also other exceptions/stack traces in log from #21011 (comment)
|
@stalkerok here is the torrent file I used |
Piece size 256mb |
torrent file from #19745 (comment) has same Piece size. |
What is the expected memory complexity of the check operation? qBittorrent v4.6.5 |
Perhaps @arvidn could comment on it.
Note that libtorrent 2.0 uses memory mapped files, so that memory can be consumed also for performing I/O operations. |
From my understanding that would show up in VIRT mem in top, but not in RES/SHR & it shouldn't generally result in memory starving other processes. Just checked a 7.8GB torrent and the RES/SHR shot up from somewhere around 300MB to 5.3GB. When the check was finished it went back down. So something is amiss. Thinking about the specifics of my setup (assuming this is not the most generally observed behavior), could a file access through a symlink be a part of the issue? By the way, the torrent creation memory requirements are also horrendous on my system, but I can use other tools for that. The check is kind of unavoidable. |
I've tested & confirm this crash with torrents containing (piece size of 256.0 MiB) only with libtorrent 1.2 based builds. As you can see from the statistics window below, the cache buffer grows & grows - it will use all available memory/RAM & use what storage space is available on a drive expanding the paging file......when there's no space left...it will eventually lead to a crash. |
Has anyone investigated this issue in more detail? Are there any other conditions besides piece size: the full size of the torrent (and as a result the number of pieces), the size of the files in the torrent? As I understand it, it doesn't crash immediately after checking is started, right? Then how would it behave if checking is paused at some point before it crashed, and then resumed? |
@glassez I've downloaded 3 files & created 3 torrents via qBittorrent v5 (LT2.0) with 256.0 MiB piece size: Loaded them into qBittorrent 4.6.7 (LT1.2)
|
Doesn't the 1. have such symptoms, but in proportion to its size? |
How does it behave when created using 128 MiB piece size? |
No, it doesn't even seem to make a blip on cache
|
Could this setting be related?
https://www.libtorrent.org/reference-Settings.html#checking_mem_usage |
That's 256 blocks of 16 KiB each, so it's only 4 MiB.
You could test different values anyway. |
I would rather sin against disk read buffers. |
The bad news is that this is a problem with libtorrent 1.2, not libtorrent 2.0. This reduces the chances that I will deal with it. |
The problem though is that if certain users make torrents with the likes of |
Libtorrent 2.0 seems to reject torrents with piece size of 512MiB/1GiB from even being loaded/logs show invalid or missing piece etc. however libtorrent 1.2 creates similar error in the logs but allows these torrents to be loaded in to session & they remain stuck on "checking resume data" libtorrent 1.2 should flat out reject any torrent above 128MiB & not allow it to be loaded in to session. |
Good news. For some unknown reason, I still decided to make a "recon mission" to this problem. Fortunately, the cause of the problem was not too deep, so I seem to have detected it. I need to figure out some more details, but I'll deal with that later. |
I'll create one in the morning if nobody else does it in mean time. |
@glassez Upstream ticket has been filed, see: arvidn/libtorrent#7735 |
Disabling will reduce the number of users experiencing this issue. qbittorrent#21011 PR qbittorrent#21295.
Disabling will reduce the number of users experiencing this issue. qbittorrent#21011
I am having the same issue with the same files. I will share with you some torrents that cause this crash. |
In order to successfully check those torrents that I just linked in my previous post, I had to create a page file of 300 GB!!! That is ridiculous to have to create a page file that huge. There is no legitimate reason that a person should have a page file that big! The issue is that there is a memory leak in qbit when checking these large files! It reads the entire file into memory and if there is a subsequent very large torrent file (such as the ones I just submitted) then it tries to also read that entire file into memory while the previous file is also still in memory and it doesn't matter how much memory you have reserved in your page file, the system will always run out of memory! To successfully check those huge torrents, I had to check one of them (which takes an eternity). Then I have to completely shutdown qbit and wait for my computer to release all of that memory that was being used, then start qbit up again and then manually check the next file. If I attempt to check multiple files at once, it will crash guaranteed because it will always run out of page file memory no matter how big the page file is! Download those torrents and see for yourself! |
@Pryodon I've downloaded those torrent files & indeed they were created using a piece size of 256.0MiB - the author of libtorrent has now ensured that these types of torrents will be rejected from even loading. qBittorrent will include this block in it's next release & will also limit the creation of torrents to a MAX piece size of 128MiB Your option now is to remove those torrents/find an alternative source for the file which do not exceed 128MiB piece size or re-create these torrents keeping to the supported piece size. |
What I don't why is qBittorrent providing both 1.2 and 2.0 libtorrent versions? Why not the latest stable version? |
Both branches are still developed, they work differently and have different settings to tweak. So if there's any kind of issues with one, then the issue might not be producable with the other and it's giving one extra easy way to figure out regressions and what exactly still needs improvement.
Everyone doesn't need the latest version features. Many users still get faster more stable speed and more efficient computer resource usage with v1.2+. Latest version from v2_0 branch has annoying flaws that still need fixing before it should be recommend to everyone. There's no guarantee that in the future, the v2.1+ releases will immediately be good enough to replace v2.0+ & v1.2+. |
qBittorrent & operating system versions
qBittorrent: 4.6.5 x64
Operating system: Windows 10 22H2
What is the problem?
I have a torrent that contains 3813 files with a total size of 279.43GiB, when checking it consumes all my 16Gb RAM and then crash. I assume there is some algorithm flaw in the checking codes that need to be fixed.
Steps to reproduce
Additional context
My RAM useage:
qbittorrent:
Log(s) & preferences file(s)
No response
The text was updated successfully, but these errors were encountered: