Operating System - Linux
1754134 Members
3137 Online
108811 Solutions
New Discussion юеВ

Re: Kill not working Red Hat linux - 9 Enterprise Edition

 
SOLVED
Go to solution
Sarvesh A Dhuri
Advisor

Kill not working Red Hat linux - 9 Enterprise Edition

Dear All

I have a red hat linux - 9 enterprise edition machine installed on Intel platform , our software development team has written a program which is used for establish socket connecion to the users , when this process hungs , we try to kill it by kill -9 and its PID , but the process is not getting killed , in top and in ps , the process is still running & the only solution left for us to reboot the system, kindly provide me the solution / suggestion for the same.

thanks in advance
I have been betrayed by our own People
5 REPLIES 5
Mark Grant
Honored Contributor
Solution

Re: Kill not working Red Hat linux - 9 Enterprise Edition

There is a very similar question going on in the HPUX forum at the moment. Basically this process is blocking on i/o.

If the process is hanging, you need to get your development team to find out why. It may be that connecting to the port it listens on may be enough to wake it up, probably not though. However, a well written process should not get itself in this state and an audit of the code may be in order.
Never preceed any demonstration with anything more predictive than "watch this"
Sarvesh A Dhuri
Advisor

Re: Kill not working Red Hat linux - 9 Enterprise Edition

Thanks Mark ,
our software team are analyzing the code , is there any solution for it, apart from reboot , which we are doing right now , after ever two or three days time
I have been betrayed by our own People
Jan Sladky
Trusted Contributor

Re: Kill not working Red Hat linux - 9 Enterprise Edition

hi Sarvesh,

I agree with Mark and I have following experience - if process can't be killed by kill
I use the killall -9 NAMEOFPID and sometimes it helps. If it possible in your case, you can try it

br Jan
GSM, Intelligent Networks, UNIX
Vernon Brown_4
Trusted Contributor

Re: Kill not working Red Hat linux - 9 Enterprise Edition

It may be possible to kill or disconnect the resources that the culprit process is using. If it is an IO, you might bring down the IO to wake the process.

I've seen this happen when programmers write code that disables interrupts while receiving or sending packets. Good code will always time out and re-enable interrupts when the expected doesn't happen.
Roberto Polli
Trusted Contributor

Re: Kill not working Red Hat linux - 9 Enterprise Edition

A little trick:

if you are mounting an area from the fallen machine

192.168.13.45:/home/nfs/share

you can kill the process [resuming the blocking I/O] configuring a virtual loop interface with the ipaddress of the broken machine
eg
#ifconfig lo:0 inet 192.168.13.45/16 up
and bring it down
#ifconfig lo:0 down
it will close correctly the I/O

NB. thin way you may experience problems due to the updated routing table which enroutes packets to 192.168 on the lo:0 ; maybe you may work on broadcast to correct this.

Peace, R.