Bug 496616

Summary: Memory leak in FstabHandling for krunner, kded6, plasmashell, kde-powerdevil, xdg-desktop-portal and ksystemstats
Product: [Frameworks and Libraries] frameworks-solid Reporter: jdl <677ee1vp>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: kdelibs-bugs, lukas, nicolas.fella
Priority: NOR    
Version: 6.8.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 6.9
Sentry Crash Report:
Attachments: archive of heaptrack memory logs for components. Each file can be extracted and analyzed with heaptrack-gui

Description jdl 2024-11-23 18:30:18 UTC
Created attachment 176067 [details]
archive of heaptrack memory logs for components. Each file can be extracted and analyzed with heaptrack-gui

SUMMARY
Memory usage of mentioned processes increase linearly, at identical rates, reaching a roof of 4GiB after 4-5 hours. On my system, this leads to OOM, and me having to manually kill e.g. krunner.

STEPS TO REPRODUCE
1. Boot the system
2. Observe the gradually increased memory usage
3. Analyze the processes with `heaptrack`

OBSERVED RESULT
Some KDE components leak memory. A common trait among the processes analyzed, shows that the function `__GI__strdup` in `libc.so.6` of `fstabHandling` of `libKFSolid.6.so` ; is responsible for 99% of the memory usage.

EXPECTED RESULT
Stable memory usage of KDE components when not being used.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 41 (KDE Atomic, base commit 79a1f077b6fba8adec804e1797b0d1c9114453a6331ed1b8b89c69c6102f1db8 )
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0


ADDITIONAL INFORMATION
Kernel Version: 6.11.8-300.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz
Memory: 31.1 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1070 with Max-Q Design/PCIe/SSE2
Comment 1 jdl 2024-11-24 15:13:37 UTC
When one of the leaking processes are killed, the upper limit of memory a single leaking process can occupy increases. After killing krunner twice and ksystemstats once (when they reached 4GiB), plasmashell now occupies 8GiB of memory
Comment 2 Nicolas Fella 2024-11-24 16:27:56 UTC
This is fixed with https://invent.kde.org/frameworks/solid/-/merge_requests/190
Comment 3 jdl 2024-11-24 18:37:23 UTC
(In reply to Nicolas Fella from comment #2)
> This is fixed with
> https://invent.kde.org/frameworks/solid/-/merge_requests/190

Wonderful, thanks!
Will release 6.9.0 of Solid include this fix?