From nobody@FreeBSD.org  Fri Sep  1 09:19:04 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id B365016A4DD
	for <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <dan@moo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Multiple outbound connect() calls produce 'Network is unreachable'
X-Send-Pr-Version: www-2.3

>Number:         102741
>Category:       kern
>Synopsis:       [tcp] Multiple outbound connect() calls produce 'Network is unreachable'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    linimon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 01 09:20:26 GMT 2006
>Closed-Date:    Sun Feb 07 03:31:57 UTC 2010
>Last-Modified:  Sun Feb 07 03:31:57 UTC 2010
>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:
Responsible-Changed-From-To: freebsd-bugs->andre 
Responsible-Changed-By: bms 
Responsible-Changed-When: Thu Sep 28 18:51:28 UTC 2006 
Responsible-Changed-Why:  
By request 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102741 

From: Jason Chambers <jchambers@ucla.edu>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/102741: Multiple outbound connect() calls produce 'Network
 is unreachable'
Date: Mon, 12 Jan 2009 12:12:57 -0800

 Hello all,
 
 Wondering if anyone else experiences errors such as "Network is
 unreachable" and the like when using security auditing tools like nmap,
 nessus, etc.
 
 
 As a result of this condition some tools are completely unusable.
 
 It's obviously related in part to the hardware configuration of a device
 however I'm not sure where to look next.  The network controller does
 not seem to make a difference.
 
 Any pointers where to look next ?
 
 
 --Jason

From: Jason Chambers <jchambers@ucla.edu>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/102741: Multiple outbound connect() calls produce 'Network
 is unreachable'
Date: Tue, 13 Jan 2009 15:59:25 -0800

 As a result of this condition some tools are completely unusable.  A
 nessus scan returns all scanned hosts as dead seconds after starting a
 scan.  Nmap is unable to scan a system because it immediately goes into
 a loop of the following:
 
   sendto in send_ip_packet: sendto(4, packet, 44, 0,
    xxx.xxx.xxx.xxx, 16) => Network is unreachable
 
   Offending packet: TCP xxx.xxx.xxx.xxx:55555 > xxx.xxx.xxx.xxx:80
    S ttl=56 id=xxxx iplen=11264  seq=xxxx win=1024 <mss 1460>
 
   Sleeping 15 seconds then retrying
 
   sendto in send_ip_packet: sendto(4, packet, 44, 0,
    xxx.xxx.xxx.xxx, 16) => Network is unreachable
 
   Offending packet: TCP xxx.xxx.xxx.xxx:55555 > xxx.xxx.xxx.xxx:80
    S ttl=56 id=xxxx iplen=11264  seq=xxxx win=1024 <mss 1460>
 
   Sleeping 60 seconds then retrying
 
 
 It's obviously related in part to the hardware configuration of a device
 however I'm not sure where to look next.  The network controller does
 not seem to make a difference.  So far I've not experienced anything
 related to this issue when running Linux on the same hardware.
 

From: Jason Chambers <jchambers@ucla.edu>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/102741: Multiple outbound connect() calls produce 'Network
 is unreachable'
