Operating System - HP-UX
1819933 Members
3413 Online
109607 Solutions
New Discussion юеВ

"kill -9" doesn't kill the process !

 
haux
Advisor

"kill -9" doesn't kill the process !

Hi,

I get an old process (hanged rsm session for business copy job)

root@hpux_server:/opt/Hewlett-Packard/RSMHostSW/RSMHA/logs >#ps -ef | grep 10369
root 10369 1 0 Nov 15 ? 0:00 fstyp -v /dev/index_db/temp_swap



Why the kill -9 don't kill it ?



root@hpux_server:/opt/Hewlett-Packard/RSMHostSW/RSMHA/logs >#kill -9 10369

root@hpux_server:/opt/Hewlett-Packard/RSMHostSW/RSMHA/logs >#ps -ef | grep 10369
root 10369 1 0 Nov 15 ? 0:00 fstyp -v /dev/index_db/temp_swap

6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: "kill -9" doesn't kill the process !

Hi:

A 'kill -9' that donesn't terminate a process simply means that the process isn't in a state to run. That is, the process is waiting on an event (usually an I/O). Until the event occurs, the signal cannot be handled.

If you are determined to eliminate the process and a 'kill -9' has no effect, then a reboot may be your only option.

Regards!

...JRF...
haux
Advisor

Re: "kill -9" doesn't kill the process !

Thank you for the answer.


But I hoped less brutal solution,

That remember me Windoz :(

Thank you for your answer
Matti_Kurkela
Honored Contributor

Re: "kill -9" doesn't kill the process !

By my experience, the two most common reasons for unkillable processes in HP-UX systems are:

1.) the process is trying to access a NFS-mounted filesystem and the NFS server is unreachable (the deprecated and much-hated pfs_mount system for CDs is a sort of special case of this...)

or

2.) the process is trying to access files on a disk that does not respond at all. The "ioscan -fnCdisk" command will show the disk in NO_HW state. **This is a hardware problem which requires diagnosis and corrective actions!**

Sometimes it's as simple as plugging a disconnected cable back in. Unfortunately, it might also be a disk that has reached the end of its life.

MK
MK
Jaime Bolanos Rojas.
Honored Contributor

Re: "kill -9" doesn't kill the process !

haux,

You do not really want to use a kill -9 on a production system, it can create way more problems than what you can imagine. Whenever you see something like that, and the process does not goes away just reboot the machine.

Regards,

Jaime.
Work hard when the need comes out.
Md. Farhan A Azam
Trusted Contributor

Re: "kill -9" doesn't kill the process !

Hi,

First check that process is running on which path.

fuser -cu [path]

then you can kill all user

#fuser -ck [path]

then try with
#kill -9

Hope it will work.
Wim Rombauts
Honored Contributor

Re: "kill -9" doesn't kill the process !

Unfortunately, there are moments where you cannot get rid of a process.

A kill -9 is a signal that is not sent to the process itself. Unlike a kill -15, which kindly asks the process to stop, a kill -9 is a signal to the kernel to throw the process out.
But there are times when the process has to ask the kernel to handle some operations that the process cannot handle itself. IO for example.
When something goes wrong at that time, it is in fact the kernel that hangs, and you cannot kill the kernel with a signal 9. Killing the kernel would mean crashing your system.

I have seen similar issues long ago. Sometimes, some patience can help. The kernel thread may timeout after some (long) time, mabe just to report bak to the process that it is still trying, and at that time, the kill -9 will kick in and kill the process.