kded4 memory use grows with every accepted ssh connection. Memory leak?

Bug #1092390 reported by David H
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
policykit-1 (Ubuntu)
Expired
Medium
Unassigned

Bug Description

The kded4 RSS grows seemingly without bound with every ssh login.

djh900@dh:~$ pkill kded4
djh900@dh:~$ nohup kded4
nohup: ignoring input and appending output to `nohup.out'
djh900@dh:~$ pgrep kded4
11430
djh900@dh:~$ ps vp 11430
  PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
11430 pts/0 Sl 0:00 0 2 857053 64476 1.6 kded4
djh900@dh:~$ for i in 0 1 2 3 4 5 6 7 8 9; do ssh localhost true; done
djh900@dh:~$ ps vp 11430
  PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
11430 pts/0 Sl 0:01 0 2 857213 87108 2.2 kded4
djh900@dh:~$ for i in 0 1 2 3 4 5 6 7 8 9; do ssh localhost true; done
djh900@dh:~$ ps vp 11430
  PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
11430 pts/0 Sl 0:01 0 2 857373 109656 2.7 kded4
djh900@dh:~$ for i in 0 1 2 3 4 5 6 7 8 9; do ssh localhost true; done
djh900@dh:~$ ps vp 11430
  PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
11430 pts/0 Sl 0:02 0 2 923101 131948 3.3 kded4
djh900@dh:~$ for i in 0 1 2 3 4 5 6 7 8 9; do ssh localhost true; done
djh900@dh:~$ ps vp 11430
  PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
11430 pts/0 Sl 0:03 0 2 923261 154500 3.9 kded4
djh900@dh:~$ for i in 0 1 2 3 4 5 6 7 8 9; do ssh localhost true; done
djh900@dh:~$ ps vp 11430
  PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
11430 pts/0 Sl 0:03 0 2 923453 176792 4.5 kded4
djh900@dh:~$ for i in 0 1 2 3 4 5 6 7 8 9; do ssh localhost true; done
djh900@dh:~$ ps vp 11430
  PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
11430 pts/0 Sl 0:04 0 2 989149 199084 5.0 kded4
djh900@dh:~$

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: kdelibs-bin 4:4.8.5-0ubuntu0.1
ProcVersionSignature: Ubuntu 3.2.0-32.51-generic 3.2.30
Uname: Linux 3.2.0-32-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu15.1
Architecture: amd64
Date: Thu Dec 20 13:38:30 2012
ExecutablePath: /usr/bin/kded4
InstallationMedia: Kubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120423)
MarkForUpload: True
ProcEnviron:
 SHELL=/bin/bash
 TERM=xterm
 PATH=(custom, user)
 LANG=en_AU.UTF-8
 LANGUAGE=en_AU:en
SourcePackage: kde4libs
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
David H (david-houlder) wrote :
Revision history for this message
Harald Sitter (apachelogger) wrote :

We'll need some more infromation.
Please go to: systemsettings -> start and shutdown -> service manager -> stop one startup service at a time and see whether kded still leaks.

Please also post the output of
ls -lah /usr/share/kde4/services/kded

Finally a note that to produce useful output logs you'd first need to run kdebugdialog and turn on debugging for all KDE software, otherwise stdout does not contain anything useful.

Changed in kde4libs (Ubuntu):
status: New → Incomplete
Revision history for this message
David H (david-houlder) wrote :

OK, I stopped all services in the service manager. Right now, each service has its "stop" button greyed out with only the "Start" button active.

djh900@dh:~$
djh900@dh:~$ pgrep kded4
23291
djh900@dh:~$ ps vp 23291
  PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
23291 pts/3 Sl 0:00 12 2 857345 64736 1.6 kded4
djh900@dh:~$ for ((i=0; i< 100; i++)); do ssh localhost true; done
djh900@dh:~$ ps vp 23291
  PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
23291 pts/3 Sl 0:06 12 2 1055617 280744 7.1 kded4
djh900@dh:~$ for ((i=0; i< 100; i++)); do ssh localhost true; done
djh900@dh:~$ ps vp 23291
  PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
23291 pts/3 Sl 0:12 12 2 1253921 498504 12.7 kded4
djh900@dh:~$

djh900@dh:~$
djh900@dh:~$ ls -lah /usr/share/kde4/services/kded
total 328K
drwxr-xr-x 2 root root 4.0K Nov 26 09:59 .
drwxr-xr-x 16 root root 56K Nov 26 10:00 ..
-rw-r--r-- 1 root root 29 Oct 14 2011 activitymanager.desktop
-rw-r--r-- 1 root root 2.8K Oct 9 2011 bluedevil.desktop
-rw-r--r-- 1 root root 6.6K Jan 11 2012 desktopnotifier.desktop
-rw-r--r-- 1 root root 8.7K Mar 30 2012 device_automounter.desktop
-rw-r--r-- 1 root root 4.9K Mar 2 2012 dnssdwatcher.desktop
-rw-r--r-- 1 root root 5.6K Jul 31 01:08 favicons.desktop
-rw-r--r-- 1 root root 8.1K Jul 31 01:12 freespacenotifier.desktop
-rw-r--r-- 1 root root 4.8K Jun 7 2012 kcookiejar.desktop
-rw-r--r-- 1 root root 5.7K Jul 31 01:12 kephal.desktop
-rw-r--r-- 1 root root 2.4K Jul 31 01:12 keyboard.desktop
-rw-r--r-- 1 root root 9.3K Jul 31 01:12 khotkeys.desktop
-rw-r--r-- 1 root root 3.2K Aug 1 02:25 kmixd.desktop
-rw-r--r-- 1 root root 6.3K Jan 11 2012 kpasswdserver.desktop
-rw-r--r-- 1 root root 7.3K Jun 7 2012 kssld.desktop
-rw-r--r-- 1 root root 6.8K Mar 1 2012 ktimezoned.desktop
-rw-r--r-- 1 root root 13K Jul 31 01:12 kwrited.desktop
-rw-r--r-- 1 root root 1.4K Apr 2 2012 muon-notifier.desktop
-rw-r--r-- 1 root root 11K Jan 19 2012 nepomuksearchmodule.desktop
-rw-r--r-- 1 root root 3.5K Apr 8 2012 networkmanagement.desktop
-rw-r--r-- 1 root root 13K Apr 30 2012 networkstatus.desktop
-rw-r--r-- 1 root root 9.8K Jan 19 2012 networkwatcher.desktop
-rw-r--r-- 1 root root 289 Sep 23 2011 notificationhelper.desktop
-rw-r--r-- 1 root root 2.5K Oct 9 2011 obexftpdaemon.desktop
-rw-r--r-- 1 root root 7.0K Jan 19 2012 phononserver.desktop
-rw-r--r-- 1 root root 8.2K Jul 31 01:12 powerdevil.desktop
-rw-r--r-- 1 root root 8.8K Jun 7 2012 proxyscout.desktop
-rw-r--r-- 1 root root 3.5K Jul 31 01:12 randrmonitor.desktop
-rw-r--r-- 1 root root 9.2K Jul 31 01:06 remotedirnotify.desktop
-rw-r--r-- 1 root root 8.8K Jan 19 2012 solidautoeject.desktop
-rw-r--r-- 1 root root 7.5K Jan 19 2012 soliduiserver.desktop
-rw-r--r-- 1 root root 8.6K Jul 31 01:12 statusnotifierwatcher.desktop
djh900@dh:~$

I switched on kdebugdialog for kded4. There's a bit of chatter as kded4 starts up, but nothing while the sshs are happening. See attachment.

Revision history for this message
David H (david-houlder) wrote :

For extra clarification: All services under "startup services" in the service manager had status "not running" during the test in #3 above.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for kde4libs (Ubuntu) because there has been no activity for 60 days.]

Changed in kde4libs (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Harald Sitter (apachelogger) wrote :

Not kded itself leaking then.

Please valgrind kded

kquitapp kded
valgrind kded4 --nofork (valgrind will probably want more arguments)

Changed in kde4libs (Ubuntu):
status: Expired → Incomplete
Revision history for this message
Harald Sitter (apachelogger) wrote :

It's a leak in polkit, it appears to register of the policyagent changed signal (or * signals) and then leaves the message pass by without freeing the allocated memory it appears.

Changed in kde4libs (Ubuntu):
importance: Undecided → Medium
affects: kde4libs (Ubuntu) → policykit-1 (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for policykit-1 (Ubuntu) because there has been no activity for 60 days.]

Changed in policykit-1 (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Luis (luisflucas) wrote :

This bug also affects me using kubuntu 14.04.
Any solution has been found?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.