Bug 269857 - kded4 and plasma-desktop aquire huge amounts of virtual memory, causing massive paging
Summary: kded4 and plasma-desktop aquire huge amounts of virtual memory, causing massi...
Status: RESOLVED DUPLICATE of bug 206317
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: 4.6
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-01 02:15 UTC by Gunter Ohrner
Modified: 2014-03-02 11:31 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gunter Ohrner 2011-04-01 02:15:12 UTC
Version:           4.6 (using KDE 4.6.1) 
OS:                Linux

Kubuntu Natty Amd64 test version running KDE 4.6.1.

The following looks rather unhealthy - my system has 2 G of physical RAM...

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                           
 2404 gunter    20   0 1116m 184m  12m S    0  9.2   2:49.24 kded4                                             
27681 gunter    20   0 1179m 138m  52m S    4  6.9   0:29.98 plasma-desktop                                    

             total       used       free
Swap:      1992024    1525876     466148

How can I debug why kded4 is eating my memory?

Reproducible: Always

Steps to Reproduce:
Just use KDE, kded4 will aquire between 1 and 2 Gb of virtual memory.

Actual Results:  
kded4's virtual memory size grows huge, causing massive paging.

Expected Results:  
kded4 should not use *that* much memory.
Comment 1 Michael Tsang 2011-04-02 12:24:05 UTC
After upgrading my Qt from 4.6 to 4.7, plasma-desktop allocates more than 2 GiB of my virtual memory space! This make the machine not have enough virtual memory left for running a Java app. My machine is running Debian Wheezy with KDE 4.4.5

michael@debian:~/src/misc$ ps -A v | grep plasma-desktop
18532 ?        Sl     0:12      4     2 2901853 62056  1.6 /usr/bin/plasma-desktop
Comment 2 Lamarque V. Souza 2011-04-02 13:34:51 UTC

*** This bug has been marked as a duplicate of bug 206317 ***
Comment 3 Gunter Ohrner 2011-04-02 15:02:58 UTC
I'm not convinced that this is actually a duplicate of bug 206317.

The symptoms seemt to be the same, but I used Kubuntu 9.10 with KDE 4.3.x before, - which should also be affected according to some of the comments in bug 206317 - and never experienced this behaviour before.

It all started when I upgraded KDE, QT and its whole ecosystem to the versions contained in (K)Ubuntu Natty...
Comment 4 Ortwin Glück 2014-03-02 11:16:35 UTC
Probably what the original report means is that it creates a 2GB mmap.

/proc/pid/maps:
7fa2e7f1c000-7fa367f1c000 rwxp 00000000 00:00 0 

/proc/pid/smaps:
7fa2e7f1c000-7fa367f1c000 rwxp 00000000 00:00 0 
Size:            2097152 kB
Rss:                2936 kB
Pss:                2936 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:      2936 kB
Referenced:         2140 kB
Anonymous:          2936 kB
AnonHugePages:      2048 kB
Swap:                  0 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Locked:                0 kB
VmFlags: rd wr ex mr mw me nr

It would be nice to know what this 2GB mapping is...
Comment 5 Ortwin Glück 2014-03-02 11:31:20 UTC
Possibly it's the garbage collected heap of the javascript implementation of webkit. Please note that this is just reserved address space in the process which is mostly mapped to the zero page. So it doesn't actually use physical memory (RSS is only 3MB) until touched by actual data.