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 5.0.1 continues to use a lot of memory until crash #21710

Open
Neonlinx opened this issue Oct 29, 2024 · 15 comments
Open

Qbittorrent 5.0.1 continues to use a lot of memory until crash #21710

Neonlinx opened this issue Oct 29, 2024 · 15 comments

Comments

@Neonlinx
Copy link

qBittorrent & operating system versions

qBittorrent: 5.0.1 x64
OS: Windows 10 Pro 22h2 19045.5011
Qt: 6.4.3
Libtorrent: 2.0.11.0

What is the problem?

I have about 2000 files, all from 1GB to 80GB. I updated qbittorrent to the latest version (5.0.1). I set the disk IO to "Simple pread/pwrite". But unfortunately as soon as I start qbittorrent, it immediately starts increasing memory usage until it becomes impossible to do anything. At that point qbittorrent crashes or I have to terminate it.
I went back to version 4.6.7 and it works great.

Steps to reproduce

No response

Additional context

No response

Log(s) & preferences file(s)

qBittorrent.json

@ArcticGems
Copy link

ArcticGems commented Oct 29, 2024

Maybe it's not the new disk IO mode, but a file pool bug: arvidn/libtorrent#7778
(fixed in arvidn/libtorrent#7779 )

The file pool bug caused great increase of memory usage as well.

@qBittUser
Copy link

I went back to version 4.6.7 and it works great.

Did you do a fair test?

Because Simple pread/pwrite isn't available in older qBittorrent and it isn't enabled by default in v5.0.1 either.

So if you keep it disabled, then do you have no memory issues with v5.0.1?

Did you went back to v4.6.7 built with libtorrent v2.0.11+ or you are actually using with v1.2.19+?

Qt: 6.4.3

You modified qBittorrent v5.0.1 code to use old Qt version or forgot to recheck that v5 uses Qt 6.7.3 on Windows OS?

@HanabishiRecca
Copy link
Contributor

I don't think it has something to do with the disk IO type.
Most likely duplicate of #21502.

@Neonlinx
Copy link
Author

@qBittUser I'm very sorry but I'm away from home now; I'll do some test as soon as I get home.

Anyway... @HanabishiRecca is right...seems that I have exactly the same issue.

I don't think it has something to do with the disk IO type. Most likely duplicate of #21502.

But sincerly, also @KevinMX seems to describe the same behavior:
c0re100#617

Talking about memory issue, for me version 5 and 5.0.10 has the same behavior. When I installed version 5, obviously I hadn't setup anything.

@qBittUser
Copy link

@Neonlinx

That issue you and @KevinMX mentioned is about unofficial edition of qBittorrent, many there are not using qBittorrent with the same libtorrent version, don't have same settings, are using extra features or a different OS.

So your way to reproduce v5 memory issue, what you mentioned in opening post, is totally different than others there and a fair test needs to be made to find if and then why certain official and unofficial v4.6.7 works fine.

@KevinMX
Copy link

KevinMX commented Oct 31, 2024

@Neonlinx

That issue you and @KevinMX mentioned is about unofficial edition of qBittorrent, many there are not using qBittorrent with the same libtorrent version, don't have same settings, are using extra features or a different OS.

So your way to reproduce v5 memory issue, what you mentioned in opening post, is totally different than others there and a fair test needs to be made to find if and then why certain official and unofficial v4.6.7 works fine.

Yeah, I'm also quite uncertain if the official qB and unofficial qBEE are leaking memory due to the same reason. I've rolled back to 4.6.x due to, well, some of my trackers don't allow 5.x yet.

Quite busy recently, will try to find a minimal reproducible config someday.

@c0re100
Copy link

c0re100 commented Oct 31, 2024

@Neonlinx

That issue you and @KevinMX mentioned is about unofficial edition of qBittorrent, many there are not using qBittorrent with the same libtorrent version, don't have same settings, are using extra features or a different OS.

Not really, qBittorrent enhanced is using same libtorrent version (1.2.19+git8ad05ebd41) as official.
Memory leak happening on official /w libtorrent 1.2 too, not only enhanced edition.
But we don't know why of cuz.
#21502 (comment)
#21502 (comment)
#21502 (comment)

@stalkerok
Copy link
Contributor

Why can't anyone provide good tests???

@lezzmeister
Copy link

Can confirm same problem.

Even with os cache disabled, memory priority low and process priority low with cache set to 4GB max qBittorrent will push memory hard until it is loaded 99%, then makes other stuff crash, and then it swallows that memory too. Currently 51 of 64GB loaded. Update from 5.0.0 to 5.0.1 did not fix it. System unusable with qBittorrent active.

@studyfranco
Copy link

Why can't anyone provide good tests???

We don't know how make good test. I have 1000 torrents, and I have the same issue.

@vrubleg
Copy link

vrubleg commented Nov 3, 2024

Somebody who can repro the issue could try to make 3 process memory dumps (with a few hours delay between them), and then try to compare memory contents to try to understand what kind of data is leaking.

Is the issue reproducible when all the hundreds of torrents are paused/stopped?

@Neonlinx
Copy link
Author

Sorry for the delay in my answer but I was away from home.

Anyway...after some tests I verified that the 5.0.x versions all have the memory usage problem both when using libtorrent 1.2.x and libtorrent 2.0.x (even by setting 'simple pread/pwrite). Qbittorrent v4.6.7 however works perfectly for me with libtorrent 2.0.x. and qt6.
The versions that use a lot of memory do so without there being active torrents (downloading or uploading), and qbittorrent becomes unusable in a maximum of 4-5 minutes. My system has 32GB of RAM but qbittorrent doesn't use it all: most of the time it becomes unusable (I mean...it crashes and/or I have to terminate it) after 'eating' 5-10GB of RAM.

If you have any other suggestions on tests to do, let me know and I'll try to do them over the weekend.

@glassez
Copy link
Member

glassez commented Nov 22, 2024

I have about 2000 files, all from 1GB to 80GB.

The versions that use a lot of memory do so without there being active torrents (downloading or uploading)

Are all your torrents really stopped? Or they are running but inactive?

How many trackers do you have?
(It would be nice to see a screenshot of status and trackers filters of your qBittorrent window.)

@grr
Copy link

grr commented Dec 11, 2024

When I use an HTTP proxy the network-related leak stops for me. But I think I'm now experiencing a different type of leak on 5.0.2- when the qbittorrent app is in focus it behaves, but once it is no longer in focus (because I switched to another app or the screen goes to sleep, etc) it starts leaking fast. Giving it focus again causes it to release all the leaked memory. This is on macOS 11.7.10. Version 4.6.7 does not experience this type of leak.

@owenzhao
Copy link

Got memory leak on 5.0.2 on macOS with brew installation. I just have two torrents, total size is 1GB. But I got 90GB leaks.

截屏2024-12-17 04 36 29 截屏2024-12-17 04 25 28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests