[Samba] Many "smbd" process with "D" uninterruptible sleep status

Jeff Layton jlayton at samba.org
Thu Oct 17 07:46:03 MDT 2013


On Thu, 17 Oct 2013 10:02:49 +0200
Volker Lendecke <Volker.Lendecke at SerNet.DE> wrote:

> On Thu, Oct 17, 2013 at 03:06:22PM +0800, Simon Wang wrote:
> > I got a samba server(Linux) to store some data in my PC(windows)
> > frequently.  And last night I found that samba can't work. After logined to
> > samba server and found that there's 91 smbd processes with status "D"
> > totally.
> > # ps
> >     169 root         0        SW   [pdflush]
> >     170 root         0        DW   [pdflush]
> > ....
> > 29534 simon  20608 D    /sbin/smbd -D
> > 29548 root       2792 D    /bin/sync
> > 30160 simon  20608 D    /sbin/smbd -D
> > 30474 simon  20608 D    /sbin/smbd -D
> > 30496 simon  18676 D    /sbin/smbd -D
> > 30673 simon  20504 D    /sbin/smbd -D
> > 30810 simon  20504 D    /sbin/smbd -D
> > 31302 simon  20608 D    /sbin/smbd -D
> > 31965 simon  20608 D    /sbin/smbd -D
> > 32288 simon  20608 D    /sbin/smbd -D
> > ...
> > And after 5 mins the result of "ps" is the same.
> > 
> > The result of "top" shows below. The load average is VERY HIGHT and CPU is
> > busy for io.
> 
> Long-running D is almost always a kernel problem. D means
> uninterruptible wait. smbd made some syscall that does not
> return for a long time. With a working kernel no user space
> process should be able to do that. Look at your syslog
> (/var/log/messages or /var/log/syslog or such) for kernel
> problems. Something else might be extremely slow storage
> like a USB1 memory stick. It should eventually come back,
> but this could look the same.
> 
> Volker
> 

It's not necessarily a kernel "problem" per-se, but you're correct that
that indicates that the process is stuck in uninterruptible sleep in
the kernel.

Another thing you can do to troubleshoot this is to see what the
processes are doing with:

    # cat /proc/<pid>/stack

That'll give you a kernel stack trace for the process in question,
which may give you some hint as to what they're hanging on.

-- 
Jeff Layton <jlayton at samba.org>


More information about the samba mailing list