From owner-freebsd-bugs@FreeBSD.ORG Fri Sep 1 09:20:27 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 70A4916A4DD for ; Fri, 1 Sep 2006 09:20:27 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0B0643D53 for ; Fri, 1 Sep 2006 09:20:26 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k819KQ0e094172 for ; Fri, 1 Sep 2006 09:20:26 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k819KQBU094171; Fri, 1 Sep 2006 09:20:26 GMT (envelope-from gnats) Resent-Date: Fri, 1 Sep 2006 09:20:26 GMT Resent-Message-Id: <200609010920.k819KQBU094171@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dan Burzynski Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B365016A4DD for ; Fri, 1 Sep 2006 09:19:04 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B1F343D53 for ; Fri, 1 Sep 2006 09:19:04 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k819J4Z6046969 for ; Fri, 1 Sep 2006 09:19:04 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k819J4kR046968; Fri, 1 Sep 2006 09:19:04 GMT (envelope-from nobody) Message-Id: <200609010919.k819J4kR046968@www.freebsd.org> Date: Fri, 1 Sep 2006 09:19:04 GMT From: Dan Burzynski To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: kern/102741: Multiple outbound connect() calls produce 'Network is unreachable' X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Sep 2006 09:20:27 -0000 >Number: 102741 >Category: kern >Synopsis: Multiple outbound connect() calls produce 'Network is unreachable' >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Sep 01 09:20:26 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Dan Burzynski >Release: 6.1 >Organization: Moo >Environment: FreeBSD hendrix.moocards.com 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:42:56 UTC 2006 root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 >Description: When doing multiple (but not nessesarlity concurrent) outbound socket connections (such as using HTTP) we're seeing the error message 'Network is unreachable' after a random amount. It then persists for a while and then we're back to it working for a little while. I've run a tcpdump and it seems that the point at which it complains that the network is unreachable, it's not even tried to make the connection. This problem occurs on two different boxes installed with the same version of BSD (although their hardware is identical): CPU: 2 x PowerEdge 1850 Xeon 3.0Ghz/2MB, 800FSB Memory: 4GB Dual Rank DDR2 Memory (2x2GB) Network: Dual embedded Intel Gigabit3 NICs; single and dual port Intel PRO/1000 MT Gigabit adapters >How-To-Repeat: The following simple Perl script reproduces the problem: #!/usr/bin/perl -w use strict; use IO::Socket; my $remote_host = 'other.server.com'; my $remote_port = '80'; my $times = 300; for (my $i = 0; $i < $times; $i++) { my $socket = new IO::Socket::INET( PeerAddr => $remote_host, PeerPort => $remote_port, Proto => 'tcp', Type => SOCK_STREAM) || die ("Can't connect: $@"); print $socket "HEAD / HTTP/1.1\r\nHost:$remote_host\r\n\r\n"; my $answer = <$socket>; chomp($answer); close($socket); } It'll work a few times and the produce the error: Can't connect: IO::Socket::INET: connect: Network is unreachable at ./stest.pl line 12. Running Apache's 'ab' will also have the same effect, as will running something like portupgrade on something like vim where lots of little patches are required to be downloaded individually. >Fix: >Release-Note: >Audit-Trail: >Unformatted: