Hi Does anybody knows how to kill a zombie process? I know that the only way to kill the zombie process is when you reboot the computer, but if I couldnt do that? what other options does I have?, somebody told me that there is another way and it is sending a signal to the process zombie because it is in a state of wait4(), but I dont know it is true but if it were, how could i do that? because the parent is the init process pid 1.. regards.
On a shell, type pstree, then kill the parent process. Francesco Gilberto I. Monroy Lopez wrote:
Hi
Does anybody knows how to kill a zombie process? I know that the only way to kill the zombie process is when you reboot the computer, but if I couldnt do that? what other options does I have?, somebody told me that there is another way and it is sending a signal to the process zombie because it is in a state of wait4(), but I dont know it is true but if it were, how could i do that? because the parent is the init process pid 1..
regards.
First of all, he already said the parent was "init", and it's not a terribly bright idea to kill init, as it will leave your machine totally useless Secondly, killing the parent process only serves to re-parent the children to init, which then eventually will reap them. But since init already is the parent..... On Fri, 2006-10-20 at 22:40 +0200, Francesco Teodori wrote:
On a shell, type pstree, then kill the parent process.
Francesco
Gilberto I. Monroy Lopez wrote:
Hi
Does anybody knows how to kill a zombie process? I know that the only way to kill the zombie process is when you reboot the computer, but if I couldnt do that? what other options does I have?, somebody told me that there is another way and it is sending a signal to the process zombie because it is in a state of wait4(), but I dont know it is true but if it were, how could i do that? because the parent is the init process pid 1..
regards.
On 20/10/06 14:40, Francesco Teodori wrote:
On a shell, type pstree, then kill the parent process.
Francesco
Gilberto I. Monroy Lopez wrote:
Hi
Does anybody knows how to kill a zombie process? I know that the only way to kill the zombie process is when you reboot the computer, but if I couldnt do that? what other options does I have?, somebody told me that there is another way and it is sending a signal to the process zombie because it is in a state of wait4(), but I dont know it is true but if it were, how could i do that? because the parent is the init process pid 1..
regards.
Please read again: I do not believe you wish to be killing off init.
Darryl Gregorash wrote:
On 20/10/06 14:40, Francesco Teodori wrote:
On a shell, type pstree, then kill the parent process.
Francesco
Gilberto I. Monroy Lopez wrote:
Hi
Does anybody knows how to kill a zombie process? I know that the only way to kill the zombie process is when you reboot the computer, but if I couldnt do that? what other options does I have?, somebody told me that there is another way and it is sending a signal to the process zombie because it is in a state of wait4(), but I dont know it is true but if it were, how could i do that? because the parent is the init process pid 1..
regards.
Please read again: I do not believe you wish to be killing off init.
You can send init the HUP signal which will tell it to restart: kill -HUP 1 or kill -1 1 This probably will not get rid of the zombie process. Mike
Fri, 20 Oct 2006, by gimonroy@gmail.com:
Hi
Does anybody knows how to kill a zombie process? I know that the only way to
Why do you think it's called "zombie"? Ever tried to kill one of them suckers (again)?
kill the zombie process is when you reboot the computer, but if I couldnt do that? what other options does I have?, somebody told me that there is another way and it is sending a signal to the process zombie because it is in a state of wait4(), but I dont know it is true but if it were, how could i do that? because the parent is the init process pid 1..
"Somebody" told you wrong. A zombie is dead already, it just doesn't know it yet. There's no problem with zombie processes in the ps table, they do not eat (resources) or bother (talk to) other processes. Theo -- Theo v. Werkhoven Registered Linux user# 99872 http://counter.li.org ICBM 52 13 26N , 4 29 47E. + ICQ: 277217131 SUSE 9.2 + Jabber: muadib@jabber.xs4all.nl Kernel 2.6.8 + See headers for PGP/GPG info. Claimer: any email I receive will become my property. Disclaimers do not apply.
On Fri, 2006-10-20 at 14:45 -0500, Gilberto I. Monroy Lopez wrote:
Hi
Does anybody knows how to kill a zombie process? I know that the only way to kill the zombie process is when you reboot the computer, but if I couldnt do that? what other options does I have?, somebody told me that there is another way and it is sending a signal to the process zombie because it is in a state of wait4(), but I dont know it is true but if it were, how could i do that? because the parent is the init process pid 1..
A zombie is already dead, so it can't be killed, and it is in no state The parent process is grimly responsible for reaping its dead children (aren't UNIX metaphors fun? :) and if it doesn't, you're stuck with them, but it's nothing really to worry about unless there are so many of them that they fill up the process table (highly unlikely) The init process will sooner or later get rid of them if it is the parent
Anders Johansson wrote:
On Fri, 2006-10-20 at 14:45 -0500, Gilberto I. Monroy Lopez wrote:
Hi
Does anybody knows how to kill a zombie process? I know that the only way to kill the zombie process is when you reboot the computer, but if I couldnt do that? what other options does I have?, somebody told me that there is another way and it is sending a signal to the process zombie because it is in a state of wait4(), but I dont know it is true but if it were, how could i do that? because the parent is the init process pid 1..
A zombie is already dead, so it can't be killed, and it is in no state
The parent process is grimly responsible for reaping its dead children (aren't UNIX metaphors fun? :) and if it doesn't, you're stuck with them, but it's nothing really to worry about unless there are so many of them that they fill up the process table (highly unlikely)
The init process will sooner or later get rid of them if it is the parent
This is not true, a zombie process will stay around for ever. A zombie is caused by the parent process dying and leaving the child process still running. Under Unix (Solaris) and some other Linux versions I have worked with offer the -f or -F flag to kill which would remove zombie processes. OK it worked better in Solaris, Linux was always kinda a crap shoot, which is probably why they removed the flag (if Suse ever had it). Mike
On 20/10/06 14:47, Mike Noble wrote:
Anders Johansson wrote:
On Fri, 2006-10-20 at 14:45 -0500, Gilberto I. Monroy Lopez wrote:
Hi
Does anybody knows how to kill a zombie process? I know that the only way to kill the zombie process is when you reboot the computer, but if I couldnt do that? what other options does I have?, somebody told me that there is another way and it is sending a signal to the process zombie because it is in a state of wait4(), but I dont know it is true but if it were, how could i do that? because the parent is the init process pid 1..
A zombie is already dead, so it can't be killed, and it is in no state
The parent process is grimly responsible for reaping its dead children (aren't UNIX metaphors fun? :) and if it doesn't, you're stuck with them, but it's nothing really to worry about unless there are so many of them that they fill up the process table (highly unlikely)
The init process will sooner or later get rid of them if it is the parent
This is not true, a zombie process will stay around for ever. A zombie is caused by the parent process dying and leaving the child process still running.
The OP has already said that init is the parent of his zombie, so your statement here is already disproved.
Under Unix (Solaris) and some other Linux versions I have worked with offer the -f or -F flag to kill which would remove zombie processes. OK it worked better in Solaris, Linux was always kinda a crap shoot, which is probably why they removed the flag (if Suse ever had it).
Mike
Zombie process
From Wikipedia, the free encyclopedia Jump to: navigation, search
On Unix operating systems, a zombie process or defunct process is a process that has completed execution but still has an entry in the process table, allowing the process that started it to read its exit status. In the term's colorful metaphor, the child process has died but has not yet been reaped. When a process ends, all of the memory and resources associated with it are deallocated so they can be used by other processes. However, the process's entry in the process table remains. The parent is sent a SIGCHLD signal indicating that a child has died; the handler for this signal will typically execute the wait system call, which reads the exit status and removes the zombie. The zombie's process ID and entry in the process table can then be reused. However, if a parent ignores the SIGCHLD, the zombie will be left in the process table. In some situations this may be desirable, for example if the parent creates another child process it ensures that it will not be allocated the same process ID. A zombie process is not the same as an orphan process. Orphan processes don't become zombie processes; instead, they are adopted by init (process ID 1), which waits on its children. The term zombie process derives from the common definition of zombie—an undead person. Zombies can be identified in the output from the Unix ps command by the presence of a "Z" in the STAT column. Zombies that exist for more than a short period of time typically indicate a bug in the parent program. As with other leaks, the presence of a few zombies isn't worrisome in itself, but may indicate a problem that would grow serious under heavier loads. To remove zombies from a system, the SIGCHLD signal can be sent to the parent manually, using the kill command. If the parent process still refuses to reap the zombie, the next step would be to remove the parent process. When a process loses its parent, init becomes its new parent. Init periodically executes the wait system call to reap any zombies with init as parent. Darryl Gregorash wrote:
On 20/10/06 14:47, Mike Noble wrote:
Anders Johansson wrote:
On Fri, 2006-10-20 at 14:45 -0500, Gilberto I. Monroy Lopez wrote:
Hi
Does anybody knows how to kill a zombie process? I know that the only way to kill the zombie process is when you reboot the computer, but if I couldnt do that? what other options does I have?, somebody told me that there is another way and it is sending a signal to the process zombie because it is in a state of wait4(), but I dont know it is true but if it were, how could i do that? because the parent is the init process pid 1..
A zombie is already dead, so it can't be killed, and it is in no state
The parent process is grimly responsible for reaping its dead children (aren't UNIX metaphors fun? :) and if it doesn't, you're stuck with them, but it's nothing really to worry about unless there are so many of them that they fill up the process table (highly unlikely)
The init process will sooner or later get rid of them if it is the parent
This is not true, a zombie process will stay around for ever. A zombie is caused by the parent process dying and leaving the child process still running.
The OP has already said that init is the parent of his zombie, so your statement here is already disproved.
Under Unix (Solaris) and some other Linux versions I have worked with offer the -f or -F flag to kill which would remove zombie processes. OK it worked better in Solaris, Linux was always kinda a crap shoot, which is probably why they removed the flag (if Suse ever had it).
Mike
Mike Noble wrote:
A zombie process is not the same as an orphan process. Orphan processes don't become zombie processes; instead, they are adopted by init (process ID 1), which waits on its children.
Mike Noble wrote:
This is not true, a zombie process will stay around for ever. A zombie is caused by the parent process dying and leaving the child process still running.
Now I am more confused. In your effort to clear things up with the Wikipedia quote, you seem to contradict your other post. I might not be an expert in this area but it sounds like this thread is describing an orphan process, not a zombie process? Does anyone else have any comments on that? Damon Register
On Fri, 2006-10-20 at 13:47 -0700, Mike Noble wrote:
Under Unix (Solaris) and some other Linux versions I have worked with offer the -f or -F flag to kill which would remove zombie processes. OK it worked better in Solaris, Linux was always kinda a crap shoot, which is probably why they removed the flag (if Suse ever had it).
It used to be that you could do "kill -CHLD 1", but now that I actually try it, I see that's not allowed anymore, it's blocked as "not allowed". Not sure why. When init does receive SIGGHLD it will do a waitpid(-1, ... which will reap one of its terminated children.
On Fri, 2006-10-20 at 22:49 +0200, Anders Johansson wrote:
It used to be that you could do "kill -CHLD 1", but now that I actually try it, I see that's not allowed anymore, it's blocked as "not allowed". Not sure why.
Forget that, it does still work. I guess I tried as non-root before (it's Friday night and I've had a few.... :) So, with a zombie process with init as parent, try (as root) kill -CHLD 1
On Friday 20 October 2006 22:45, Gilberto I. Monroy Lopez wrote:
Hi
Does anybody knows how to kill a zombie process? I know that the only way to kill the zombie process is when you reboot the computer, but if I couldnt do that? what other options does I have?, somebody told me that there is another way and it is sending a signal to the process zombie because it is in a state of wait4(), but I dont know it is true but if it were, how could i do that? because the parent is the init process pid 1..
Is your zombie related to Oracle?
Thanks all for your comments, I now understand what is happening with a zombie process, and about if is the zombie related to Oracle, I mean it isnt, but if I try to kill the process id 1, what it is the init main process, the system didnt allow it anymore and the same happend when I try to use kill -HUP 1, so I thought if I kill the init 1 the system will down because it's the main process. or am I wrong? regards
participants (8)
-
Anders Johansson
-
Damon Register
-
Darryl Gregorash
-
Francesco Teodori
-
Gilberto I. Monroy Lopez
-
Mike Noble
-
Silviu Marin-Caea
-
Theo v. Werkhoven