Bug 356670 - Plasma shell memory leak let subsequent applications run out of memory
Summary: Plasma shell memory leak let subsequent applications run out of memory
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.4.3
Platform: openSUSE Linux
: NOR grave
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-14 11:39 UTC by René Krell
Modified: 2016-01-06 18:49 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
cat /proc/`pidof plasmashell`/smaps (output) (943.46 KB, text/plain)
2015-12-14 11:41 UTC, René Krell
Details
cat /proc/`pidof baloo_file`/smaps (output) (164.74 KB, text/plain)
2015-12-14 11:41 UTC, René Krell
Details
Plasmashell memstat output (34.23 KB, text/plain)
2015-12-29 10:25 UTC, Dariusz Ostolski
Details
Plasmashell smaps output (1.06 MB, text/plain)
2015-12-29 10:25 UTC, Dariusz Ostolski
Details
Output of killall plasmashell; kstart valgrind --error-limit=no --leak-check=full --show-leak-kinds=all --log-file=/tmp/plasmashell-valgrind.log plasmashell (1.07 MB, text/plain)
2015-12-29 12:59 UTC, René Krell
Details
Output of killall baloo_file; kstart valgrind --error-limit=no --leak-check=full --show-leak-kinds=all --log-file=/tmp/baloo_file-valgrind.log baloo_file (296.10 KB, text/plain)
2015-12-29 13:14 UTC, René Krell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description René Krell 2015-12-14 11:39:30 UTC
After the most recent system updates I encounter a heavy memory leak which lets applications like Chromium, Chrome, Firefox, Maven builds etc. run out of memory. It is jard for me to analyze, but I try to collect the necessary information.

OS: OpenSUSE Tumbleweed 20151209
uname -a: Linux rkrell 4.3.0-2-default #1 SMP PREEMPT Sat Nov 14 16:19:19 UTC 2015 (734b32c) x86_64 x86_64 x86_64 GNU/Linux

I opened the Gnome System Monitor to get an idea of a suspicious application - the most common one for all failure situations which consumes most memory is

plasmashell:
- Virtual Memory: 10 GB
- Resident Memory: 435,2 MB
- Shared Memory 204,4 MB
- X-Server memory: 2,3 MB

followed by baloo:
- Virtual Memory: 5,3 GB
- Resident Memory: 88,5 MB
- Shared Memory 17,2 MB
- X-Server memory: 0 kBytes

Several weeks ago with previous KDE versions this didn't happen.
I'll append several output I get from my system, if you're interested please tell me what else to provide, I'm not sure.


Reproducible: Always

Steps to Reproduce:
1. Logon to KDE
2. Open Chromium/Chrome (or whatever app usually consuming a bit more memory)

Actual Results:  
Most of the tabs of about 20 open tabs don't open.
Comment 1 René Krell 2015-12-14 11:41:09 UTC
Created attachment 96058 [details]
cat /proc/`pidof plasmashell`/smaps (output)
Comment 2 René Krell 2015-12-14 11:41:51 UTC
Created attachment 96059 [details]
cat /proc/`pidof baloo_file`/smaps (output)
Comment 3 René Krell 2015-12-14 11:59:14 UTC
KDE versions:
- KDE Releases Frameworks: 5.16.0
- KDE Releases Applications 15.08.3
- Plasma: 5.4.3
Comment 4 David Edmundson 2015-12-21 15:22:51 UTC
- Resident Memory: 435,2 MB

That's not a huge amount.
and "virtual memory" isn't actually a measure of anything useful.

Sorry, but this really doesn't give me any information at all.

You can try running plasmashell in valgrind and see if that reports anything.
Comment 5 Dariusz Ostolski 2015-12-29 10:24:22 UTC
I was hit by the same issue, plasma shell is taking ~10.5GB of virtual memory. I don't know if this is an issue or not but I've attached info from memstat and smaps. You can see from them that 5242880k(5242880k): /home/darostol/.local/share/baloo/index 1789  is taking ~5GB of virtual memory.
Comment 6 Dariusz Ostolski 2015-12-29 10:25:15 UTC
Created attachment 96354 [details]
Plasmashell memstat output
Comment 7 Dariusz Ostolski 2015-12-29 10:25:42 UTC
Created attachment 96355 [details]
Plasmashell smaps output
Comment 8 René Krell 2015-12-29 10:55:15 UTC
Just one more hint, running the other apps (Firefox, Chromium) in Gnome 3.18.2 on the same system initially reported works without memory failures, it depends on the KDE environment.
From what I reported there was also the big baloo index of 5 GB.
Comment 9 René Krell 2015-12-29 11:03:36 UTC
From the user comments, https://bugs.kde.org/show_bug.cgi?id=344879 looks very similar to me.
Comment 10 René Krell 2015-12-29 11:18:48 UTC
@David: Can you please give me a hint how to use valgrind for this use case, it has quite a lot of command line options. I can try this, but I don't want to spam this report with useless information. Just a short "how to", please, what to kill before and how to measure leaks here?
BTW: Using the nvidia proprietary driver 352.63 for compositing, on a HP ZBook 15 G2.
Comment 11 René Krell 2015-12-29 12:59:06 UTC
Created attachment 96358 [details]
Output of killall plasmashell; kstart valgrind --error-limit=no --leak-check=full --show-leak-kinds=all --log-file=/tmp/plasmashell-valgrind.log plasmashell

Added the output of killall plasmashell; kstart valgrind --error-limit=no --leak-check=full --show-leak-kinds=all --log-file=/tmp/Xorg-valgrind.log plasmashell.
From my point of view doesn't still show the leak in the dimensions described.
Comment 12 René Krell 2015-12-29 13:03:25 UTC
Launching chromium in valgrind using the same command line options ends in:
==16979== LEAK SUMMARY:
==16979==    definitely lost: 0 bytes in 0 blocks
==16979==    indirectly lost: 0 bytes in 0 blocks
==16979==      possibly lost: 0 bytes in 0 blocks
==16979==    still reachable: 108,483 bytes in 1,293 blocks
==16979==         suppressed: 0 bytes in 0 blocks
but just about 10 of 30 open tabs open, the rest of the processes crash because it gets no resources. This does not happen in Gnome 3.18.2 at all.
Comment 13 René Krell 2015-12-29 13:14:59 UTC
Created attachment 96359 [details]
Output of killall baloo_file; kstart valgrind --error-limit=no --leak-check=full --show-leak-kinds=all --log-file=/tmp/baloo_file-valgrind.log baloo_file

BTW: Baloo crashes all the time after a while (DrKonqui), not just over valgrind.
Comment 14 René Krell 2015-12-29 13:17:08 UTC
Please just check whether the additional information gives you any useful information.
Or just send a hint. I just see the problem just existing in KDE and offer help for finding the reason.
If not possible, feel free to close this again.
Thank you.
Comment 15 René Krell 2016-01-06 18:49:04 UTC
Good news: The problem disappeared for me in PLasma 5.5.1.
Marking this resolved.