Macs Disconnect from SMB Shares After Automatic Security Updates

Louis Waweru law2175 at
Thu Oct 31 12:18:23 UTC 2019


I believe I have a problem related to updating servers that has crippled
Samba for Mac clients.

I have some Ubuntu Servers running Samba with Winbind. Everything is fine,
but Macs will randomly disconnect overnight, or at some irregular interval.

On the servers, Samba logs this as two events:

1: ../source3/smbd/service.c:1050(close_cnum)
2: closed connection to service data

By matching timestamps on the Macs I can see they log the drops as:

kcm DEPRECATED USE in libdispatch client: Setting timer interval to 0
requests a 1ns timer, did you mean FOREVER (a one-shot timer)?; set a
breakpoint on _dispatch_bug_deprecated to debug

By analyzing timestamps I have determined that this is the only event
logged on the Mac clients' side. Here is an example client that has a shell
script writing to a text file on a share every ten seconds:

You can see the connection was alive at 08:59:46 in the text file on the
left, and in /var/log/system.log there's only a single relevant message.

I asked on the Samba list serve about it and have been told the Macs are
simply closing the connections.

Wireshark analysis shows some additional information:

Errors from above (Line 4):


Here is the final SMB2 message (second from bottom): Negotiate Protocol

As if to confound, there's an NT Status: STATUS_SUCCESS messages in there
(see annotation).

Here is what Microsoft says
the error:

If the Status field in the SMB2 header is STATUS_NETWORK_SESSION_EXPIRED,
the client MUST attempt to reauthenticate the session that is identified by
the SessionId in the SMB2 header, as specified in section If the
reauthentication attempt succeeds, the client MUST retry the request that
failed with STATUS_NETWORK_SESSION_EXPIRED. *If the reauthentication
attempt fails, the client MUST fail the operation and terminate the session*,
as specified in section

Please see more here:

Do you think this is a bug on Ubuntu?

There are a number of servers with identical setups, but the ones that have
gotten recent updates within the past 30 days or so exhibit this behavior
with Mac clients. The ones waiting to be restarted do not.

Many thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ubuntu-server mailing list