Bug 496616 - Memory leak in FstabHandling for krunner, kded6, plasmashell, kde-powerdevil, xdg-desktop-portal and ksystemstats
Summary: Memory leak in FstabHandling for krunner, kded6, plasmashell, kde-powerdevil,...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-solid
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.8.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-23 18:30 UTC by jdl
Modified: 2024-11-24 18:37 UTC (History)
3 users (show)

See Also:
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 (3.40 MB, application/zstd)
2024-11-23 18:30 UTC, jdl
Details

Note You need to log in before you can comment on or make changes to this bug.
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?