What do you do when 'kill -9' doesn't work?

What do you do when 'kill -9' doesn't work?

Post by Andy Lennar » Fri, 11 Apr 2003 19:06:04



On a solaris2.6 machine I've 2 processes that are running but kill -9
won't touch them...

truss -p shows nothing
gdb can't attach

one is using a complete cpu, the other nothing at all...

I'd rather not reboot the machine, what else can I try?

Many thanks,
Andy.

--

 
 
 

What do you do when 'kill -9' doesn't work?

Post by Kent Smit » Fri, 11 Apr 2003 23:07:48


On Thu, 10 Apr 2003 11:06:04 +0100, Andy Lennard


>On a solaris2.6 machine I've 2 processes that are running but kill -9
>won't touch them...

>truss -p shows nothing
>gdb can't attach

>one is using a complete cpu, the other nothing at all...

>I'd rather not reboot the machine, what else can I try?

>Many thanks,
>Andy.

Do any of them have a parent process other than "1" (init)?  Look at
the second column of "ps -ef".  If so, see if you can kill the parent,
which should tank the child.

What are the processes?  If they are <defunct> then the only way to
get rid of them is to kill the parent process AFAIK.

--Kent
=================================
Kent Smith * IPSO Incorporated
Business * Technology * Solutions
Financial Services and Accounting Systems Consulting

http://www.ipsoinc.com

 
 
 

What do you do when 'kill -9' doesn't work?

Post by Andy Lennar » Fri, 11 Apr 2003 23:34:42




>On Thu, 10 Apr 2003 11:06:04 +0100, Andy Lennard

>>On a solaris2.6 machine I've 2 processes that are running but kill -9
>>won't touch them...

>>truss -p shows nothing
>>gdb can't attach

>>one is using a complete cpu, the other nothing at all...

>>I'd rather not reboot the machine, what else can I try?

>>Many thanks,
>>Andy.

>Do any of them have a parent process other than "1" (init)?  Look at
>the second column of "ps -ef".  If so, see if you can kill the parent,
>which should tank the child.

Both had 1 as their parent.

Quote:

>What are the processes?  If they are <defunct> then the only way to
>get rid of them is to kill the parent process AFAIK.

They were part of the interface to Digi terminal servers.

Rebooting the machine sorted them in the end...

Thanks for your response.

Quote:

>--Kent
>=================================
>Kent Smith * IPSO Incorporated
>Business * Technology * Solutions
>Financial Services and Accounting Systems Consulting

>http://www.ipsoinc.com

--

 
 
 

What do you do when 'kill -9' doesn't work?

Post by Chris Co » Sat, 12 Apr 2003 01:11:47



> On a solaris2.6 machine I've 2 processes that are running but kill -9
> won't touch them...

> truss -p shows nothing
> gdb can't attach

> one is using a complete cpu, the other nothing at all...

> I'd rather not reboot the machine, what else can I try?

> Many thanks,
> Andy.

Usually this means that the processes are hung on a
kernel managed resource.  If you can somehow identify
the resource being contended for (and remove the reason
behind the contention), you might get the
process to die.  However, if the machine is just
plain "stuck"... you may have to reboot.

They're not zombine/defunct processes are they?
Could be that the parent just needs to wait for
them.  What process owns the "stuck" ones?
I'm guessing init does.

If truss -p shows nothing for the CPU consuming
process... that's a bad sign (likely stuck in
a system call that is consuming CPU cycles for
some reason).  The one that is doing nothing
probably blocked waiting on a resource... could
be waiting for the other process in fact to
relinquish it :-)

You might want to post the ps -lf output for the
processes.

 
 
 

What do you do when 'kill -9' doesn't work?

Post by Rev. Don Koo » Mon, 14 Apr 2003 05:28:54




>>On a solaris2.6 machine I've 2 processes that are running but kill -9
>>won't touch them...

>>truss -p shows nothing
>>gdb can't attach

>>one is using a complete cpu, the other nothing at all...

>>I'd rather not reboot the machine, what else can I try?

>>Many thanks,
>>Andy.

