Operating System - HP-UX
1847474 Members
3196 Online
110265 Solutions
New Discussion

can not kill process as root

 
SOLVED
Go to solution
Ratzie
Super Advisor

can not kill process as root

By the looks of the ps command it is not a zombie, but we still cant seem to kill the process, kill or kill -9. Unless we reboot the system.
We could not kill either one.

# ps -ef |grep app
user1 9616 1 0 11:22:45 ? 0:00 /share/app/3.27/bin/app
root 9475 1 0 11:17:25 ? 0:00 /share/app/3.27/bin/app
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: can not kill process as root

Hi:

If a 'kill -9' doesn't send the process away, only time or a reboot will do so.

Proceses must run to die. If the pid is immune to 'kill -9' then it is waiting on an event, such as an I/O to complete. Until that happens it isn't going to be revived and be killed.

In these cases, it is only occupying a slot in the process table and otherwise is doing little harm.

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: can not kill process as root

kill -9 cannot kill a process that is not running. A process pauses when a kernel call is made and the call never completes. This is very common with network programming. The I/O does not have a timeout so the kernel waits forever to complete the request. Your application needs to be rewritten to setup timeout conditions and terminate the I/O request when too much time has elapsed. The technique varies with the type of system call the app is making.


Bill Hassell, sysadmin
Borislav Perkov
Respected Contributor

Re: can not kill process as root

Hi LHardowy,
From the output of the ps command you can see that the parent proces of app is init. Most of the cases when the process waits for I/O and the real parent process terminates PPID of the changes to init and the child process cannot be terminated. As in previos answers you have to make changes in application to avoid this. The only way to kill these processes if to make reboot.
Regards,
Borislav
Ratzie
Super Advisor

Re: can not kill process as root

Thanks