Re: process can't be killed On 2004-11-11, GertK <mail@invalid.null> wrote:
> When a (application) process doesn't go away after a kill (run as root)
> and not even after a kill -9, is there any other method to get rid of it
> besides rebooting? OS is AIX 5.2 ML03.
That depends entirely on what the process is (was) doing, and what sort
of process it is. Generally, when a process is not even killable with
a SIGKILL ('kill -9'), that process has issued an uninterruptible kernel
system call, and that system call is not returning. Whether you can get
rid of the process without rebooting depends on which system call the
process is hanging in.
Rebooting is the easiest and most sure way of getting rid of the process.
However, if you know what the process is (was) doing, there are some other
things you might try. For example, if the process was writing something
to a SCSI-tape, you might try to turn off the particular drive and hope
that there's a timeout in the device driver, which will in turn cause the
system call your process is hanging in to return and thus the SIGKILL to
be delivered, killing the process. Other infamous cases are processes
accessing files over an NFS mount when the NFS mount suddenly disappears
due to e.g. a network problem. In that last case however, there are mount
options you can use to prevent hanging uninterruptable processes.
However, always be careful: things like this can also occur with faulty
hardware and/or kernel and/or device driver. Fiddling with things might
make matters worse. Properly shutting down all normal processes and then
reboot is most likely the safest path to follow.
--
Jurjen Oskam
"I often reflect that if "privileges" had been called "responsibilities" or
"duties", I would have saved thousands of hours explaining to people why
they were only gonna get them over my dead body." - Lee K. Gleason, VMS sysadmin |