[lug] Killing a process that doesn't want to die
Timothy C. Klein
teece at silverklein.net
Tue May 6 12:28:56 MDT 2003
* rm at fabula.de (rm at fabula.de) wrote:
> On Mon, May 05, 2003 at 01:21:11PM -0600, Warren Sanders wrote:
> > Hugh Brown wrote:
> > >if it has a parent task other than 1, you can try killing the parent
> > >task. otherwise, if it won't respond to kill -9, then you can either
> > >wait it out or reboot.
> >
> > or 'init 1' then 'init 3' to get back to console or 'init 5' to get back
> > to an X login.
>
> Won't work, i'm affraid. Re-'init'ing does nothing more that stop and
> start the right processesby calling the '/etc/init.d' scripts. And those
> will use 'kill' to stop services.
> If a process doesn't respond to a SIGKILL (aka 'kill -9') it's most like-
> ly hanging in kernelspace (_the_ most common reason for this: a process
> is trying to access a resource (disk/net io) that's gone). As long as
> the process is in an uninteruptable part of the kernel code no signal
> will reach it. Reboot, i'm affraid :-/
>
> hth Ralfd
>
I believe this may work once in a blue moon. (The re-init stuff).
Sometimes the program you want to kill is in interruptible sleep, wait
for something from another process (usually a parent). If that process
is gone, you have the zombie. But it may not be gone. If it is still
around, and you re-init, that process may well be killable, and will
thus be killed. In which case the pesky process will go away. Of
course, just killing the process that is holding up your pesky process
would work, too, but it is not always obvious which one that might be.
Thus, the re-init is a nice last ditch effort *before* you reboot. You
may very well have to reboot, but you can give the re-init a try. You
have a the outside chance of saving you glorious uptime numbers :->
Tim
> > --
> > Warren Sanders
> > http://MontanaLinux.Org
> >
> >
> > _______________________________________________
> > Web Page: http://lug.boulder.co.us
> > Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> > Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
--
==============================================
== Timothy Klein || teece at silverklein.net ==
== http://i148.denver.dsl.forethought.net ==
== ---------------------------------------- ==
== "Hello, World" 17 Errors, 31 Warnings... ==
==============================================
More information about the LUG
mailing list