1834869 Members
2525 Online
110070 Solutions
New Discussion

KILL doesnt works

 
Amit Dixit_2
Regular Advisor

KILL doesnt works

Hi,
I am having HP-UX Itanium running HP-UX 11.23
When I try to kill some process it doesnt
do so, so I do a kill of parnet process
it changes the parent process ID to "1"
but still after that when i try to kill the
process it doesnt work at all...

Thank,
Amit
11 REPLIES 11
Steven E. Protter
Exalted Contributor

Re: KILL doesnt works

try kill -9

If that does not work, your only alternative is to boot the server.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Hoang Chi Cong_1
Honored Contributor

Re: KILL doesnt works

Amit Dixit, did you use kill with -9 option?
If did not. Try to use kill -9 .
Have you try the ipcrm command (remove message queue)?
Sometime, kill doesn't work but ipcrm works!
Hope this helps,
Jimkery
Looking for a special chance.......
A. Clay Stephenson
Acclaimed Contributor

Re: KILL doesnt works

This is normal for a process that is waiting on a higher priority event (e.g. I/O). The process will not respond to an event until the higher priority event is satisfied. Kill really shouldn't be thought of as "kill"; it simply sends a signal to a process. That process may or may not respond to the signal. At best, kill is really just a strong hint.
If it ain't broke, I can fix that.
Amit Dixit_2
Regular Advisor

Re: KILL doesnt works

Hi,
I always used -9 option but the informix
daemon never responds.

Stephen I 've never seen kill fail on
solaris, may be its a bug with HP-UX
itaniums.

Thanks,
Amit.
Girish_17
Regular Advisor

Re: KILL doesnt works

Hi AMit,
It is not a bug but as clay suggested process may be waiting for high priority I/O. Like for e.g. "tar tvf " can't be killed unless it comes out giving any error.

-9 in kill command send SIGKILL signal to the process and it depends on process whether to accepts it or not depending on the priority of job it is doing. Now if -9 is not working for you then you can't kill the process in any way. The only option is to reboot the server.

Hope that helps.
Regards,

Bharat Katkar
Honored Contributor

Re: KILL doesnt works

HI Amit,
Can you provide us the exact details about which process and in what situation u r trying to kill so that we can discuss about any workarounds as well.
Regards,
You need to know a lot to actually know how little you know
Amit Dixit_2
Regular Advisor

Re: KILL doesnt works

Hi Bharat,
Usually it is informix, when we do some
load test on the DB it gets hang and when
we try kill this informix daemon it
doesnt' goes off.

Then reboot solve the purpose but its very
risk as there is change of filesystem
failure.

Thanks,
Amit.
Bharat Katkar
Honored Contributor

Re: KILL doesnt works

Hi Amit,
I am not an DB expert but whether shutting down of database and then bringing it up again solves the problem. This won't require system reboot.
Also then there is need to lookout for DB log files to see where exactly your load test goes into problem and what is that it is waiting for to happen. You have to also check the kernel parameters which really has impact on Informix database behavior.

Hope that helps,.
Regards,
You need to know a lot to actually know how little you know
Amit Dixit_2
Regular Advisor

Re: KILL doesnt works

HI Bharat,
I give kill when I am unable to shutdown
the DB.

Thanks,
Amit

Re: KILL doesnt works

Amit,

As already pointed out, a PID that won't die is generally one that is active in a system call - that 9 times out of 10 means the process is hung on IO. I would start by looking at your underlying storage infrastructure - are your seeing errors in syslog pertaining to disks?, does STM report any disk problems? Of course it *could* be an OS problem - stops responding like this aren't completely unheard of on any UNIX OS, but you need to discount some other things first. I'm assuming the database software will run in a trace mode - the next thing to do if your storage all checks out OK is turn this on and reproduce the problem, then pass to your DB vendor for further analysis.

The parent processes won't die until the child processes have gone away, thats why they change their own PPID to 1. There's no point in even trying to terminate these if the child processes won't die.

As a side point, you should never start with a '-9' terminate - always just try terminate first - this will send a SIGTERM which may allow the process to exit gracefully.

HTH

Duncan


I am an HPE Employee
Accept or Kudo
RAC_1
Honored Contributor

Re: KILL doesnt works

Amit,

Others have pretty well explained that the process is waiting for some type i/o to complete and can be killed. (The process is in kernel mode and can not be signalled. The process priority lies in 128-153. ps -efl|grep "process)

What I want to tell you that is, why -9 signal. You should not be using -9 signal on all process. -9 does not do any cleanup and any data segments, memeory the process might have occupied willnot be cleaned up. A real sysadmin wont use it on first instance.

I generally try as follows.

-15 (default)
-1
-2
-3
-11
(-11 is as effective as -9 and does clean up work)

Anil
There is no substitute to HARDWORK