Windows client disconnect identification

Yuval Hager yuval at disksites.com
Sat Mar 1 20:54:40 GMT 2003


Hi,

The scenario I am testing is this:

- Open an MS word file from windows client A
- Disconnect the network cable from that windows client (emulate client
failure)
- Try to open the file from windows client B - file is locked.
- Wait a few minutes (see below - the exact time is the issue here)
- Try to open the file from windows client B - file is opened RW.

I am wondering what sets the time that it will take for samba to find
out that the first client is gone.

At first, I tried to use the "deadtime" variable - but it is only valid
when there are no open files (by the way, why?).

Then I tried to set various timeouts in the TCP socket definition
(socket options, various sysctl values), nothing worked.

The lock release time is incosistent, and goes between 10 to over 20
minutes. I am wondering how can I shorten this timeout..

Here a transcript from the log, this time shows a 23 minutes timeout:

[2003/02/28 18:22:42, 0] locking/posix.c:posix_fcntl_lock(662)
  on 32 bit NFS mounted file systems.
[2003/02/28 18:46:05, 0] lib/util_sock.c:read_socket_data(431)
  read_socket_data: recv failure for 4. Error = No route to host

Pay attention that the error came from read() and not from select(). How
can read timeout be controlled? Why does receive_message_or_smb() calls
receive_smb() without any timeout?

I am using samba-3.0-alpha20 on a Linux 2.4.18 machine, and windows 2k
clients.

Thanks,

--yuval



More information about the samba-technical mailing list