Operating System - HP-UX
1836617 Members
2016 Online
110102 Solutions
New Discussion

Re: Cannot kill a process

 
SOLVED
Go to solution
Andrej Vavro
Frequent Advisor

Cannot kill a process

I need to start an application process, which occupies 4 ports. But need to kill from previous run, because the ports are held. Kill -9 pid doesn't kill the process. Any idea? I think to get the ports free would be enough.

Thanks,
Andrej
9 REPLIES 9
Armin Feller
Honored Contributor

Re: Cannot kill a process

If the process does not show up with ps-ef, it is a zombie
and the system has to be rebooted. In other words, the
process is no longer active, but for some reason remains
in the process table and could appear in the list of
processes when you type the ps command.

If there is no pid (process identifier) to kill, then
some processes do not exit properly, and do not die all
the way and they can still consume resources.
Ken Hubnik_2
Honored Contributor

Re: Cannot kill a process

My experience with hung ports is a reboot is the only way to clear the ports and to clear processes that will not die with kill -9.
Vicente Sanchez_3
Respected Contributor

Re: Cannot kill a process

Hello,

Try to kill -15 or -18 to the process PID.

If doesn't work try -15 or -18 to the Parent PID.

If doesn't work, perhaps a init to low value can kill the process.

If not I think you have to reboot the system.

Regards, Vicente.
harry d brown jr
Honored Contributor
Solution

Re: Cannot kill a process

(1) fix application
(2) reboot

live free or die
harry
Live Free or Die
Andrej Vavro
Frequent Advisor

Re: Cannot kill a process

After kill -9 the process is still visible using ps -ef. I cannot reboot the system. Other databases and applications are still running ok. I can setup the appl. to use another set of ports, but I wanted to be sure whether there is an other way.
Is or is not?
Armin Feller
Honored Contributor

Re: Cannot kill a process

Hi Andrej,

there is no way to remove ZOMBIs without a reboot ;-(

SORRY

Regards,
Armin
Andrej Vavro
Frequent Advisor

Re: Cannot kill a process

Harry, right answer. I am not a developer. I'll notify them.

Thank you all gyus.
Simon Hargrave
Honored Contributor

Re: Cannot kill a process

If the process is still visible after a kill -9, then it is likely in a high-priority sleep state (with a PRI of 128-153 I think?). You should be able to see that it constantly has a priority in this range with ps -l.

What this means is that it is waiting on a high-priority resource, and ignores all other signals (SIGKILL etc). The only way for it to be freed is for the resource it is requesting to be freed.

For example, if you do a bdf command when a mounted disk has been disconnected, or an nfs mounted server has disappeared, the bdf will remain, unkillable, until the resource returns, or the LVM activity times out.

There's nothing you can really do to kill the current process (except for the reboot), but it does point to a problem with your application. You'll probably want to run a debugger or trace against it and see what occurs.


Sy
Steven E. Protter
Exalted Contributor

Re: Cannot kill a process

Sometimes you get "lucky" and the parent process gets changed to process 1.

You can't kill process 1, so thats why you have to reboot.

Steve
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