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, notRstate). 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 thedfprocess withstrace -p PID, kill it and see how it's reacting to the signal. – Aug 06 '19 at 11:11strace -e trace=kill kill PIDreturns exit code 0, andstrace -p PIDshows attached, but no output followingkill,kill -9command – StackEng2010 Aug 06 '19 at 11:18kill -TSTP PIDstop it? – Aug 06 '19 at 11:33@mosvykill -TSTP PID` doesn't stop it either. – StackEng2010 Aug 06 '19 at 11:35gdb -p PID? Anyways, please add the output ofps -Z PID(instead of thetopscreenshot, which may not be accessible to some people). Also mention if you're using any kind of virtualization/containerization. – Aug 06 '19 at 11:50gdb -p PIDis "Attaching to process 31806" – StackEng2010 Aug 06 '19 at 11:58stracesucceeds because it usesPTRACE_SEIZEwhich doesn't stop the process). This may be some kind of kernel bug -- also see this old question. – Aug 06 '19 at 12:58nfs(5)and read the info on thesoftandhardmount 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. – cas Aug 06 '19 at 23:38duhang may be related to docker containers hosted on this server. – StackEng2010 Aug 08 '19 at 17:28