[Samba] smbfs makes other processes hang

Marcus Käll marka128 at student.liu.se
Sun May 26 14:48:02 GMT 2002


Hi!

I have some problem with samba. The problem concerns the smbfs kernel module and smbmount. Smbfs makes other processes "hang". The only thing to do is to reboot the computer, not even "Kill -9" works. 

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.

The problem accours when I use smbmount to mount a share from another computer and that computer goes down. There are two ways this could happen. In the first case, which is the "good" way for this to happen, I mount a share from a computer and after a while this computer stops sharing this device or folder. I will demonstrate with my two computers, the first one is the Linux (giga), from which I try to mount a share on my second computer (giga2), a XP computer. They are connected over a local network with a 100 megabits link. 
The lines that start with '>' are copied directly from the Linux terminal.

> [root at Giga root]# smbmount //giga2/public sambamount
> INFO: Debug class all level = 2   (pid 21930 from pid 21930)
> added interface ip=192.168.0.1 bcast=192.168.0.255 nmask=255.255.255.0
> Password:
> [root at Giga root]# ls sambamount
> Movies     Misc        mp3 music        Videos
> Linux       Texts       Upload
> [root at Giga root]#

I selected the shared directory in my XP computer and chose "Stop share". It says "There is currently one user connected to public. If you stop sharing public they will be disconnected. Do you want to continue?". I press the Yes button. Now I try to "ls" sambamount from my Linux again. 

>[root at Giga root]# ls sambamount
here the program stops for 30 seconds exactly
>ls: sambamount: Input/output error

Except for the 30 seconds delay this is not a problem, because no programs will "hang" (not for more than 30 seconds), and I can unmount the mountpoint without any problem.

In the second case,  which is the bad one, I do the same mount again. Instead of chosing "Stop share" from the windows computer, I simulate a crash that is not uncommon on XP computers... I do this by simply removing the network cabel. Then I try to "ls" the sambamount folder.

>[root at Giga root]# ls sambamount

Here the program hangs for more than 30 seconds, let's say forever, unless I reconnect the network cabel. If the XP computer had really crashed, this would not have been an option.

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.

I wonder if this is a common problem or if its only my computer that is configurated uncorrectly. If this is not a bug, I would be very pleased if you could give me a solution to the problem. 

Thank you for a very good software.

Marcus Käll
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the samba mailing list