[Samba] smbfs makes other processes hang

Urban Widmark urban at teststation.com
Sun May 26 16:49:02 GMT 2002

On Sun, 26 May 2002, Marcus Käll wrote:

> I use a Linux system with the Redhat 7.2 distribution. It runs on a
> AMD 500 K6-2 processor with a memory of 192MB. The kernel is an
> unmodified 2.4.9-31 from Redhat. I have tried both
> samba-2.2.4-1.i386.rpm from one of your samba mirrors as well as
> 2.2.1a-4 from Redhat 7.2.

You are upgrading the wrong package ... smbfs is in the kernel and the D
state is caused by smbfs not allowing progress.

Go to:

There is a patch on that page for 2.4.4 that may apply to RedHat's 2.4.9
source tree (smbfs-2.4.4-poll.patch).  You will have to reconfigure and
rebuild the kernel.

Or you can get patches for more recent kernels:

The "poll" patch is better tested.

> So what is the difference? I found out that if you choose "Stop share"
> in XP, the socket will be in state CLOSE_WAIT until you try to "ls"
> the mount point, or sometimes TIME_WAIT. If the XP computer crashes
> the socket will be in ESTABLISHED forever. Smbfs will never understand
> that the connection is down and keeps on waiting for a respond from
> the crashed computer.

The difference is that when you get the lockups a process is waiting
forever inside smbfs, and is holding the lock for that mount preventing
anyone else from doing anything.

One cause can be that the process tries to send data on a socket that has
in reality been disconnected. If you wait long enough it will release the 
lock (it's a lot more than 30s).

Other causes can be that something crashed inside the protected region,
check with dmesg that you don't have an oops.


More information about the samba mailing list