Linux – processes remain behind

linuxprocesszombie-process

I have an embedded system that was going non-responsive after running for several hours. After investigating I found that the system kept growing a list of <defunct> processes. Running ps axl gives a long list a snippet of which is as follows:

1     0  6421     1  20   0      0     0 exit   Zs   ?          0:00 [timeout] <defunct>
1     0  6429     1  20   0      0     0 exit   Zs   ?          0:00 [timeout] <defunct>
1     0  6476     1  20   0      0     0 exit   Zs   ?          0:00 [timeout] <defunct>
1     0  6497     1  20   0      0     0 exit   Zs   ?          0:00 [timeout] <defunct>

I am not able to kill these processes. Increase in these processes eat up all the RAM thus making system unresponsive. The other issue is that the processes that are run at boot time by init scripts also go <defunct> when I try to kill them. I am not able to find a clue that why these zombie processes are not killed by init and eating up RAM.

Best Answer

Defunct processes do not eat any significant ram, just a handful of bytes to store their pid, return status and resource usage statistics.

However, defunct processes parented by init should be quickly reaped by the latter on a properly running Unix/Linux OS.

There is then a serious bug with your system which might also explain the memory leak you are observing.

Related Question