LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-08-2008, 03:31 AM   #1
lawrence_lee_lee
Member
 
Registered: May 2007
Posts: 141

Rep: Reputation: 16
problems in killing a process


When I type top in my terminal, I see a process with status "D" (Dead?) and one with "Z" (Zombie?). What does these two mean exactly? And how are they different?

I then want to kill them. So I type "kill (PID of those 2 processes)". But when I top again, I still see these 2 processes, with the same PID! I tried many times to kill them by using the "kill" command as well as typing "k" in top, but none can help me to kill the processes. What should I do? I just want those 2 processes being killed!

Thanks for any help offered!
 
Old 06-08-2008, 03:35 AM   #2
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
Have you tried kill -9 [pid]? Some zombie processes cannot be killed until the system is rebooted.
 
Old 06-08-2008, 05:30 AM   #3
lawrence_lee_lee
Member
 
Registered: May 2007
Posts: 141

Original Poster
Rep: Reputation: 16
I've tried many different signals including -s 9, -s 1 , -s 15, -s 6, -s 20.

But the process is still here. Whats the next step I can perform?
 
Old 06-08-2008, 05:40 AM   #4
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
in my experience... reboot.
 
Old 06-08-2008, 08:22 AM   #5
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
A 'D' process in top is not dead; it's a process that's using hardware (the 'D' stands for 'disk', but it could actually be using the network card or any number of other hardware devices instead).

All processes (either programs or threads) are started by another process, which is called its parent. If a process outlives its parent, then it is called a zombie. Zombies are not by definition a bad thing to have, but most programs will tidy up their child processes when the exit, so zombies are worth looking into if they hang around.


If kill -9 doesn't kill the process, nothing will.

It means that the process has some resources open, and won't close them, so the scheduler cannot remove it. This is most likely caused by a bug in some kernel module. Very occasionally, there are ways to forcibly remove resources, eg by unmounting a filesystem the program is holding open, but this relies on knowing what the resource is.

You can sometimes find relevant error messages in /var/log/messages, or by running dmesg, but sometimes not.

The best thing to do, unless you can find a way to diagnose the problem further, is to upgrade your kernel as soon as upgrades become available on your system.

If you do find more information, then report it to the maintainers of your distribution, and they will fix it in a later kernel release; by upgrading you are hoping that someone else has had the same problem (possibly with different symptoms) and tracked it down.
 
Old 06-09-2008, 02:12 AM   #6
lawrence_lee_lee
Member
 
Registered: May 2007
Posts: 141

Original Poster
Rep: Reputation: 16
Thanks very much! Your replies help me to learn much more about the status of processes!
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems killing process Artik Debian 6 05-03-2005 11:29 AM
Killing a process by its name rabeea Linux - Networking 3 03-17-2005 06:30 AM
help with killing all java process idandl Linux - Newbie 2 02-02-2004 06:32 AM
Killing/Ending a process james_cwy Linux - Newbie 6 12-16-2003 10:45 PM
Really Killing a Process! lazlow69 Linux - Newbie 14 05-10-2003 11:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:10 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