Re: some times it so happens that kill -9 <PID> does not work even with root. y ?

From: Kasper Dupont (
Date: 08/11/05

Date: Thu, 11 Aug 2005 13:36:13 +0200

Anand Kumar wrote:
> some times it so happens that kill -9 <PID> does not work even with
> root privilage, can anyone guide me a better way to terminate this kind
> of an issue.

There are three possibilities:
1. The process is a zombie
   (usually indicated with a Z in a process list).
2. The process is noninterruptible sleep
   (usually indicated with a D in a process list).
3. There is a kernel bug

The zombie cannot be killed with signal 9 because it is already
dead. It will stay around until the parent collect the exit
status or die. On rare occations I have seen zombies with init
as their parent, if they stay around it is most likely a kernel

A process in noninterruptible sleep will have the signal pending
until the event it is waiting for has occured. Often this is
file system access, which is why it is indicated with a D. For
example you often see this on NFS clients if the server went
down. Using the hard and intr flags together on NFS mounts will
help you with that problem. I think faulty hardware can also
cause processes to be stuck in noninterruptible sleep, for
example if the process is waiting for a response from a faulty

Then of course there are kernel bugs, for example it could be
that the process is stuck in an infinite loop somewhere in the
kernel code. It is also possible that the process is in
noninterruptible sleep, but the event supposed to wake it up
already happened long time ago but for some reason (for example
a race condition) the process was not waked up and is no going
to sleep forever.

> i found this twice,
> 1. once when i was using some GUI application on linux, i could not
> able to kill using kill -9 <PID> instead i used "xkill" to terminate.

xkill does not terminate any process. Using xkill will simply
remove the window, a correctly working process will typically
detect the window is gone and terminate. (Actually it is the
connection which is terminated causing the window to be closed).
Newbies often mistakenly believes that killing the window will
help when a process for some reason went into an infinite loop,
that is however not the case. kill -9 is better in such a case.

> 2. Secondly, when i want to uninstatll certain rpm packages esp
> devel-***.rpm, i used rpm -e XXX-devel-*** but the terminal was hung or
> took to much of time to uninstall, i tried to kill the process using
> kill -9 <PID> but still then i could not do so.

Sounds like some futex problem.

Kasper Dupont
Note to self: Don't try to allocate
256000 pages with GFP_KERNEL on x86.

Relevant Pages

  • Re: Accept ONE character no need to hit enter in window?
    ... Objects are GET fields, check boxes, lists, popups, ... object or backward past the first object exits READ (if the CYCLE clause ... that was defined to terminate the READ also exits the READ. ... regardless of the window they are placed in. ...
  • Re: Abnormally dropped sessions & running programs
    ... If I close the CA window either ... If so, an appropriate method to terminate the interactive process is via SIGNOFF or ENDJOB at the server, rather than trying to some end attempt from the client. ... If an application attempts to access the workstation device for a supported function which is not /recoverable/ when there is a device error, then the detection of the disconnected device will be manifest as an I/O error reported to the application which attempted to access that device. ... There may not be any reasonable or explicitly supported method to communicate directly with the device, such that the most appropriate resolution would be by running the application in a batch job instead of in an interactive job, such that no dependency exists between the application and a device. ...
  • Re: Killing an application
    ... Registered Window Message to ask a process to terminate itself. ... If it is a console app, you probably should not be using ShellExecute; if you know it is a ... ..exe file, ShellExecute is probably a poor choice, you should consider CreateProcess, ...
  • Re: begin and end keys while typing command
    ... a gnome-terminal (a terminal emulator in an X window). ... 'home' and 'end' keys. ... should include 'keycode NNN', where NNN is the number you ... terminate xev by closing the xev ...
  • Re: Abnormally dropped sessions & running programs
    ... by clicking on the close window button or killing it through Task ... TCP/IP connection to the server via a virtual workstation ... terminate the interactive process is via SIGNOFF or ENDJOB at the ... This java program is trivial and does not represent one of our typical ...