Could SIGKILL fail?

I've encountered this piece of behavior where even after issuing SIGKILL using kill -9 the process is not terminating. the command in question here is cat

# ps -ef | grep 19275
root     19275     1  0 08:50 ?        00:00:00 [cat]
root     22964 21578  0 09:05 pts/1    00:00:00 grep --color=auto 19275
# kill -9 19275
# echo $?
0
# ps -ef | grep 19275
root     19275     1  0 08:50 ?        00:00:00 [cat]
# 

some background I've executed this command for ((i=0; i<28; i++)); do cat </dev/zero >${i} & done as part of my test, for some strange reason when I tried to terminate this using

pkill -TERM cat did not work pkill -9 cat did not work kill -9 pid did not work

if memory is restriction here I do believe there is enough memory available here

# free -g
              total        used        free      shared  buff/cache   available
Mem:             23          18           2           0           2           3
Swap:            59           2          56

any hints ? apart from reboot

1 answer

  • answered 2018-10-23 11:29 Sharath Manchala

    I tried your logic it worked for me with kill -9 and even with killall cat, but it take some time to kill all 28 instances