Bug 239965

Summary: huge amounts of kded4 zombie processes being created
Product: kdelibs Reporter: Ralf Jung <post>
Component: kdedAssignee: David Faure <faure>
Status: RESOLVED DUPLICATE    
Severity: normal CC: alex, anmeldungen, billm, bugs.kde.org, jakartadean, jason.mours, kde, lamarque, manuel, thx1011
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description Ralf Jung 2010-05-29 13:06:54 UTC
Version:           unspecified (using KDE 4.4.2) 
OS:                Linux

While using my PC, I have a constant "stream" of zombie processes appearing, all of them being labelled kded4, and all of them having the only non-zombie kded4 process as parent.
"top" shows a new zombie appearing every 10 to 30 seconds (irregularly). Currently, the PC has an uptime of 1:25 and 264 zombie processes, which gives an average of 1 new zombie per 20 seconds.

Reproducible: Always

Steps to Reproduce:
I don't do anything, just boot my system and log in to KDE.

Actual Results:  
More and more zombie processes appear.

Expected Results:  
No zombie processes at all, as it ha always been up to KDE 4.3.

I am using Kubuntu 10.04.
Comment 1 Ralf Jung 2010-08-02 15:09:39 UTC
I have no clue what changed, but now there's just one zombie process being created, which is hardly a problem - though, of course, still undesired.
Comment 2 Dean Boulding 2010-09-27 10:02:29 UTC
I am experiencing this.

I'm running a fairly new kubuntu 10.04 installation on a new netbook, and I get
thousands of defunct kded4 processes.  I rebooted about 4 hours ago and just
now ran "ps aux | grep kded4 | wc" which shows 1,561 lines.  My /home directory
is encrypted.   kde is version 4.4.2, and kernel is 2.6.32-24.  The only thing in any way unusual about my configuration might be a netbook connected to an external monitor.
Comment 3 Ralf Jung 2010-10-20 22:22:51 UTC
In the mean time I upgraded to Kubuntu 10.10 with KDE 4.5.1, and now I am still/again seeing tons of zombies as described above.

My /home is encrypted, too - I do not use an external monitor though.
Comment 4 Bill Metzenthen 2010-10-31 13:19:34 UTC
I'm running Kubuntu 10.10 (upgraded from 10.04 and previous...) which is up-to-date as of the time of this comment.

I've noticed large numbers of kded4 zombies, so I've gathered some data as follows:

Firstly, by monitoring the process table and recording times I noted that extra zombies were being added whenever a cron-scheduled script I have was being run.  After a re-boot only two zombies were added every time the script was run.  Some time later, and for no apparent reason, this increased to three zombies for every time the script was run.

I tried various modifications to the script and none affected the behaviour.  In fact if I removed the script then the zombies were still being added each time cron tried to run the script.

I have an encrypted directory but it is not a home directory.  It is mounted in my home directory.  Unmounting it did not affect the zombie creation.

Deleting the cron job stopped the new zombies from being created.

Re-creating the cron job with new (different) times caused the zombies to be added at the new times.

