LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-17-2010, 08:54 AM   #1
rajesh1978
LQ Newbie
 
Registered: Jun 2010
Posts: 26

Rep: Reputation: 0
Question All about Zombie


Hi,
I am very new to Linux. I started reading a tutorial.
I came across a process called Zombie.

I understand this is a process entry in the process table for a process which is already died.

This happens when the parent is not cleaning the process id from the process table. This is done by wait system call.

sometimes if the parent exits then init process do the cleaning work

Now my doubt is--->
suppose I have so many zombies in my process table.
Then what is the problem they may create? Why I need to kill them
 
Old 06-17-2010, 10:09 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You can't kill a zombie because it is already dead.

It isn't unusual to see a few zombie processes in your process table over time.

However, if you see multiple zombies all from the same parent it typically means there is an issue with the application or some resource it is trying to obtain. You should therefore focus your efforts on trying to find out what the issue is with the application and not waste time on the zombies themselves as they are a symptom of a larger issue.

By the way - sometimes if you can find the parent of a zombie and kill that process then sometimes it will clean up the zombies when it dies. Note you should always do progressive kill i.e. kill -1 <pid>, kill -15 <pid> and only as last resort kill -9 <pid>. Kill -9 tells a process to die without doing any cleanup so can cause tie up of resources or leave bits of itself in tables.
 
Old 06-17-2010, 11:06 AM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
well,
if you have hundreds of zombies they will fill up your process table
and you won't be able to do anything.
your shell will say "too many processes" typically.

great fun.
we've all done it.

zombies get cleaned up eventually by init(8)
 
0 members found this post helpful.
Old 06-17-2010, 12:30 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by bigearsbilly View Post
well,
if you have hundreds of zombies they will fill up your process table
and you won't be able to do anything.
your shell will say "too many processes" typically.
Which is why you should focus on what is causing them. If you get too many processes chances are you're going to have to reboot to clear everything anyway.
 
Old 06-17-2010, 09:58 PM   #5
rajesh1978
LQ Newbie
 
Registered: Jun 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Thank you for your answers.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Zombie Process N|k0N Linux - Security 8 09-22-2007 02:01 AM
Zombie port? edenCC Linux - Server 2 03-30-2007 04:48 PM
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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration