Bug 385644

Summary: Memory leak freed by *starting* plasmashell
Product: [Plasma] plasmashell Reporter: Roland Vet <vet.roland>
Component: generic-crashAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED NOT A BUG    
Severity: normal CC: kde, simonandric5
Priority: NOR    
Version: 5.10.5   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Example of high unreported memory consumption.

Description Roland Vet 2017-10-12 08:54:38 UTC
Created attachment 108295 [details]
Example of high unreported memory consumption.

Memory consumption of an unknown process (not listed in (h)top) becomes all consuming, taking up all available ram+swap space. 

The memory is not released after killing plasmashell (killall plasmashell) but is when restarting it (kstart plasmashell).
Comment 1 David Edmundson 2017-10-12 13:15:59 UTC
That's not how Linux memory works.
Comment 2 Roland Vet 2017-10-13 07:59:23 UTC
(In reply to David Edmundson from comment #1)
> That's not how Linux memory works.

This is just what I observe. My guess is that in the process of starting plasmashell something else gets restarted which clears the leak. I can't pinpoint what the memory is being used for.

All I know is that over the duration of a few hours the used memory pages increases to the point where swapping starts and eventually the entire system slows down to an unbearable crawl. 

If you could help me pinpoint the source I might be able to be more descriptive.
Comment 3 Roland Vet 2017-10-13 14:16:42 UTC
Not exactly proof, but this is a before and after a restart.

$ free -h
              total        used        free      shared  buff/cache   available
Mem:            15G        9.1G        158M        5.7G        6.3G        344M
Swap:           15G        1.9G         13G

$ killall plasmashell && kstart plasmashell

$ free -h
              total        used        free      shared  buff/cache   available
Mem:            15G        7.1G        7.5G        128M        996M        7.9G
Swap:           15G        7.0M         15G


~9G of memory freed by performing the restart, and all I can do is promise that just the killing of plasmashell doesn't give this result.

Do not know what else I can provide to confirm.
Comment 4 David Edmundson 2017-10-13 14:19:17 UTC
I'm more than happy to believe that you get memory back when you kill plasmashell.

That's generic memory leak, search on here for the one about slideshow, if you're on Qt5.9.1 it's probably that.