LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: How to diagnose a process stuck in D state?
@ 2008-02-23 13:37 Daniel J Blueman
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel J Blueman @ 2008-02-23 13:37 UTC (permalink / raw)
  To: Stephen Oberholtzer; +Cc: Linux Kernel

Stephen,

On 22 Feb, 23:10, "Stephen Oberholtzer" <oliverklozoff@gmail.com> wrote:
> First off: I'm not subscribed to the list (I don't think I could
> handle the volume), so please make sure you CC me if you reply.
>
> I run an application on one of my machines; it often hangs, with the
> process stuck D state.  When this happens, the process sticks around
> until I reboot the machine.
>
> I have tried the following to start diagnosing the problem:
>
> * Running 'ps -axl' shows "-" in the wchan column.
> * The contents of /proc/pid/wchan say "_stext".
> * 'strace -p pid' says "Process pid attached - interrupt to quit" and
> stops responding.  Sending SIGINT and SIGTERM have no effect on the
> strace process, although kill -11 (SIGSEGV, my personal favorite) does
> work.
>
> This is very confusing.  I would greatly appreciate it if someone
> could tell me how a process can enter D state without being in a
> syscall, and what I can do to start tracking down the cause.

wchan shows where the process is sleeping - probably a kernel mutex or
lock here. This doesn't help much, but the stack signature will.

Enable and use the sys-request mechanism (via terminal, keyboard or
serial) eg sysrq-T to dump the stack frames of all processes,
including this.

Unsurprisingly, it's documented in the kernel Documentation directory.

> (By the way: This is on amd64, 2.6.23. I'm updating to 2.6.24.2 right
> now, on the off chance that whatever was causing the problem has been
> fixed.)

Daniel
-- 
Daniel J Blueman

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to diagnose a process stuck in D state?
  2008-02-22 23:08 Stephen Oberholtzer
@ 2008-02-23  0:31 ` Lee Revell
  0 siblings, 0 replies; 3+ messages in thread
From: Lee Revell @ 2008-02-23  0:31 UTC (permalink / raw)
  To: Stephen Oberholtzer; +Cc: linux-kernel

On Fri, Feb 22, 2008 at 6:08 PM, Stephen Oberholtzer
<oliverklozoff@gmail.com> wrote:
> First off: I'm not subscribed to the list (I don't think I could
>  handle the volume), so please make sure you CC me if you reply.
>
>  I run an application on one of my machines; it often hangs, with the
>  process stuck D state.  When this happens, the process sticks around
>  until I reboot the machine.
>

Run "dmesg".  Often when this happens you'll find that the kernel has Oopsed.

Lee

^ permalink raw reply	[flat|nested] 3+ messages in thread

* How to diagnose a process stuck in D state?
@ 2008-02-22 23:08 Stephen Oberholtzer
  2008-02-23  0:31 ` Lee Revell
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Oberholtzer @ 2008-02-22 23:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: oliverklozoff

First off: I'm not subscribed to the list (I don't think I could
handle the volume), so please make sure you CC me if you reply.

I run an application on one of my machines; it often hangs, with the
process stuck D state.  When this happens, the process sticks around
until I reboot the machine.

I have tried the following to start diagnosing the problem:

* Running 'ps -axl' shows "-" in the wchan column.
* The contents of /proc/pid/wchan say "_stext".
* 'strace -p pid' says "Process pid attached - interrupt to quit" and
stops responding.  Sending SIGINT and SIGTERM have no effect on the
strace process, although kill -11 (SIGSEGV, my personal favorite) does
work.

This is very confusing.  I would greatly appreciate it if someone
could tell me how a process can enter D state without being in a
syscall, and what I can do to start tracking down the cause.

(By the way: This is on amd64, 2.6.23. I'm updating to 2.6.24.2 right
now, on the off chance that whatever was causing the problem has been
fixed.)

-- 
-- Stevie-O
Real programmers use COPY CON PROGRAM.EXE

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-23 13:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-23 13:37 How to diagnose a process stuck in D state? Daniel J Blueman
  -- strict thread matches above, loose matches on Subject: below --
2008-02-22 23:08 Stephen Oberholtzer
2008-02-23  0:31 ` Lee Revell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).