> Do any of them have a parent process other than "1" (init)?  Look at
> the second column of "ps -ef".  If so, see if you can kill the parent,
> which should tank the child.

> What are the processes?  If they are <defunct> then the only way to
> get rid of them is to kill the parent process AFAIK.

        Not true, Kent.  That's what "preap" is for (but not in SOLARIS 2.6).

                Hope this helps,
                        Don

--
***************************   Q: How many frenchmen does it take
* Rev. Don McDonald, SCNA *      to defend Paris?
* Baltimore, MD           *   A: No one knows, it's never been tried.
***************************
http://mywebpages.comcast.net/oldno7/TheFrench.mpg
Reluctant Yamaha YZF-R1 Owner

 
 
 

What do you do when 'kill -9' doesn't work?

Post by Richard L. Hamilt » Mon, 14 Apr 2003 06:56:47






>>>On a solaris2.6 machine I've 2 processes that are running but kill -9
>>>won't touch them...

>>>truss -p shows nothing
>>>gdb can't attach

>>>one is using a complete cpu, the other nothing at all...

>>>I'd rather not reboot the machine, what else can I try?

>>>Many thanks,
>>>Andy.

>> Do any of them have a parent process other than "1" (init)?  Look at
>> the second column of "ps -ef".  If so, see if you can kill the parent,
>> which should tank the child.

>> What are the processes?  If they are <defunct> then the only way to
>> get rid of them is to kill the parent process AFAIK.

>    Not true, Kent.  That's what "preap" is for (but not in SOLARIS 2.6).

True enough (not until Solaris 9).  But I'd  use "preap" only if
I were willing to kill the parent eventually anyway (and yet had some real
need (i.e. other than cosmetic gratification) to bury the zombie), because:

* AFAIK, it works by injecting an agent LWP into the parent that causes the
  parent to do the waitpid()/waitid() to bury the zombie child.  The agent
  LWP technique (also used by some of the other p* commands, I think)
  strikes me as being _perhaps_ safe with well-behaved programs, but
  likely to make it even less well-behaved otherwise

* if the parent were to later get around to doing the
  wait()/waitpid()/waitid() on its own, it might be confused that the
  child was already gone.

Preap(1) in effect says the latter:

           preap should be applied sparingly and only in situations in
           which the administrator or developer has confirmed that defunct
           processes will not be reaped by the parent process. Otherwise,
           applying preap may damage the parent process in unpredictable ways.

--

 
 
 

What do you do when 'kill -9' doesn't work?

Post by Rev. Don Koo » Mon, 14 Apr 2003 10:38:25


        [...snip...]

Quote:>>>What are the processes?  If they are <defunct> then the only way to
>>>get rid of them is to kill the parent process AFAIK.
>>Not true, Kent.  That's what "preap" is for (but not in SOLARIS 2.6).
> True enough (not until Solaris 9).  But I'd  use "preap" only if
> I were willing to kill the parent eventually anyway (and yet had some real
> need (i.e. other than cosmetic gratification) to bury the zombie), because:

> * AFAIK, it works by injecting an agent LWP into the parent that causes the
>   parent to do the waitpid()/waitid() to bury the zombie child.  The agent
>   LWP technique (also used by some of the other p* commands, I think)
>   strikes me as being _perhaps_ safe with well-behaved programs, but
>   likely to make it even less well-behaved otherwise

> * if the parent were to later get around to doing the
>   wait()/waitpid()/waitid() on its own, it might be confused that the
>   child was already gone.

> Preap(1) in effect says the latter:

>            preap should be applied sparingly and only in situations in
>       which the administrator or developer has confirmed that defunct
>       processes will not be reaped by the parent process. Otherwise,
>       applying preap may damage the parent process in unpredictable ways.

        That's why "reboot" still exists.    :-)

                Hope this helps,
                        Don

--
***************************   Q: How many frenchmen does it take
* Rev. Don McDonald, SCNA *      to defend Paris?
* Baltimore, MD           *   A: No one knows, it's never been tried.
***************************
http://mywebpages.comcast.net/oldno7/TheFrench.mpg
Reluctant Yamaha YZF-R1 Owner