[PATCH - 1/1] libsmb: Sending smb echo or keepalive request on the cached connection before re-using
rosslagerwall at gmail.com
Fri Mar 13 15:18:10 MDT 2015
On Tue, Feb 03, 2015 at 06:36:02AM +0100, Stefan (metze) Metzmacher wrote:
> Hi Har Gagan Sahai,
> > Thanks for reviewing the patch and providing detailed explanation about it.
> > In libsmbclient with SMBv2 we noticed the session handle reuse was failing with error NT_STATUS_CONNECTION_RESET. This
> > session re-use is happening sometimes in less than one minute of last use. After some readings I found this link
> > http://blogs.msdn.com/b/openspecification/archive/2013/03/27/smb-2-x-and-smb-3-0-timeouts-in-windows.aspx
> and in
> > that the explanation about session expiration timer tells that it is
> about 45 secs.
> There's a kind of cronjob every running every 45 seconds, which loops
> over all existing sessions
> and checks if their expiration time (based on the krb5 ticket lifetime
> e.g. 10 hours) has expired.
> It doesn't mean that connections are disconnected after 45 seconds
> without activity.
> First we need to fully understand your problem. I've asked some questions
> on the bug report https://bugzilla.samba.org/show_bug.cgi?id=11079.
There's a very similar bug report at
https://bugzilla.samba.org/show_bug.cgi?id=10615 with a test program as
This occurs with a default smb.conf from Samba 4.2 against a default
Windows 7 server. I think the timeout for that is either 10 or 20
minutes (you can test it more quickly against a Samba server with a dead
time of 1). Unfortunately this causes problems when using libsmbclient
from GNOME; whenever you don't use the share for a while, the next
operation throws an error. While I could work around this by retrying
ECONNABORTED errors in gvfs, I'd much rather it were fixed at the right
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 213 bytes
Desc: not available
More information about the samba-technical