LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 05-14-2007, 11:09 AM   #1
ejan
Member
 
Registered: Mar 2007
Location: Rochester Hills, MI, USA
Distribution: Mandriva 2007, CentOS 5, Debian 4.0
Posts: 38

Rep: Reputation: 15
A Sure Shot Way To Kil Zombie Processes


Recently I have noticed that each time I boot up my CentOS 5 box, two processes in the Gnome System Monitor are listed as Zombie. These are netstat and Xsession. No matter how I try to kill them (by trying to stop, kill, or end them), they stay in the list.

Is there a shore shot way to get rid of these two always-zombie processes?
 
Old 05-14-2007, 11:23 AM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
http://www.cyberciti.biz/tips/killin...e-process.html

Short answer is you cannot kill zombies, they are already dead!!
The above link will start you in the right direction however. I found it by Googling 'linux zombie processes'.
 
Old 05-14-2007, 12:30 PM   #3
ejan
Member
 
Registered: Mar 2007
Location: Rochester Hills, MI, USA
Distribution: Mandriva 2007, CentOS 5, Debian 4.0
Posts: 38

Original Poster
Rep: Reputation: 15
I've read the article you suggested. Things are somewhat obscure and need some research on my part. The article suggests that it's okay to live with Zombies as they don't take up much of the system resources. However, I feel kinda uncomfortable living with 'em .

Hopefully, I'll be posting back a solution soon.
 
Old 05-15-2007, 12:48 AM   #4
ejan
Member
 
Registered: Mar 2007
Location: Rochester Hills, MI, USA
Distribution: Mandriva 2007, CentOS 5, Debian 4.0
Posts: 38

Original Poster
Rep: Reputation: 15
An article on Zombie Processes at LinuxSA summarizes very well what's described at Wikipedia.

There are actually four ways to deal with Zombie processes:
  • Fix the parent; make it wait() for the Zombie process. this can be done simply by issuing this command:
    Code:
    kill -s SIGCHLD PPID
    However, buggy software will simply ignore this command. In most cases, the software being buggy is the very reason for a Zombie process.
  • Kill the parent; be cautious with this option and know the repercussions of killing a running process dead.
  • Make the Zombie process a grand child of another process and then kill that process immediately; this will make the Zombie a child of init (PID 1) which regularly puts Zombies to eternal rest; I don't know of an easy way of doing this. You'll need to write code to make this happen.
  • Live with the Zombie process; this should not be an issue (try not to think about them ) as they don't have any resources tied up to them but if there are a lot of Zombies, under a heavy load you might potentially run out of PIDs

I hope this post is informational. But again the main issue remains the same, we still have no sure-shot way of getting rid of Zombies. May be if I can collect some more interesting information on this, I'll be posting it back here.
 
Old 05-15-2007, 12:50 AM   #5
ejan
Member
 
Registered: Mar 2007
Location: Rochester Hills, MI, USA
Distribution: Mandriva 2007, CentOS 5, Debian 4.0
Posts: 38

Original Poster
Rep: Reputation: 15
Ah sorry. I forgot to say you thanks, GrapefruiTgirl. Thank you very much for getting me started in the right direction.
 
  


Reply

Tags
kill, process, zombie



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 processes Ynot Irucrem General 2 01-11-2007 12:23 AM
Zombie/Sleeping processes hogging CPU nomind Linux - General 2 04-21-2006 11:22 AM
A problem with threads creates 300+ zombie processes zahadumy Programming 1 11-27-2005 07:15 PM
zombie processes mhr Linux - Newbie 1 06-19-2003 09:49 PM
How to get rid of zombie processes ugge Linux - General 3 10-01-2001 09:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 12:58 PM.

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