rakshasa / libtorrent

libTorrent BitTorrent library
http://rtorrent.net/downloads/
GNU General Public License v2.0
885 stars 209 forks source link

Rtorrent memory leak #196

Open badgv opened 5 years ago

badgv commented 5 years ago

Rtorrent consumes a lot of memory when downloading or uploading at high speed. The most important problem is that when the speed is lowered, or the rtorrent is directly closed, the occupied memory will not be released.

The system used is debian9 or debian10. The Linux kernel version number is higher than 4.9. Rtorrent runs in the docker environment or runs directly in the current system environment. This problem occurs.

In the case of high memory usage, the load on the CPU is greatly increased.

The same docker image in synology, there is no problem. Currently the core of Synology is 4.4.

It is not certain whether this is caused by libtorrent or by rtorrent.

Is there such a possibility, libtorrent or Rtorrent memory release code, is not compatible with the newer Linux kernel

Does anyone else have the same problem with me?

rakshasa commented 4 years ago

Userspace can't leak memory managed by the kernel, this is most likely a bug in the virtualization layer.

chrcoluk commented 2 weeks ago

Same issue here, 4 machines, old ancient Linux no leaks, anything modern enough that isnt EOL kernel slab leaks.

This is from 200 days uptime, where is near exhaustion.

OBJS ACTIVE USE OBJ SIZE SLABS OBJ/SLAB CACHE SIZE NAME 748263 748260 99% 4.00K 126768 8 4056576K kmalloc-4k

This is from a week or so uptime.

OBJS ACTIVE USE OBJ SIZE SLABS OBJ/SLAB CACHE SIZE NAME 31184 31184 100% 4.00K 3898 8 124736K kmalloc-4k

Rtorrent seemingly no more in dev so I will be looking at a different client.