From owner-freebsd-stable@FreeBSD.ORG Wed Nov 28 18:30:06 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5168616A477; Wed, 28 Nov 2007 18:30:06 +0000 (UTC) (envelope-from w@wrzask.pl) Received: from mx.oak.pl (mx.oak.pl [217.96.108.251]) by mx1.freebsd.org (Postfix) with ESMTP id F36FE13C45B; Wed, 28 Nov 2007 18:30:03 +0000 (UTC) (envelope-from w@wrzask.pl) Received: by oak.pl (Postfix, from userid 1002) id 0B3721CD1E; Wed, 28 Nov 2007 19:30:02 +0100 (CET) Date: Wed, 28 Nov 2007 19:30:01 +0100 From: Jan Srzednicki To: Julian Elischer Message-ID: <20071128183001.GQ2045@oak.pl> References: <20071127135320.GJ2045@oak.pl> <474DB1D0.3010100@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <474DB1D0.3010100@elischer.org> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-net@freebsd.org, freebsd-stable@freebsd.org Subject: Re: connect() returns EADDRINUSE during massive host->host conn rate X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2007 18:30:06 -0000 On Wed, Nov 28, 2007 at 10:22:08AM -0800, Julian Elischer wrote: > Jan Srzednicki wrote: >> Hello, >> I have a pair of hosts. One of them performs a massive amount of >> TCP connections to the other one, all to the same port. This setup >> mostly works fine, but from time to time (that varies, from once a >> minute to one a half an hour), the connect(2) syscall fails with >> EADDRINUSE. The connection rate tops to 50 connection > > so, what does netstat -aAn show? How can I get any usable information from netstat? It shows a bunch of connections, of course, but since connect(2) failed, I have no idea what local port I was trying to use. And, what I forgot to mention, it's a SMP box, which could matter in case of some race condition. -- Jan Srzednicki :: http://wrzask.pl/ "Remember, remember, the fifth of November" -- V for Vendetta