I am trying to kill a du -mh
command that has been stuck running for 18 hours. I have tried many kill signals kill -15
, kill -2
, kill -9
as root but with no luck. Are there any other techniques to kill this process?
Note this is in R
running state, yet it does not appear to be responding to my kill signals.
ps -Z 31806
LABEL PID TTY STAT TIME COMMAND
unconfined 31806 ? RN 1137:41 du
D
, notR
state). In your case: maybe you don't have permission to kill it? Trystrace -e trace=kill kill PID
, and if that shows that the kill() is successful, attach to thedf
process withstrace -p PID
, kill it and see how it's reacting to the signal.strace -e trace=kill kill PID
returns exit code 0, andstrace -p PID
shows attached, but no output followingkill
,kill -9
commandstrace
succeeds because it usesPTRACE_SEIZE
which doesn't stop the process). This may be some kind of kernel bug -- also see this old question.nfs(5)
and read the info on thesoft
andhard
mount options (which control timeout & retry behaviour, effectively giving you a choice between hangs like this or the risk of data corruption). I ask because I've seen hangs on df or du many times over the years when an NFS server doesn't respond to an NFS client.