Yeah, I know, bug reports should go on bugzilla. However, as a developer (albeit not in the Linux space), I understand that submitting a bug report like “Hey, I found a memory leak” without debugging, backtraces, or relevant data is essentially useless.
Could anyone guide me to documentation or tools for debugging this? Specifically:
- What kind of logs or traces should I include in a bug report?
- How can I gather the necessary information?
- Does Valgrind work well with Qt-based applications like Plasmashell, and is it effective for debugging this type of issue?
To investigate, I wrote a simple shell script to monitor memory usage and log data. Based on the logs, it seems like Plasmashell gradually consumes all 32GB of my RAM over six hours. Eventually, the system freezes, the kernel activates the OOM Killer, and it kills plasmashell. This appears to be a classic case of a memory leak. As a workaround, I activated systemd-oomd
to prevent the system from freezing entirely before killing Plasmashell. However, this is far from an ideal solution, especially while gaming. In such scenarios, the game might consume more RAM than Plasmashell, which could result in the game being killed instead.
Here’s my script for reference—it tracks the top 5 memory-consuming processes periodically and generates a log file that could be helpful for debugging. Here is the log file.
It’s well known that third-party widgets can cause memory leaks in Plasmashell, but I only use widgets included in the Arch Linux plasma-meta package. I don’t believe I have any third-party widgets on my system.
Any guidance on how to proceed would be greatly appreciated!
Edit: Added a screenshot of htop
above.