Qbittorrent 5.0.1 continues to use a lot of memory until crash
Opened this issue ยท 15 comments
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)
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.
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?
I don't think it has something to do with the disk IO type.
Most likely duplicate of #21502.
@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.
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.
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.
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)
Why can't anyone provide good tests???
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.
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.
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?
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.
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.)
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.