LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 09-19-2008, 08:15 AM   #1
centosfan
Member
 
Registered: Jun 2003
Location: Royal City
Distribution: Cent os latest version
Posts: 213

Rep: Reputation: 31
What are zombie tasks?


I noticed when i type top there is always zombie tasks which dissaper and appear.Is that bad,if yes how do i get rid of them and detect what causing them ?
 
Old 09-19-2008, 08:35 AM   #2
CRC123
Member
 
Registered: Aug 2008
Distribution: opensuse, RHEL
Posts: 374
Blog Entries: 1

Rep: Reputation: 31
This site has some good info on what Zombie processes are. It looks like you have a program(s) running somewhere that is a little slow at collecting its dead baby processes with wait() So no problem
 
Old 09-19-2008, 08:47 AM   #3
sundialsvcs
Senior Member
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 3,681

Rep: Reputation: 329Reputation: 329Reputation: 329Reputation: 329
This is by design. No action is necessary on your part. There is nothing wrong. "Nothing to see here... move along... move along..."

The Unix/Linux system is founded on the notion that you can get things done by creating small, simple, fairly special-purpose programs and stringing them together. For example, the command-line features '|' ("pipe") and '&' ("background execution") are built on this.

So... you (or your program) fires-off another process to do this-or-that, and then, say, waits for it to finish. (Or, eventually notices that it has finished.)

Thought Question...
Quote:
"How can your program know the status of that 'other process' that it had launched, if that 'other process' has "already finished?"

"How could there possibly be any information (left...) to collect?"

I mean, "if it has 'finished,' doesn't that mean that it's 'like, really gone,' and so there's nothing left to look at unless you like digging in a graveyard?"

(Clever answer: "nope... 'cuz for the moment at least, it's a zombie.")
When that 'other process' finishes, it becomes a "zombie" precisely so that it will be possible for your process to "notice that it has died" and to collect final-status (such as a return-code) from it.

The "zombie" state exists to facilitate this rendezvous.

The "zombie" sits there until you inquire. The act of "waiting for the 'other process' to die," or of "noticing that it has died," serves to reap ... as in Grim Reaper ... the zombie-process. At this point, the zombie ceases to exist.

If your process dies without inquiring as to the status of the others, the zombies will be inherited by "process #1, 'init'," a system-defined process which by-definition never dies. init will, of course, immediately "reap" them.

(Process-table overflows are prevented by imposing reasonable limits on the maximum number of processes, "dead or alive," that you can have.)

Last edited by sundialsvcs; 09-19-2008 at 08:52 AM.
 
Old 09-19-2008, 09:15 AM   #4
centosfan
Member
 
Registered: Jun 2003
Location: Royal City
Distribution: Cent os latest version
Posts: 213

Original Poster
Rep: Reputation: 31
In shortly i dont need to bother with it.
 
Old 09-19-2008, 11:10 PM   #5
cyberhydra
LQ Newbie
 
Registered: Aug 2007
Posts: 25

Rep: Reputation: 15
Quote:
Originally Posted by JACOBKELL View Post
What are zombie tasks?
1- eating brains
2- walking around going "ugghhhnnnnn"
3- scaring people
4- most find work in movies.



I could not resist....
 
Old 09-21-2008, 08:45 PM   #6
sundialsvcs
Senior Member
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 3,681

Rep: Reputation: 329Reputation: 329Reputation: 329Reputation: 329
I like "zombie movies," and some of those really-campy movies that occupied many a too-hot afternoon in (uhhh....) the mid-80's.

My favorite, I guess, was named Hotel Hell. The name ostensibly came from the fact that the "O" of "Hello" was burned-out. Believe me, the movie took a real nose-dive from there. But what made it so darned funny to me was that it was not trying to be funny: it was trying to be scary.

You know the formula. Basically, the story goes that for some reason people were getting their vocal-cords ripped out and they got planted up to their necks in the garden, still alive and making gagging noises. And then this cute young couple (TM) has their car break down on a lonely rainy night (TM) and ... blah blah blah. Well, let's just say that "Psycho it ain't. But it did beat being outside in the heat."

Last edited by sundialsvcs; 09-21-2008 at 08:47 PM.
 
Old 09-21-2008, 09:34 PM   #7
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,151

Rep: Reputation: 46
Thanks sundialscvs. I always wondered that myself.
 
Old 09-22-2008, 07:20 AM   #8
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 3,905

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
The zombie state is the final state of any given process, or, more accurately, the "nonexistence". A process marked as zombie is a process that have been closed. It no longer exists in the memory and all the associated structures have been freed.

The concept of "process" only loosely applies to a "zombie process".

So, what's exactly what remains? The name of the process in the process table, and the associated return value of that process, which can be useful for many purposes. You don't have to worry about zombie processes, it's just the normal way of handling processes in linux.

Last edited by i92guboj; 09-22-2008 at 07:22 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Zombie processes Ynot Irucrem General 2 01-11-2007 12:23 AM
zombie process ihatecomputers Linux - Software 2 03-24-2005 07:09 AM
zombie nyk Linux - Software 5 10-27-2004 08:29 PM
xscreensaver goes zombie? jpbarto Linux - Software 1 08-11-2003 03:55 PM
zombie processes mhr Linux - Newbie 1 06-19-2003 09:49 PM


All times are GMT -5. The time now is 11:51 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration