[Samba] Re: Regarding killing an application that still has file opened on a smbfs mount.

Urban Widmark urban at teststation.com
Wed Mar 27 11:53:02 GMT 2002


On Wed, 27 Mar 2002, Louis Lam wrote:

> When I do that, I get this message on the console:
> 
> smb_get_length: recv error = 512
> smb_request: result -512 setting invalid

smbfs was trying to read a response and was waiting for the length of the
SMB to be returned. If the server disappears you may end up with a process 
that will sleep for a long time.

This interruption is returned by the network layer as -512 (-ERESTARTSYS).
This event is logged because it is believed to be an error.

> smb_retry: successful, new pid = xxxx, generation=xxx

When there is a network error smbfs closes the tcp socket and signals
smbmount. smbmount is sleeping, when it gets a signal it reconnects to the
server and passes the socket to smbfs.


> I'm using the kernel from redhat 7.1 kernel version 2.4.2(ac).

I think smbfs in the RH7.1 kernel has some stability problems. Any reason
not to use the updated kernel rpm?

> What do these messages mean? Is this the correct behaviour for the smbfs? 

Yes, they are normal when killing the process.


> When this happens the non-root user cannot do much (ls, smbumount etc..).
> But if this mountpoint is mounted by root, then she can just "umount" the 
> mountpoint.

After the successful "retry" the mount should be working again. But for
you it isn't?


> For a non-root user who is doing the mount through smbmount (suid), she can 
> kill the smbmount process that is running in the background. BTW why is it 
> that the smbmount program is running in the background (can see from a ps)?

Killing the smbmount process is bad. It runs as a daemon and reconnects
when asked to. If it disappears smbfs may send it's wakeup signal to some
innocent process (the smbfs-smbmount relationship has a few flaws ...)

/Urban





More information about the samba mailing list