[wplug] kill QUESTION

Poyner, Brandon bpoyner at ccac.edu
Thu Jun 24 08:58:45 EDT 2004


No process can ignore a kill -9 (SIGKILL), but if the process is in an
uninterruptible sleep the kill signal will not be delivered until the
process wakes up.  A process performing disk i/o, which normally is a
very short term event, is uninterruptible to avoid data errors.  If the
i/o doesn't complete or give up (like when using a nfs 'soft' mount) the
process will never receive the SIGKILL because it's in the queue behind
the i/o request.  You might be able to 'umount -f' the partition, I'm
not sure if Linux permits that on non-nfs mount points but the *BSDs do.
If the partition goes away the kernel should inform the process that the
i/o cannot be completed, it will then wake up and die.

Brandon Poyner
Network Engineer II
CCAC - College Office
412-237-3086


-----Original Message-----
From: Robert E. Coutch [mailto:robert.coutch at verizon.net] 
Sent: Thursday, June 24, 2004 12:12 AM
To: wplug at wplug.org
Subject: Re: [wplug] kill QUESTION


Is there a way to kill an "unkillable" process?

Let's say I have to kill a hanging process no matter what the risk.

Every once in a while a process freezes (sleeps, wait, or whatever you
want to 
call it) and only a reboot gets things back in order.
Sometimes a hard reboot is necessary because the hanging process affects

shutdown.

I had this happen in the past and wondered if there was some other way
besides 
a reboot to kill a process.

-Bob



On Wednesday 23 June 2004 02:34 pm, Poyner, Brandon wrote:
> That sounds like the process is in an uninterruptible sleep, which is
> usually caused by a process waiting on i/o.  You can't use kill to end
> such a process.  If you run a ps and grep on the process, look at the
> stat field.  If the stat is showing a D then it is in an
uninterruptible
> sleep (check the ps man page for other STATs).
>
> USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
> bpoyner  16928  0.0  0.1  4564 1432 pts/0    S    14:02   0:00 -bash
>
> If that's the issue the drive is most likely going bad or is
improperly
> connected.  I'd download the diagnostic tool from the drive
manufacturer
> to be sure.
>
> Brandon Poyner
> Network Engineer II
> CCAC - College Office
> 412-237-3086
>
>
> -----Original Message-----
> From: Logan [mailto:lws118 at psu.edu]
> Sent: Wednesday, June 23, 2004 1:22 PM
> To: wplug at wplug.org
> Subject: [wplug] kill
>
>
> What can I do if "# kill -9 $pid" doesn't work?
> I've been having immense difficulties with a new (to this computer)
hard
> disk.
> The disk is supposed to be just for backups, and is mounted with a
> script, the
> backups run, and then it's unmounted.
>
> It sometimes works ok, but at other times I try stuff like "ls
> /root/backups"
> (where it's mounted) and ls freezes. I can't kill the process, and
> therefore
> can't unmount the drive. It's not just ls either, cp didn't work - and
> it just
> hangs there. Even tab completion freezes up "cat ~/backups/<tab>"
> freezes it.
>
> When I tell the computer to reboot, it doesn't do that either. I get a
> new
> process called "[shutdown] <defunct>" after the "shutdown -r 0 w"
> process.
>
>
> The partition on /dev/hdb1, formated as reiserfs (my root directory
and
> RAID 0
> are both reiserfs too, no problems with them)
> I don't suspect there's anything wrong with the physical drive. It was
> in my
> parent's computer until they upgraded and had always worked fine.
>
>
>
> The Internet treats censorship as a malfunction and routes around it.
> 	John Perry Barlow.
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug

_______________________________________________
wplug mailing list
wplug at wplug.org
http://www.wplug.org/mailman/listinfo/wplug




More information about the wplug mailing list