[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can timeout prevent process being stuck in D state
From: |
Bernhard Voelker |
Subject: |
Re: Can timeout prevent process being stuck in D state |
Date: |
Mon, 21 Jan 2019 19:30:34 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 1/21/19 10:17 AM, Marc Roos wrote:
> I have had a process stuck in D+ state, and need to run it still a few
> times. If I use timeout, will it prevent this process being stuck in D+
> state until a reboot?
Basically, timeout is sending a signal to the process it has started
after the TIMEOUT time has passed. The default signal is SIGTERM,
but you can pass any other signal number instead.
The point is: if your process doesn't react on receiving a SIGNAL with
a regular 'kill -SIGNAL PID', then there's nothing more timeout could do
about it.
Regarding state 'D+':
$ man ps | grep ' D '
D uninterruptible sleep (usually IO)
So no, that process seems to be stuck in an IO operation.
You may find out with e.g. 'strace -vp PID' and 'lsof -p PID'
what that process is doing.
More on 'D':
- https://support.microfocus.com/kb/doc.php?id=7002725
- https://stackoverflow.com/questions/223644/what-is-an-uninterruptable-process
- use your search engine of choice.
Have a nice day,
Berny