kill -KILL fails to kill process

Mel fbsd.questions at rachie.is-a-geek.net
Sat Sep 20 14:11:20 UTC 2008


On Saturday 20 September 2008 08:35:53 Wojciech Puchar wrote:
> > 1.  The process hangs in "disk wait" (flag "D" in ps' STAT
> >    column).  This often means there's a hardware problem
> >    with your disk or controller (or a driver bug), or a
> >    network problem if you use NFS.
>
> not this for sure. no NFS, no filesystem is blocked.
>
> > 2.  The process was suspended (SIGSTOP).  In this case
> >    there is the flag "T" in ps' STAT column.  Try sending
> >    a SIGCONT to the process.
>
> tried (kill -19) then kill -9, doesn't help.
>
> >    Such a "dead" entry in the process table is called a
> >    zombie process.  In ps' STAT column there is the "Z"
> >    flag.
>
> no Z flag.
>
>    887  ??  Ts     0:02,20 asterisk -C /centrala/etc/asterisk.conf

Some processes suspend themselves directly on a certain condition, or because 
they try to read from a terminal. Example:

# cat -n test.sh
     1  #!/bin/sh
     2
     3  read LINE;
     4  echo $LINE;
# sh test.sh </dev/tty &
[1] 103
# ps -axo pid,command,stat 103
  PID COMMAND          STAT
  103 sh test.sh       TJ
# kill -CONT 103

[1]+  Stopped                 sh test.sh < /dev/tty

However, this one can be killed:
# kill -KILL 103
[1]+  Killed: 9               sh test.sh < /dev/tty

I'm not entirely sure why, but it could be cause the tty is valid. Anything in 
asterisk that reads from a terminal (maybe a closed stdin?)

-- 
Mel

Problem with today's modular software: they start with the modules
    and never get to the software part.


More information about the freebsd-questions mailing list