- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- runaway and zombie ..
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2001 11:25 PM
тАО07-26-2001 11:25 PM
What is the difference between a runaway and a zombie process? I know you check for a zombie
#ps -ef defunct
but how do you find a runaway process or is it the same thing just a differnt name?
thanks
Richard
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2001 11:39 PM
тАО07-26-2001 11:39 PM
Re: runaway and zombie ..
you'll find answers to most questings on defuncts, runaways and zombies in this discussion
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x6f717e990647d4118fee0090279cd0f9,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2001 11:42 PM
тАО07-26-2001 11:42 PM
Re: runaway and zombie ..
runaway and zombie are different.when you created the child process(es) using fork(), the parent process has to wait untill child process to finish it's job. when the child finishes the job and dies then parent becomes zombie, if the parent dies before child completes it's job then child become orphan.
ususally in all the programs the parent process will be made to wait using wait(), but same doesn't apply to child, so the child finishes it's job and runaway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2001 02:47 AM
тАО07-27-2001 02:47 AM
SolutionThat's mean, consider a process P0 is doing a fork ( creates a copy of himeself ). The copy process is P1 called the child process and P0 is the parent process of P1.
If P1 finish his work ( normal or abnormal exit ) and P0 is not listening to him with a wait() function. So , P1 became a ZOMBIE process.
Alot of devellopers fall into this problem ( they are no more accepted into the system under their loginnames till these zambies are killed with a BOOT of course ) and the only way to kill them is REBOOTING the system.
Why booting, is that Zombies are considered as
1. Not live nor Died !!! So how to kill them.
If you need any help to avoid this miss programming, I have the solution just append your request .
Have a look in the following book :
Advanced Programming in the UNIX Environment.
Addison-Wesley
W. Richard Stevens.
Pages 195 and 196
Example:
P0 is the parent of P1.
P1 is the child of P0.
Normal programming is :
1. The parent P0 should execute a wait() function before a child process terminates normally or abnormally.
2. If Child process is not sure that his parent is waiting for him , he will execute the function getppid() function and executes an exit() as soon the function getppid() returns 1 ( that means that the unix init process (pid 1) is the actual parent).
unix init process ( pid 1) inheriets all orphan processes and immediately executes a wait() function as soon as a child process exits ( normal or abnormal exit ).
It's really the Client/Server model from a process point of view .
The manner by which the Unix model avoid that is :
P0 forks twice ,
P0 fork and gives P1
P1 fork and gives P2
1.The first instruction of P2 is to loop till getppid() returns 1; getppid means GetParentProcessIdentification. ( init process )
2. The first instruction of P1 is exit() function.
3. P2 became ORPHAN.
4. init process become the actual parent of P2.
5. The function getppid() returns 1 now.
6. The P2 process executes its task.
7. P2 terminates normally or abnormally.
8. init process executes an immediate wait() function.
9. P2 died without being ZAMBIE.
If you follow this protocol, your application will never have zombies processes.
Hope this explain the issue.
Wainting for any discussion.
Magdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2001 02:57 AM
тАО07-27-2001 02:57 AM
Re: runaway and zombie ..
If you issue the command
ps -ef ? more
it will report under the column COMMAND:
The zombie process with the string :
Magdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2001 06:29 AM
тАО07-27-2001 06:29 AM
Re: runaway and zombie ..
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2001 06:42 AM
тАО07-27-2001 06:42 AM
Re: runaway and zombie ..
Ravi and Sachin : Really sorry !
When child finishes and it's parent is not listening for him ( with a wait() function ) then
CHILD become ZOMBIE and NOT the PARENT!!!
Magdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2001 12:53 PM
тАО07-27-2001 12:53 PM
Re: runaway and zombie ..
EVERY process becomes a zombie (output of "ps -el"
show a "Z" in the state column), when it exits, regardless
wether by being killed or by calling "exit()" or something
else. It stays in that state until its parent process has
received the signal "Death of a Child" (SIGCHLD). Then
the zombie disappears. Its a normal state!
The ONLY way to not become a zombie, is for the parent
to block that signal SIGCHL before calling "fork()".
A "runaway" process is just one, which eats up lots of
cpu time without stopping eventually. This is usually
considered to a bug, i.e. abnormal.
Just my $0.02,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2001 01:37 PM
тАО07-30-2001 01:37 PM
Re: runaway and zombie ..
You can test for a runaway process(one that is in a solid "R"un state) via: ps -efl | grep " R " This will also return the ps and the grep commands you issue to identify the bona-fide runaway(s). You can ignore these with a couple of piped greps.