[Samba] Odd Samba 4 ("4.2.0pre1-GIT-b505111"; actually only using client) behaviour #2 - "accept: Software caused connection abort".

Andrew Bartlett abartlet at samba.org
Wed Aug 28 17:41:15 MDT 2013


On Sun, 2013-08-25 at 18:50 +0100, Tris Mabbs wrote:
>                 Probably should have posted this to "samba-technical" in the
> first place, so re-posting in case anyone has any useful ideas .
> 
>  
> 
> From: Tris Mabbs
> 
> Sent: 12 August 2013 23:08
> To: 'samba at lists.samba.org'
> Subject: Odd Samba 4 ("4.2.0pre1-GIT-b505111"; actually only using client)
> behaviour #2 - "accept: Software caused connection abort".
> 
>  
> 
>                 Good day oh technical ones .
> 
>  
> 
>                 I was running Samba 4 (client only, not using it as a DC so
> effectively running Samba 3 code from the Samba 4 tree) and, other than a
> little "Gotcha!" regarding decoding Kerberos PACs, it was all working
> perfectly.
> 
>                 Then recently I had to upgrade, to "4.2.0pre1-GIT-b505111"
> (I had to upgrade the OS on the server running Samba - 'twas "OpenSolaris"
> and is now "Solaris 11.1") so I recompiled it all up and installed afresh
> (so no ".tdb"s from the previous installation or anything).
> 
>  
> 
>                 But here's a funny thing (#2).  The log file gets absolutely
> ridiculous numbers of messages thus:
> 
>  
> 
> Aug 12 22:45:01 Gateway smbd[16327]: [ID 702911 daemon.error] [2013/08/12
> 22:45:01.731562,  0] ../source3/smbd/server.c:556(smbd_accept_connection)
> 
> Aug 12 22:45:01 Gateway smbd[16327]: [ID 702911 daemon.error]   accept:
> Software caused connection abort
> 
> Aug 12 22:45:03 Gateway smbd[16327]: [ID 702911 daemon.error] [2013/08/12
> 22:45:03.556423,  0] ../source3/smbd/server.c:556(smbd_accept_connection)
> 
> Aug 12 22:45:03 Gateway smbd[16327]: [ID 702911 daemon.error]   accept:
> Software caused connection abort
> 
> Aug 12 22:45:03 Gateway smbd[16327]: [ID 702911 daemon.error] [2013/08/12
> 22:45:03.556688,  0] ../source3/smbd/server.c:556(smbd_accept_connection)
> 
> Aug 12 22:45:03 Gateway smbd[16327]: [ID 702911 daemon.error]   accept:
> Software caused connection abort
> 
>  
> 
>                 And so on.  These will come in spurts; there won't be any
> such messages for several minutes then a whole load will come along all at
> once.  Rather like busses .

> 
>                 I will catch "smbd" in the act at some point though, and
> when I do I'll follow-up with a system call trace to show exactly what is
> happening when this message gets triggered.  It will, of course, be
> something bizarrely Solaris specific (you didn't set the
> "SO_DONT_RANDOMLY_ABORT_CONNECTIONS" socket() option, did you?  Tsk tsk tsk
> .).

I think that's probably the right track :-)

The code here is triggered when poll() indicates that the socket is
reaable.  This socket should only be readable when a new connection is
being made, and accept() should succeed.

In the source4/smbd/process_single.c code equivalent to this, there is
this helpful hint:
	/* accept an incoming connection. */
	status = socket_accept(listen_socket, &connected_socket);
	if (!NT_STATUS_IS_OK(status)) {
		DEBUG(0,("single_accept_connection: accept: %s\n",
nt_errstr(status)));
		/* this looks strange, but is correct. 

		   We can only be here if woken up from select, due to
		   an incoming connection.

		   We need to throttle things until the system clears
		   enough resources to handle this new socket. 

		   If we don't then we will spin filling the log and
		   causing more problems. We don't panic as this is
		   probably a temporary resource constraint */
		sleep(1);
		return;
	}

So, my only conclusion is that your box momentarily does not have the
resources to accept the connection, and because there isn't the sleep()
in the source3 code, it prints this in a loop until the resources become
available. 

Andrew Bartlett
-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Catalyst IT                   http://catalyst.net.nz




More information about the samba mailing list