Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The chrome browser was not responsive and I tried to kill it, but instead of disappearing the process had <defunct> at its right, and didn't got killed:

enter image description here

What is <defunct> for a process and why it doesn't get killed?

share|improve this question
    
Google has a lot of solutions for this a google search page | a solution | another –  user91091 Oct 15 '12 at 11:39

2 Answers 2

up vote 16 down vote accepted

From your output we see a "defunct", which means the process has either completed its task or has been corrupted or killed, but its child processes are still running or these parent process is monitoring its child process. To kill this kind of process kill -9 PID don't work, you can try to kill with this command but it will show this again and again.

Determine which is the parent process of this defunct process and kill it. To know this run the command:

ps -ef | grep defunct

UID          PID     PPID       C    STIME      TTY          TIME              CMD

1000       637      27872      0   Oct12      ?        00:00:04 [chrome] <defunct>

1000      1808      1777       0    Oct04     ?        00:00:00 [zeitgeist-datah] <defunct>

Then kill -9 637 27872 then verify the defunct process is gone by ps -ef | grep defunct.

share|improve this answer
1  
you can't kill "defunct" process. You only can speed up the deletion of its entry in a process table by killing its parent. –  J.F. Sebastian Feb 27 at 20:58
2  
What if the ppid is 1 (init)? Suppose I'll just have to wait? –  Luc May 6 at 5:42

Manual page ps(1) says:

Processes marked <defunct> are dead processes (so-called "zombies") that remain because their parent has not destroyed them properly. These processes will be destroyed by init(8) if the parent process exits.

You can't kill it because it is already dead. The only thing left is an entry in the process table:

On Unix and Unix-like computer operating systems, a zombie process or defunct process is a process that has completed execution but still has an entry in the process table. This entry is still needed to allow the parent process to read its child's exit status.

There is no harm in letting such processes be unless there are many of them. Zombie is eventually reaped by its parent (by calling wait(2)). If original parent hasn't reaped it before its own exit then init process (pid == 1) does it at some later time. Zombie Process is just:

A process that has terminated and that is deleted when its exit status has been reported to another process which is waiting for that process to terminate.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.