Skip to content
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

qbittorrent is using an insane amount of memory when checking large torrents and forcing me to frequently check them #21063

Open
Pryodon opened this issue Jul 13, 2024 · 7 comments
Labels
Performance Waiting diagnosis Issue needs troubleshooting

Comments

@Pryodon
Copy link

Pryodon commented Jul 13, 2024

qBittorrent & operating system versions

qBittorrent: 4.6.5 x64
Qt: 6.4.3
Libtorrent: 1.2.19.0
Boost: 1.85.0
OpenSSL: 1.1.1w
zlib: 1.3.1
Windows 10 Pro x64 Version 22H2 (10.0.19045) OS build 19045.4651
Windows Feature Experience Pack 1000.19060.1000.0

What is the problem?

In the attached .zip file, I included the logs and torrent files I am having issues with. Each of the torrents are about 279 GB in size and contain many files.

See the two attached images. The program is using an extreme amount of memory when checking files. I had to manually create a 300 GB windows memory page file for the file checking to succeed! It appears that the entire 279 GB torrent file is being loaded into memory when it is being checked. When a subsequent torrent file is being checked, that is also loaded into memory causing windows to close qbittorrent because windows has run out of system memory. It only runs out of memory when I am checking the attached torrent files. The rest of my torrent files don't have this issue.

I started qbittorrent. I previously had the torrents downloading or seeding. The program forced me to check all of the torrents. These files are huge so I had to wait a long time for them to be checked. In order to successfully check the files, I pause them then check them one at a time. After I check one torrent, I have to close the program and restart it or else the system runs out of memory and windows closes the program. I start the program again and check the next torrent. Close the program. Restart the program. Check the next torrent. Close the program, etc.

I closed qbittorrent did some other stuff on my computer then I rebooted my computer. When I started up qbittorrent again, it said that all my files had to be rechecked again! This makes no sense to me because they were just checked earlier.

I could not locate a crash report log file but some of the logs have errors or warnings listed in them. Windows closed the program several times because it used up the entire 300 GB memory page file. I had to manually create a huge memory page file for the checking to succeed.

I must close qbittorrent after checking each of those torrents or windows closes it because it uses up all of the memory.

Steps to reproduce

You'll probably have to download at least two of the attached 279 GB torrents to reproduce this error. Each of these torrent files is about 279 GB.

I just started having an issue with the file checking yesterday. I had never had to check these files before then. qbittorrent is forcing me to recheck the files frequently.

Additional context

These two screen captures are of windows task manager showing just how much memory qbittorrent is using. I've got 32 GB RAM plus a 300 GB system memory page file and qbittorrent is using all of it!

qbottorrent
qbottorrent-memory

Log(s) & preferences file(s)

qbittorrent-errors.zip
qBittorrent.ini.txt

@stalkerok
Copy link
Contributor

stalkerok commented Jul 13, 2024

Piece size 256mb
Related #19745 #21011
also, perhaps #21042
Maybe we should start closing as duplicates already.

@Pryodon
Copy link
Author

Pryodon commented Jul 15, 2024

Here are two crash dump files I just noticed:
qbittorrent.exe.2168.dmp
qbittorrent.exe.8336.dmp

Any idea as to why qbittorrent is forcing me to recheck all of my torrents frequently? When I close the program, all of my torrents are downloading or seeding. Frequently when I start up the program, it forces me to recheck all of my torrents! It takes forever to check those huge files and as I mentioned, I have to babysit it while it is doing that.

Also, if I didn't make it clear above, when one of those files is checked, it is not unloaded from memory when it is finished being checked. If I don't close the program before the next file is checked, it also tries to load that file into memory while the other file is still in the memory causing windows to run out of memory and close the program. So, after each of those huge files is checked, I have to shut down the program, then start it up again to check the next file. This is very time consuming.

@xavier2k6
Copy link
Member

@Pryodon It does appear that you are suffering the same issue as pointed out in #21063 (comment)

However, one of those dumps that you provided (*8336.dmp) shows a stack overflow exception (0xC00000FD)

It would be most helpful & highly appreciated if you could try to produce a valid stack trace from instructions/method in #20869 (comment)

@xavier2k6 xavier2k6 added the Waiting info Waiting for participants to supply more info/fulfill template requirements label Jul 15, 2024
@Pryodon
Copy link
Author

Pryodon commented Aug 28, 2024

qbit-crash
qbit-mem

I have been running the debugger pretty much since your last instructions on how to use it but qbittorrent never crashed. Today, I forced it to check a 279 GB torrent and then it did crash. However, since it used up all of the memory, one crash dump did not write a dump file because the system was out of memory. However, there are two other dump files that might help you.

In the debugger screen capture displayed here, notice how much memory qbittorrent was using! I think it has a memory leak.

As I stated earlier, I created a 300 GB page file so that it would finish checking those large torrents. Today, it managed to crash even though I had a 32 GB page file on my SSD and a 300 GB page file on my HDD. I removed the 300 GB file so it would crash faster. It takes FOREVER to check a 279 GB torrent!

What I did to make it crash was force it to check a 279 GB torrent that may or may not have been one of the torrents I attached earlier.

I discovered that github only allows attachments that are a maximum of 25 MB, so I had to post the logs elsewhere. They are zipped and I put them here:

https://ineedsome.info/crash-dumps/

Let me know when you have downloaded that file so I can delete it.

One question... In the debugger screen capture, do you see the tabs where it says "rules" and "processes?" How do I make that font bigger? I have a lot of software that has that tiny font and I can't figure out how to change it. If I change the window system font size, that only effects the title text and the bigger font in the image, but it doesn't effect the tiny font size.

@Pryodon
Copy link
Author

Pryodon commented Sep 1, 2024

@xavier2k6 I don't know if you noticed that I posted crash dumps. It is above this message.

@xavier2k6
Copy link
Member

@Pryodon I've downloaded them, thank you....haven't gone through them yet.

@luzpaz luzpaz added Performance Waiting diagnosis Issue needs troubleshooting and removed Waiting info Waiting for participants to supply more info/fulfill template requirements labels Sep 2, 2024
@stalkerok
Copy link
Contributor

@xavier2k6 Maybe we should close this and other issues (#19745 #21042) as duplicates of #21011 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Waiting diagnosis Issue needs troubleshooting
Projects
None yet
Development

No branches or pull requests

4 participants