c0re100/qBittorrent-Enhanced-Edition

Memory leak happened on qBEE v5.0.x.10

VK3002 opened this issue · 30 comments

qBittorrent & operating system versions

qBittorrent-Enhanced-Edition: v5.0.0.10 x64
OS: Windows 10 22H2 x86_64

What is the problem?

Memory leak happened after I upgraded qBittorrent-Enhanced-Edition to v5.0.0.10 from v4.6.7.10 on my PC (Windows 10 22H2) and it would occupy all the memory (32G) within 10 minutes. I didn't see obvious memory leak problem on v4.6.7.10 or older versions, they just worked smoothly.
Restarting the programme / rebooting the system didn't help.

Steps to reproduce

Unknown, as mentioned above. Or you ou can ask me to test it.

Additional context

No response

Log(s) & preferences file(s)

I don't know what log might be useful for solving memory leak issues. Just let me know if devs need any log.

me too
6)~AU6 7590RCVOZ{T97H`2

qBittorrent Enhanced Edition v5.0.0.10 (64-bit)
OS: win10 pro workstations 22h2 x64

PeerBanHelper was used

确实有这个问题,我这更严重,10s左右能吃满20gb
404349fce6e7a1ddbfc6d47ee1659acf

image
qBittorrent Enhanced Edition v5.0.0.10 (64-bit)
OS: win11 24h2
PeerBanHelper was used
And often unresponsive, lagging.And there have been no uploads or downloads in the past few days. I think the qbittorrent standard version may have these problems after v5.0

Don't know how to reproduce...

From my test, it's still 1GB RAM usage after half an hour.
Windows 10
Disk cache: 1024MB
File pool: 4000
Seeding: 20 (around 20GB)
image

Maybe I need to try on Windows 11 VM or use PeerBanHelper to test...

Severe memory leak also occurs on my device(Mac mini, M2, 8G ram). It can consume over 30GB of ram.
After updating to v5.0.0.10, the memory seems to occur more often, even every time I startup qb. Now I can’t even use it, and have to downgrade to previous version.

I have this happen with my Mac Mini M2 with 24GB RAM with the latest OS and latest qBit as well. The program becomes unresponsive and has to force quit.

I wonder...what libtorrent version you guys using?
libtorrent 1.2 or 2.0?

5.0.0.10 + lt 1.2 via superng6/qbittorrentee:latest on TrueNAS SCALE 24.10.0, w/memory limit to 4096M on host side, and host network enabled
image

Observing frequent OOMs / memleaks causing qBEE container to restart

image

With the help of htop I also found out that at least one core is being utilized to 100% all the time. Something's going wrong here.

Probably related:

qbittorrent#21710

5.0.0.10 + lt 1.2 via superng6/qbittorrentee:latest on TrueNAS SCALE 24.10.0, w/memory limit to 4096M on host side, and host network enabled image

Observing frequent OOMs / memleaks causing qBEE container to restart

image

With the help of htop I also found out that at least one core is being utilized to 100% all the time. Something's going wrong here.

Probably related:

qbittorrent#21710

This issue is related 2.0
but enhanced is using lt 1.2, so.........

I wonder...what libtorrent version you guys using? libtorrent 1.2 or 2.0?

I tried both versions, same problems.

image
The software is stuck in a dead state and the memory usage continues to rise

Me too
image

做种多了就这样,只能把bt的保种都停了,其实也就做了十几个种

版本退回吧 退回到 v4.6.7.10
Return to version Return to v4.6.7.10

Maybe also happens with nox version?
image

Upstream fixed in 5.0.1

Upstream fixed in 5.0.1

I don't think so...
Enhanced is based on qbittorrent#21679, close to 5.0.1
9104351
A backport commit included Free resources allocated by web session once it is destructed fix.

So annoying. Every time I start my container and it keeps using memory until it crashes. Reverting to 4.6.7.10 fixes the problem.

Don't know how to reproduce...

From my test, it's still 1GB RAM usage after half an hour. Windows 10 Disk cache: 1024MB File pool: 4000 Seeding: 20 (around 20GB) image

Maybe I need to try on Windows 11 VM or use PeerBanHelper to test...

I tried with 40 torrents (~150GB) on local again, but still can't reproduce...
So I need you guys's qBittorrent.ini config file for testing.
Where does qBittorrent save its settings?
post it here is ok.
Remember to use ``` quoting code markdown.

If you're Linux user, you may try to use valgrind.
valgrind --tool=massif --massif-out-file=qb_massif.mass qbittorrent
I hope it can catch some call stack (memory leak?) or some useful info.

Don't know how to reproduce...
From my test, it's still 1GB RAM usage after half an hour. Windows 10 Disk cache: 1024MB File pool: 4000 Seeding: 20 (around 20GB) image
Maybe I need to try on Windows 11 VM or use PeerBanHelper to test...

I tried with 40 torrents (~150GB) on local again, but still can't reproduce... So I need you guys's qBittorrent.ini config file for testing. Where does qBittorrent save its settings? post it here is ok. Remember to use ``` quoting code markdown.

If you're Linux user, you may try to use valgrind. valgrind --tool=massif --massif-out-file=qb_massif.mass qbittorrent I hope it can catch some call stack (memory leak?) or some useful info.

My file is too long to paste, so I'm sending it as a file as follows.
github doesn't support .ini, I'll add the extension .txt

qBittorrent.ini.txt Desensitized information

The number of seeds I've made is 105, and the files of all the seeds are 47 gigabytes, I think.
The memory footprint rises little by little until the entire memory fills up or the software crashes.

Don't know how to reproduce...
From my test, it's still 1GB RAM usage after half an hour. Windows 10 Disk cache: 1024MB File pool: 4000 Seeding: 20 (around 20GB) image
Maybe I need to try on Windows 11 VM or use PeerBanHelper to test...

I tried with 40 torrents (~150GB) on local again, but still can't reproduce... So I need you guys's qBittorrent.ini config file for testing. Where does qBittorrent save its settings? post it here is ok. Remember to use ``` quoting code markdown.
If you're Linux user, you may try to use valgrind. valgrind --tool=massif --massif-out-file=qb_massif.mass qbittorrent I hope it can catch some call stack (memory leak?) or some useful info.

My file is too long to paste, so I'm sending it as a file as follows. github doesn't support .ini, I'll add the extension .txt

qBittorrent.ini.txt Desensitized information

The number of seeds I've made is 105, and the files of all the seeds are 47 gigabytes, I think. The memory footprint rises little by little until the entire memory fills up or the software crashes.

Can you try to set disk cache to 1024MB?
I see your cache setting is auto (that's mean unlimited)

Don't know how to reproduce...
From my test, it's still 1GB RAM usage after half an hour. Windows 10 Disk cache: 1024MB File pool: 4000 Seeding: 20 (around 20GB) 图像
Maybe I need to try on Windows 11 VM or use PeerBanHelper to test...

I tried with 40 torrents (~150GB) on local again, but still can't reproduce... So I need you guys's config file for testing. Where does qBittorrent save its settings? post it here is ok. Remember to use ``` quoting code markdown.
If you're Linux user, you may try to use valgrind. I hope it can catch some call stack (memory leak?) or some useful info.qBittorrent.ini``valgrind --tool=massif --massif-out-file=qb_massif.mass qbittorrent

My file is too long to paste, so I'm sending it as a file as follows. github doesn't support .ini, I'll add the extension .txt
qBittorrent.ini.txt Desensitized information
The number of seeds I've made is 105, and the files of all the seeds are 47 gigabytes, I think. The memory footprint rises little by little until the entire memory fills up or the software crashes.

Can you try to set disk cache to 1024MB? I see your cache setting is auto (that's mean unlimited)

I'm afraid I can't set the cache to 1024 with my mechanical hard disk.

Don't know how to reproduce...
From my test, it's still 1GB RAM usage after half an hour. Windows 10 Disk cache: 1024MB File pool: 4000 Seeding: 20 (around 20GB) 图像
Maybe I need to try on Windows 11 VM or use PeerBanHelper to test...

I tried with 40 torrents (~150GB) on local again, but still can't reproduce... So I need you guys's config file for testing. Where does qBittorrent save its settings? post it here is ok. Remember to use ``` quoting code markdown.
If you're Linux user, you may try to use valgrind. I hope it can catch some call stack (memory leak?) or some useful info. qBittorrent.inivalgrind --tool=massif --massif-out-file=qb_massif.mass qbittorrent ``

My file is too long to paste, so I'm sending it as a file as follows. github doesn't support .ini, I'll add the extension .txt
qBittorrent.ini.txt Desensitized information
The number of seeds I've made is 105, and the files of all the seeds are 47 gigabytes, I think. The memory footprint rises little by little until the entire memory fills up or the software crashes.

Can you try to set disk cache to 1024MB? I see your cache setting is auto (that's mean unlimited)

I'm afraid I can't set the cache to 1024 with my mechanical hard disk.

It's RAM cache.

Don't know how to reproduce...
From my test, it's still 1GB RAM usage after half an hour. Windows 10 Disk cache: 1024MB File pool: 4000 Seeding: 20 (around 20GB) image
Maybe I need to try on Windows 11 VM or use PeerBanHelper to test...

I tried with 40 torrents (~150GB) on local again, but still can't reproduce... So I need you guys's qBittorrent.ini config file for testing. Where does qBittorrent save its settings? post it here is ok. Remember to use ``` quoting code markdown.
If you're Linux user, you may try to use valgrind. valgrind --tool=massif --massif-out-file=qb_massif.mass qbittorrent I hope it can catch some call stack (memory leak?) or some useful info.

My file is too long to paste, so I'm sending it as a file as follows. github doesn't support .ini, I'll add the extension .txt
qBittorrent.ini.txt Desensitized information
The number of seeds I've made is 105, and the files of all the seeds are 47 gigabytes, I think. The memory footprint rises little by little until the entire memory fills up or the software crashes.

Can you try to set disk cache to 1024MB? I see your cache setting is auto (that's mean unlimited)

May I ask how to change the disk cache?
I'm using a regular home mechanical hard drive.

Don't know how to reproduce...
From my test, it's still 1GB RAM usage after half an hour. Windows 10 Disk cache: 1024MB File pool: 4000 Seeding: 20 (around 20GB) image
Maybe I need to try on Windows 11 VM or use PeerBanHelper to test...

I tried with 40 torrents (~150GB) on local again, but still can't reproduce... So I need you guys's qBittorrent.ini config file for testing. Where does qBittorrent save its settings? post it here is ok. Remember to use ``` quoting code markdown.
If you're Linux user, you may try to use valgrind. valgrind --tool=massif --massif-out-file=qb_massif.mass qbittorrent I hope it can catch some call stack (memory leak?) or some useful info.

My file is too long to paste, so I'm sending it as a file as follows. github doesn't support .ini, I'll add the extension .txt
qBittorrent.ini.txt Desensitized information
The number of seeds I've made is 105, and the files of all the seeds are 47 gigabytes, I think. The memory footprint rises little by little until the entire memory fills up or the software crashes.

Can you try to set disk cache to 1024MB? I see your cache setting is auto (that's mean unlimited)

May I ask how to change the disk cache? I'm using a regular home mechanical hard drive.

qbt setting
image

Don't know how to reproduce...
From my test, it's still 1GB RAM usage after half an hour. Windows 10 Disk cache: 1024MB File pool: 4000 Seeding: 20 (around 20GB) image
Maybe I need to try on Windows 11 VM or use PeerBanHelper to test...

I tried with 40 torrents (~150GB) on local again, but still can't reproduce... So I need you guys's qBittorrent.ini config file for testing. Where does qBittorrent save its settings? post it here is ok. Remember to use ``` quoting code markdown.
If you're Linux user, you may try to use valgrind. valgrind --tool=massif --massif-out-file=qb_massif.mass qbittorrent I hope it can catch some call stack (memory leak?) or some useful info.

My file is too long to paste, so I'm sending it as a file as follows. github doesn't support .ini, I'll add the extension .txt
qBittorrent.ini.txt Desensitized information
The number of seeds I've made is 105, and the files of all the seeds are 47 gigabytes, I think. The memory footprint rises little by little until the entire memory fills up or the software crashes.

Can you try to set disk cache to 1024MB? I see your cache setting is auto (that's mean unlimited)

May I ask how to change the disk cache? I'm using a regular home mechanical hard drive.

qbt setting image

I set it to 1024, but sometimes the memory is still 3000, and it's a little bit better. I get a white screen, and it's fine again in about 5-15 seconds.
And then the white screen goes up from 500, and so on and so forth.
image