Operating System - HP-UX
1833590 Members
4173 Online
110061 Solutions
New Discussion

Question on defunct/zombie process UX

 
Bobcat_1
Advisor

Question on defunct/zombie process UX

Does defunct/zombie processess consumes up system resources if left alone ?

Is system restarts the only available recovery action to recover from defunct processess ?

Thanks
5 REPLIES 5
Rasheed Tamton
Honored Contributor

Re: Question on defunct/zombie process UX

An old note I had - may be from the forum.

A zombie process is a process that has ended but has no parent process to report
to. The only system resource they use is a position in the process
table, so there is little reason that you should worry about them. The
bigger worry, is why they lost their parent process. If you are experiencing a
lot of zombies, you need to determine the reason. You can fill the process tabl
e and bring the system down. Zombies can only be removed by rebooting the syste
m.

Regards.
Yogeeraj_1
Honored Contributor

Re: Question on defunct/zombie process UX

hi,

Below a quote from Hp's Ralf Puchner which i have saved in my notes:


A zombie process is a process which has died and whose parent process is still running and has not wait()ed for it. In other words, if a process becomes a zombie, it means that the parent process has not called wait() or waitpid() to obtain the child process's termination status. Once the parent retrieves a child's termination status, that child process no longer appears in the process table.

You cannot kill a zombie process, because it's already dead. It is taking up space in the process table, and that's about it.

If any process terminates before its children do, init inherits those children. When they die, init calls one of the wait() functions to retrieve the child's termination status, and the child disappears from the process table.

A zombie process is not, in and of itself, harmful, unless there are many of them taking up space in the process table. But it's generally bad programming practice to leave zombies lying around, in the same way
that it's generally a Bad Thing to never bother to free memory you've malloc()ed.


hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: Question on defunct/zombie process UX

hi again,

Note that you can use ipcrm to release shared memory.

Also note that you may leak shared memory by incorrectly killing applications but using "ipcs -m" may allow you to clean them up.

But you will agree that a zombie indicates a programming problem with the application. So it is time to redesign the application.

I would recommend that instead of restarting the server "for refreshing memory". You may wish to simply restart the application process. In fact, properly patched HP-UX is extremely stable and can run for years without a reboot. It is always bad application programs that are the culprit but even these can be fixed by restarting the apps, not rebooting. The ONLY reason to reboot is to perform kernel patches, perhaps 2-3 times each year.

hope this helps too!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Dennis Handly
Acclaimed Contributor

Re: Question on defunct/zombie process UX

>Rasheed: Zombies can only be removed by rebooting the system.

You can kill zombies by killing the evil zombie master (parent ;-). (You would need to decide whether keeping the parent alive is more important than leaving the zombie and/or later rebooting.)

See Yogeeraj's details.
Andrew Merritt_2
Honored Contributor

Re: Question on defunct/zombie process UX

Hi Bobcat,
Is this a general question, or are there specific processes you are concerned about?

How long are the processes present for? There are some cases where a parent only issues the wait periodically, and if the child has exited in the meantime, you'll see the process for a while, but it gets cleaned up eventually. The only resource being used by the zombie is the process slot.

Andrew