Similarly, using the 'at' command to run a job causes three new zombies to be added at the time specified by the 'at' command (doesn't matter whether the job is a valid one or not).

I have no idea what the relationship is between kded4 and timed task execution.
Comment 5 Alex 2010-11-07 22:01:34 UTC
I suffer the exact same problem: after 37 hours of uptime I have 453 defunct kded4 processes.

The more uptime I have, the more they grows, slowing down the system and rendering it unusable.

I also have a cron job executing every 5 minutes (fetchmail) and in effect 453*5 = around 37 hours of time, so it has something to do with this.

I've an encrypted file system, running on kubuntu 10.10 and KDE 4.5.3
Comment 6 Dirk 2010-11-11 15:53:09 UTC
(In reply to comment #5)
> I also have a cron job executing every 5 minutes (fetchmail) and in effect
> 453*5 = around 37 hours of time, so it has something to do with this.
> 
> I've an encrypted file system, running on kubuntu 10.10 and KDE 4.5.3

same here. cron job every 5 minutes and encrypted file system on Kubuntu 10.04.
Comment 7 Ralf Jung 2010-11-11 16:14:45 UTC
My /home is encrypted, too, using the option provided during Kubuntu installation.

However, I did not add any custom additional cronjob, and none of the existing ones seems to have a period of 5 minutes. The uptime is currently barely 8 minutes and I already count more than 20 defunct kded4 processes.
Comment 8 jason.mours 2010-11-28 15:23:27 UTC
Having a similar problem. kded4 zombies running consuming 1 core apiece. I have an uptime of 20d and update frequently with openSUSE KDE:Factory (4.6 beta1). The rest of the system is @ 11.3/update. I usually kill X after an update and run kill -3 zombiePID and they go away. Restart X, they come back and I can kill them in konsole. Not a problem other than they consume a core if gone unchecked.
Comment 9 Telmo Xtra 2010-12-03 15:37:05 UTC
Hi!

 I  have the same issue on my working Laptop: Kubuntu 10.04 32bit with the latest KDE 4.5.3 backport. They appear by just login in. I do not have my file system encrypted but have the Private directory with encryptfs

In my case a defunct process is spawn each 5 minutes...

sintra      3850  1744  0 11:10 ?        00:00:00 [kded4] <defunct>
sintra      3864  1744  0 11:15 ?        00:00:00 [kded4] <defunct>
sintra      3882  1744  0 11:20 ?        00:00:00 [kded4] <defunct>
sintra      3896  1744  0 11:25 ?        00:00:00 [kded4] <defunct>
sintra      3912  1744  0 11:30 ?        00:00:00 [kded4] <defunct>
sintra      3927  1744  0 11:35 ?        00:00:00 [kded4] <defunct>
sintra      3952  1744  0 11:40 ?        00:00:00 [kded4] <defunct>
sintra      3968  1744  0 11:45 ?        00:00:00 [kded4] <defunct>
sintra      3984  1744  0 11:50 ?        00:00:00 [kded4] <defunct>
sintra      3998  1744  0 11:55 ?        00:00:00 [kded4] <defunct>
sintra      4012  1744  0 12:00 ?        00:00:00 [kded4] <defunct>
sintra      4027  1744  0 12:05 ?        00:00:00 [kded4] <defunct>
sintra      4050  1744  0 12:10 ?        00:00:00 [kded4] <defunct>
sintra      4064  1744  0 12:15 ?        00:00:00 [kded4] <defunct>
sintra      4081  1744  0 12:20 ?        00:00:00 [kded4] <defunct>
sintra      4095  1744  0 12:25 ?        00:00:00 [kded4] <defunct>
sintra      4111  1744  0 12:30 ?        00:00:00 [kded4] <defunct>
sintra      4123  1744  0 12:35 ?        00:00:00 [kded4] <defunct>
sintra      4147  1744  0 12:40 ?        00:00:00 [kded4] <defunct>
sintra      4162  1744  0 12:45 ?        00:00:00 [kded4] <defunct>
sintra      4176  1744  0 12:50 ?        00:00:00 [kded4] <defunct>
sintra      4190  1744  0 12:55 ?        00:00:00 [kded4] <defunct>
sintra      4206  1744  0 13:00 ?        00:00:00 [kded4] <defunct>
sintra      4220  1744  0 13:05 ?        00:00:00 [kded4] <defunct>
sintra      4244  1744  0 13:10 ?        00:00:00 [kded4] <defunct>
sintra      4258  1744  0 13:15 ?        00:00:00 [kded4] <defunct>
sintra      4276  1744  0 13:20 ?        00:00:00 [kded4] <defunct>
sintra      4289  1744  0 13:25 ?        00:00:00 [kded4] <defunct>
sintra      4304  1744  0 13:30 ?        00:00:00 [kded4] <defunct>
sintra      4318  1744  0 13:35 ?        00:00:00 [kded4] <defunct>
sintra      4343  1744  0 13:40 ?        00:00:00 [kded4] <defunct>
sintra      4355  1744  0 13:45 ?        00:00:00 [kded4] <defunct>
sintra      4369  1744  0 13:50 ?        00:00:00 [kded4] <defunct>
sintra      4382  1744  0 13:55 ?        00:00:00 [kded4] <defunct>
sintra      4397  1744  0 14:00 ?        00:00:00 [kded4] <defunct>
sintra      4411  1744  0 14:05 ?        00:00:00 [kded4] <defunct>
sintra      4434  1744  0 14:10 ?        00:00:00 [kded4] <defunct>
sintra      4448  1744  0 14:15 ?        00:00:00 [kded4] <defunct>

....

and so on
Comment 10 Jan 2011-01-15 22:03:58 UTC
*** This bug has been confirmed by popular vote. ***
Comment 11 Jan 2011-01-15 22:11:23 UTC
I can confirm this with Kubuntu 10.10 and encrypted /home/janmalte

I had several kded4 zombie processes. I can't remember when it exactly started to happen.

I had no cron job running until today and will now look, if the number will increase significant with cron jobs.
Comment 12 Jan 2011-01-28 15:37:03 UTC
seems to be fixed in KDE SC 4.6
Comment 13 Alex 2011-01-28 15:46:45 UTC
I've just upgraded to KDE 4.6 and I see the same defunct processes, so the problem is not fixed for me :(
Comment 14 Tom Chiverton 2011-01-29 14:44:44 UTC
Not fixed for me either:
falken@wopr:~$ ps -efw|grep kded4
falken    2037     1  0 Jan28 ?        00:00:08 kdeinit4: kded4 [kdeinit]       
falken    2321  2037  0 Jan28 ?        00:00:00 [kded4] <defunct>
falken    5892  2257  0 13:40 pts/0    00:00:00 grep kded4
falken@wopr:~$ 

This is 32bit Kubutnu 10.10 (upgraded every 6 months from 9.4) with 4.6 from
their backports PPA.
Comment 15 Jan 2011-02-01 08:56:52 UTC
I have to change my statement. This isn't solved for me neither. I got some defunct kded4 processes again.
Comment 16 Lamarque V. Souza 2011-02-13 21:45:10 UTC

*** This bug has been marked as a duplicate of bug 236490 ***