Date: Tue, 13 Jan 2009 16:02:10 -0800

 Please note my email address is _not_ dan@moo.com.
 
 Use jchambers@ucla.edu.
 
 
 I have the described problem on FreeBSD 7.0 and 7.1 versions.
   The servers are Dell PowerEdge SC1435's.  A pciconf -lv is below.
 
 
 pcib1@pci0:0:1:0:	class=0x060400 card=0x00361166 chip=0x00361166
 rev=0x00 hdr=0x01
     vendor     = 'ServerWorks (Was: Reliance Computer Corp)'
     device     = 'HT1000 PCI/PCI-X bridge'
     class      = bridge
     subclass   = PCI-PCI
 hostb0@pci0:0:2:0:	class=0x060000 card=0x02011166 chip=0x02051166
 rev=0x00 hdr=0x00
     vendor     = 'ServerWorks (Was: Reliance Computer Corp)'
     device     = 'HT1000 Legacy South Bridge'
     class      = bridge
     subclass   = HOST-PCI
 atapci1@pci0:0:2:1:	class=0x01018a card=0x01eb1028 chip=0x02141166
 rev=0x00 hdr=0x00
     vendor     = 'ServerWorks (Was: Reliance Computer Corp)'
     device     = 'HT1000 Legacy IDE controller'
     class      = mass storage
     subclass   = ATA
 isab0@pci0:0:2:2:	class=0x060100 card=0x01eb1028 chip=0x02341166
 rev=0x00 hdr=0x00
     vendor     = 'ServerWorks (Was: Reliance Computer Corp)'
     device     = 'HT1000 LPC Bridge'
     class      = bridge
     subclass   = PCI-ISA
 ohci0@pci0:0:3:0:	class=0x0c0310 card=0x01eb1028 chip=0x02231166
 rev=0x01 hdr=0x00
     vendor     = 'ServerWorks (Was: Reliance Computer Corp)'
     device     = '0x0223 USB controller'
     class      = serial bus
     subclass   = USB
 ohci1@pci0:0:3:1:	class=0x0c0310 card=0x01eb1028 chip=0x02231166
 rev=0x01 hdr=0x00
     vendor     = 'ServerWorks (Was: Reliance Computer Corp)'
     device     = '0x0223 USB controller'
     class      = serial bus
     subclass   = USB
 ehci0@pci0:0:3:2:	class=0x0c0320 card=0x01eb1028 chip=0x02231166
 rev=0x01 hdr=0x00
     vendor     = 'ServerWorks (Was: Reliance Computer Corp)'
     device     = '0x0223 USB controller'
     class      = serial bus
     subclass   = USB
 vgapci0@pci0:0:4:0:	class=0x030000 card=0x01eb1028 chip=0x515e1002
 rev=0x02 hdr=0x00
     vendor     = 'ATI Technologies Inc'
     device     = 'Radeon ES1000 Radeon ES1000'
     class      = display
     subclass   = VGA
 pcib3@pci0:0:7:0:	class=0x060400 card=0x00000000 chip=0x01401166
 rev=0xa2 hdr=0x01
     vendor     = 'ServerWorks (Was: Reliance Computer Corp)'
     device     = 'HT2100 PCIe Bridge'
     class      = bridge
     subclass   = PCI-PCI
 pcib4@pci0:0:8:0:	class=0x060400 card=0x00000000 chip=0x01421166
 rev=0xa2 hdr=0x01
     vendor     = 'ServerWorks (Was: Reliance Computer Corp)'
     device     = 'HT2100 PCIe Bridge'
     class      = bridge
     subclass   = PCI-PCI
 pcib5@pci0:0:9:0:	class=0x060400 card=0x00000000 chip=0x01441166
 rev=0xa2 hdr=0x01
     vendor     = 'ServerWorks (Was: Reliance Computer Corp)'
     class      = bridge
     subclass   = PCI-PCI
 pcib6@pci0:0:10:0:	class=0x060400 card=0x00000000 chip=0x01421166
 rev=0xa2 hdr=0x01
     vendor     = 'ServerWorks (Was: Reliance Computer Corp)'
     device     = 'HT2100 PCIe Bridge'
     class      = bridge
     subclass   = PCI-PCI
 pcib7@pci0:0:11:0:	class=0x060400 card=0x00000000 chip=0x01441166
 rev=0xa2 hdr=0x01
     vendor     = 'ServerWorks (Was: Reliance Computer Corp)'
     class      = bridge
     subclass   = PCI-PCI
 hostb1@pci0:0:24:0:	class=0x060000 card=0x00000000 chip=0x12001022
 rev=0x00 hdr=0x00
     vendor     = 'Advanced Micro Devices (AMD)'
     device     = '(Family 10h) Athlon 64/Opteron/Sempron HyperTransport
 Technology Configuration'
     class      = bridge
     subclass   = HOST-PCI
 hostb2@pci0:0:24:1:	class=0x060000 card=0x00000000 chip=0x12011022
 rev=0x00 hdr=0x00
     vendor     = 'Advanced Micro Devices (AMD)'
     device     = '(Family 10h) Athlon 64/Opteron/Sempron Address Map'
     class      = bridge
     subclass   = HOST-PCI
 hostb3@pci0:0:24:2:	class=0x060000 card=0x00000000 chip=0x12021022
 rev=0x00 hdr=0x00
     vendor     = 'Advanced Micro Devices (AMD)'
     device     = '(Family 10h) Athlon 64/Opteron/Sempron DRAM Controller'
     class      = bridge
     subclass   = HOST-PCI
 hostb4@pci0:0:24:3:	class=0x060000 card=0x00000000 chip=0x12031022
 rev=0x00 hdr=0x00
     vendor     = 'Advanced Micro Devices (AMD)'
     device     = '(Family 10h) Athlon 64/Opteron/Sempron Miscellaneous
 Control'
     class      = bridge
     subclass   = HOST-PCI
 hostb5@pci0:0:24:4:	class=0x060000 card=0x00000000 chip=0x12041022
 rev=0x00 hdr=0x00
     vendor     = 'Advanced Micro Devices (AMD)'
     device     = '(Family 10h) Athlon 64/Opteron/Sempron Link Control'
     class      = bridge
     subclass   = HOST-PCI
 hostb6@pci0:0:25:0:	class=0x060000 card=0x00000000 chip=0x12001022
 rev=0x00 hdr=0x00
     vendor     = 'Advanced Micro Devices (AMD)'
     class      = bridge
     subclass   = HOST-PCI
 hostb10@pci0:0:25:4:	class=0x060000 card=0x00000000 chip=0x12041022
 rev=0x00 hdr=0x00
     vendor     = 'Advanced Micro Devices (AMD)'
     device     = '(Family 10h) Athlon 64/Opteron/Sempron Link Control'
     class      = bridge
     subclass   = HOST-PCI
 pcib2@pci0:3:13:0:	class=0x060400 card=0x01041166 chip=0x01041166
 rev=0xc0 hdr=0x01
     vendor     = 'ServerWorks (Was: Reliance Computer Corp)'
     device     = 'HT1000 PCI/PCI-X bridge'
     class      = bridge
     subclass   = PCI-PCI
 atapci0@pci0:3:14:0:	class=0x01018f card=0x01eb1028 chip=0x024b1166
 rev=0x00 hdr=0x00
     vendor     = 'ServerWorks (Was: Reliance Computer Corp)'
     device     = 'BCM5785 (HT1000) PATA/IDE Mode'
     class      = mass storage
     subclass   = ATA
 bge0@pci0:1:0:0:	class=0x020000 card=0x01eb1028 chip=0x165914e4 rev=0x21
 hdr=0x00
     vendor     = 'Broadcom Corporation'
     device     = 'BCM5721 NetXtreme Gigabit Ethernet PCI Express'
     class      = network
     subclass   = ethernet
 bge1@pci0:2:0:0:	class=0x020000 card=0x01eb1028 chip=0x165914e4 rev=0x21
 hdr=0x00
     vendor     = 'Broadcom Corporation'
     device     = 'BCM5721 NetXtreme Gigabit Ethernet PCI Express'
     class      = network
     subclass   = ethernet
 em0@pci0:6:0:0:	class=0x020000 card=0x135e8086 chip=0x105e8086 rev=0x06
 hdr=0x00
     vendor     = 'Intel Corporation'
     device     = 'PRO/1000 PT'
     class      = network
     subclass   = ethernet
 em1@pci0:6:0:1:	class=0x020000 card=0x135e8086 chip=0x105e8086 rev=0x06
 hdr=0x00
     vendor     = 'Intel Corporation'
     device     = 'PRO/1000 PT'
     class      = network
     subclass   = ethernet
 
 

