As manpage of ps states A process with STATUS with the value "D" means "uninterruptible sleep (usually IO)"

Also, I've read: You should use TASK_INTERRUPTIBLE here, otherwise your kernel thread cannot receive signals and you are not able to kill(1) your thread from userspace or use kthread_stop() in the kernel.

If the above is not enough you can read: process status (STAT) of D indicates that the process is in an "uninterruptible sleep" state. In real-world terms, this generally means that it's waiting on I/O and can't/won't do anything - including dying - until that I/O operation completes.

Let's say I run a process that waits IO:

[root@mpinode02 Distros]#  find / -mmin +10 > /dev/null &
[1] 15592

Then I take a look to the status and wchan process

[root@mpinode02 Distros]# ps -C find -ostat,comm,wchan
D    find            sleep_on_buffer

OK, let's see if the process is really uninterrumpible:

[root@mpinode02 Distros]# kill 15592

[1]+  Terminated               time find / -mmin +10 > /dev/null

So, as you can see process with D in the real world was killed, is the man page of ps outdated?

Indeed I see that there is a new kind of state: TASK KILLABLE but I want to know hot to list them. Do you know how to list killable tasks or identify them?

  • Your example is flawed in that a find command is not always in D state. It might be at the instant that you did the PS. If I see a D consistently for a long time in a process it may be due to some error/or hung driver to an external device.
    – mdpc
    Commented Aug 26, 2013 at 0:57
  • What could be the sense of a questions site that one (as you comment it seems) MUST know the answer beforehand? I think what your argument is flawed. Yourself say the same that Dennis Kaarsemaker and the same thing that I've discovered by myself (that a process can be in a D STATE for a little period of time) . Do you feel important voting negatively? Be happy and have a nice day.
    – sebelk
    Commented Aug 26, 2013 at 8:29

1 Answer 1


Welcome to the wonderful world of signals and race conditions.

If you run your ps command a large number of times, you will find that it is occasionally not in D state while you're running the command. While find may spend most of its time waiting for your disk, it definitely doesn't spend all of its time there. And when it's not, your kill signal will be delivered.

So, there is no way to do what you want. ps can iterate over all commands and tell you which ones are killable or not at that time. But when you get to kill, that list will have changed. And even if kill (well, the kernel on behalf of kill) can't deliver a signal immediately, it will do so at the earliest opportunity. So even 'D' state does not mean 'cannot be killed at all', just 'cannot be killed this clock cycle'.

  • Thanks, you'right I've found issuing: watch -n1 -dc 'ps -eo pid,stat,wchan:40,comm |grep D and STATUS of process alternates!
    – sebelk
    Commented Aug 25, 2013 at 18:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .