From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 18 23:23:26 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D6A7316A4CE for ; Fri, 18 Feb 2005 23:23:26 +0000 (GMT) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 47B7443D6B for ; Fri, 18 Feb 2005 23:23:25 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j1INNHQE006364 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 19 Feb 2005 10:23:21 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j1INNH7l081056; Sat, 19 Feb 2005 10:23:17 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost)j1INNEGv081055; Sat, 19 Feb 2005 10:23:14 +1100 (EST) (envelope-from pjeremy) Date: Sat, 19 Feb 2005 10:23:14 +1100 From: Peter Jeremy To: Deomid Ryabkov Message-ID: <20050218232313.GA80993@cirb503493.alcatel.com.au> References: <4215EB31.8020107@rojer.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4215EB31.8020107@rojer.pp.ru> User-Agent: Mutt/1.4.2i cc: freebsd-hackers@freebsd.org Subject: Re: occasional ECONNREFUSED when connect()ing. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2005 23:23:27 -0000 On Fri, 2005-Feb-18 16:18:41 +0300, Deomid Ryabkov wrote: >I have a strange case of occasional refused connect()'s. >The system is running 4.10-STABLE. ... >The question is - why do connections get refused at all? >I can think of no valid reasons... FWIW, I can't either. The client is single-threaded so it's difficult to see why this should occur. Unfortunately, I don't have ready access to a 4.x system with perl 5.8 but I don't see the problem with FreeBSD 5.3. Is there anything unusual about the system (eg SMP)? Can you reproduce the problem on a different system running FreeBSD? Is there anything reported on the console or syslog'd? Have you tried looking at various netstat output to see if anything looks odd? Have you tried tcpdump'ing lo0 and seeing if you can correlate the failures with something in the TCP/IP packets? Has this worked in the past? If so, can you give an indication of when it last worked and when it failed (as update times or similar). Do you see the same behaviour when the client and server are on different systems (which would point to a problem in lo(4))? If no-one pops up and recognizes these symptoms, you could try building a kernel with 'options TCPDEBUG' and doing setsockopt(...,SO_DEBUG) in the client and/or server processes. This may provide some clues, though it will generate a lot of console output (and you'll probably need to UTSL to understand the output). -- Peter Jeremy