From: Jason Chambers <jason.chambers@earthlink.net>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/102741: Multiple outbound connect() calls produce 'Network is unreachable'
Date: Fri, 16 Jan 2009 05:26:35 +0000

 I can trigger the "Network Unreachable" problem if I start a modest nessus 
 scan ( scanning 20 simultaneous hosts ) and then attempt to ping at the same 
 time.
 
 
 root@box : [9:12pm] : nessus : ping yahoo.com
 PING yahoo.com (206.190.60.37): 56 data bytes
 64 bytes from 206.190.60.37: icmp_seq=0 ttl=48 time=78.459 ms
 64 bytes from 206.190.60.37: icmp_seq=1 ttl=48 time=79.176 ms
 64 bytes from 206.190.60.37: icmp_seq=2 ttl=48 time=78.398 ms
 64 bytes from 206.190.60.37: icmp_seq=3 ttl=48 time=78.990 ms
 64 bytes from 206.190.60.37: icmp_seq=4 ttl=48 time=79.141 ms
 64 bytes from 206.190.60.37: icmp_seq=5 ttl=48 time=79.146 ms
 64 bytes from 206.190.60.37: icmp_seq=6 ttl=48 time=80.261 ms
 64 bytes from 206.190.60.37: icmp_seq=7 ttl=48 time=79.175 ms
 64 bytes from 206.190.60.37: icmp_seq=8 ttl=48 time=79.146 ms
 64 bytes from 206.190.60.37: icmp_seq=9 ttl=48 time=79.145 ms
 64 bytes from 206.190.60.37: icmp_seq=10 ttl=48 time=79.030 ms
 ^C
 --- yahoo.com ping statistics ---
 11 packets transmitted, 11 packets received, 0.0% packet loss
 round-trip min/avg/max/stddev = 78.398/79.097/80.261/0.456 ms
 
 root@box : [9:12pm] : nessus : ping yahoo.com
 ping: cannot resolve yahoo.com: Host name lookup failure
 root@eyen2 : [9:12pm] : nessus : ping yahoo.com
 PING yahoo.com (68.180.206.184): 56 data bytes
 ping: sendto: Network is unreachable
 ping: sendto: Network is unreachable
 ping: sendto: Network is unreachable
 ping: sendto: Network is unreachable
 ^C
 --- yahoo.com ping statistics ---
 4 packets transmitted, 0 packets received, 100.0% packet loss
 
 root@box : [9:12pm] : nessus : ping yahoo.com
 PING yahoo.com (206.190.60.37): 56 data bytes
 ping: sendto: Network is unreachable
 ping: sendto: Network is unreachable
 ^C
 --- yahoo.com ping statistics ---
 2 packets transmitted, 0 packets received, 100.0% packet loss
 
 root@box : [9:12pm] : nessus : ping yahoo.com
 PING yahoo.com (68.180.206.184): 56 data bytes
 64 bytes from 68.180.206.184: icmp_seq=0 ttl=51 time=9.759 ms
 64 bytes from 68.180.206.184: icmp_seq=1 ttl=51 time=9.741 ms
 ^C
 --- yahoo.com ping statistics ---
 2 packets transmitted, 2 packets received, 0.0% packet loss
 round-trip min/avg/max/stddev = 9.741/9.750/9.759/0.009 ms
 

From: Dmitrij Tejblum <tejblum@yandex-team.ru>
To: bug-followup@FreeBSD.org, dan@moo.com
Cc: jchambers@ucla.edu
Subject: Re: kern/102741: [tcp] Multiple outbound connect() calls produce
 'Network is unreachable'
Date: Sat, 24 Jan 2009 18:29:06 +0300

 I think _this_ issue is the same as kern/107807, and thus was fixed.
State-Changed-From-To: open->feedback 
State-Changed-By: rwatson 
State-Changed-When: Tue Feb 3 10:02:29 UTC 2009 
State-Changed-Why:  
Change to feedback state -- Dan, could you confirm whether this issue 
persists with more recent versions of FreeBSD?  This sounds like a 
potential device driver/switch/router issue--the network unreachable 
error occurs when the gateway for a route is unreachable.  Thanks. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=102741 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Feb 7 03:30:48 UTC 2010 
State-Changed-Why:  
Feedback timeout (1 year). 

To submitter: please let us know if this is still a problem and we can 
re-open. 


Responsible-Changed-From-To: andre->linimon 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Feb 7 03:30:48 UTC 2010 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=102741 
>Unformatted:
