linuxmint / mintreport

Troubleshooting tool
19 stars 18 forks source link

High RAM usage with increasing uptime #46

Closed kneekoo closed 3 years ago

kneekoo commented 4 years ago

After a 25-day uptime I noticed that mintreport-tray took 682MB RAM under Mint 19.3 Cinnamon 64-bit. I terminated it and started the program again from the menu and it only took 49 MB RAM.

In the meantime I rebooted my PC after a kernel update. But in the future, with a high uptime, what kind of data could I offer here?

petroid commented 4 years ago

I guess I'm having the same issue.

peter@WS47-0005028299:~$ inxi -It m1 Processes: Memory top: 1 1: mem: 641.6 MiB (8.2%) command: mintreport-tray pid: 6171 Info: Processes: 313 Uptime: 24d 7m Memory: 7.62 GiB used: 3.35 GiB (44.0%) Shell: bash inxi: 3.0.32

System: Host: WS47-0005028299 Kernel: 5.3.0-46-generic x86_64 bits: 64 compiler: gcc v: 7.5.0 Desktop: Cinnamon 4.4.8 wm: muffin dm: LightDM Distro: Linux Mint 19.3 Tricia base: Ubuntu 18.04 bionic

ghost commented 4 years ago

I also have the same issue.

My server is been up for 44 days and mintreport is now using almost 2GB of RAM

Processes: Memory top: 1 1: mem: 1905.4 MiB (24.3%) command: mintreport-tray pid: 2167 Info: Processes: 237 Uptime: 44d 22h 53m Memory: 7.65 GiB used: 5.62 GiB (73.4%) Init: systemd runlevel: 5 Shell: bash inxi: 3.0.32

OS: Linux Mint 19.3 Cinnamon 4.4.8 Linux kernel: 5.3.0-46-generic

westcoastsuccess commented 4 years ago

+1. Here's my memory usage after 14 days uptime:

Linux Mint 19.2 Tina / MATE 1.22.0 with Linux kernel 5.3.0-51 lowlatency x86_64

Process Name: mintreport-tray Status: Sleeping Memory: 818.9 MB Virtual Memory: 1.3 GB Resident Memory: 818.9 MB Started: 16 May 05:07 Priority: Normal

Can this be safely killed?

ghost commented 4 years ago

Can this be safely killed?

I did and my system is still running fine.

kneekoo commented 4 years ago

Yes, it can be killed. It's just a program that does periodic checks on certain things, so you can kill it and start it back up again, no problem.

westcoastsuccess commented 4 years ago

Thanks @asmCcoder & @kneekoo !

oliver commented 3 years ago

I think much of the leaked memory is tied up in the packages_for_modalias.cache_maps map, in https://github.com/tseliot/ubuntu-drivers-common/blob/master/UbuntuDrivers/detect.py#L156 . It looks like a new apt.Cache object is added to that map each time mintreport does it hourly check.

I didn't find an easy way to fix this, though. The whole detect module probably was never intended to be used in a long-running process?

The most robust solution for this leak would probably be to run the actual checks (ie. the modules from https://github.com/linuxmint/mintreport/tree/master/usr/share/linuxmint/mintreport/reports/) in separate, short-lived processes. That way any memory leaks from the reports would be gone when the hourly check is finished.

mtwebster commented 3 years ago

fixed by: https://github.com/linuxmint/mintreport/commit/13704b7509df75d52db2ff1b49a9c6fce035f1a3