Subject: bin/11662: traceroute: select: Invalid argument
To: None <gnats-bugs@gnats.netbsd.org>
From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
List: netbsd-bugs
Date: 12/07/2000 11:38:14
>Number:         11662
>Category:       bin
>Synopsis:       traceroute complains about "select: Invalid argument"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 07 11:38:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Wolfgang Rupprecht
>Release:        NetBSD-current Dec 2 2000
>Organization:
W S Rupprecht Computer Consulting, Fremont CA
>Environment:
	
System: NetBSD capsicum.wsrcc.com 1.5L NetBSD 1.5L (WSRCC) #3: Sat Dec 2 14:50:41 PST 2000 wolfgang@capsicum.wsrcc.com:/u/src/netbsd/NetBSD-current/usr/src/sys/arch/i386/compile/WSRCC i386
Architecture: i386
Machine: i386
>Description:
	traceroute complains about "select: Invalid argument"
	I'm not sure whether to file this under "kern" or "bin".

>How-To-Repeat:

	It seems to happen near the end of my traceroutes when
	tracing a route to a machine that is on the other side of a
	routing problem.

	I also have a tcp connection to 207.164.62.34 which is getting
	a continual stream of icmp time exceeded's.  I assume that the
	icmp is causing the kernel to close one of traceroute's
	sockets by mistake, which makes traceroute's select() really
	unhappy.
	
	Shouldn't the icmp be matched up with the protocol/port number
	and only close the socket that generated the error???

    11:27:44.295852 pos8-1-hfr1.den.tlct.net > dsl-64-195-233-37.telocity.com: icmp: time exceeded in-transit
    11:27:44.498086 207.164.62.34.rtcm-sc104 > dsl-64-195-233-37.telocity.com.64469: S 1928052820:1928052820(0) ack 1344134849 win 32120 <mss 1436,nop,nop,timestamp 232285943 141849,nop,wscale 0> (DF)
    11:27:44.498237 dsl-64-195-233-37.telocity.com.64469 > 207.164.62.34.rtcm-sc104: . ack 1 win 17520 <nop,nop,timestamp 141869 232285943> (DF)
    11:27:44.606053 pos8-1-hfr1.den.tlct.net > dsl-64-195-233-37.telocity.com: icmp: time exceeded in-transit
    11:27:44.908526 pos8-1-hfr1.den.tlct.net > dsl-64-195-233-37.telocity.com: icmp: time exceeded in-transit
    11:27:45.212651 pos8-1-hfr1.den.tlct.net > dsl-64-195-233-37.telocity.com: icmp: time exceeded in-transit

    $ traceroute 207.164.62.34
    traceroute to 207.164.62.34 (207.164.62.34), 30 hops max, 40 byte packets
     1  dsl-64-195-233-38.telocity.com (64.195.233.38)  1.330 ms  1.225 ms  1.182 ms
     2  route-64-195-253-1.telocity.com (64.195.253.1)  8.314 ms  8.146 ms  8.099 ms
     3  fe1-2-core1.sjc.tlct.net (216.227.124.65)  8.662 ms  8.791 ms  8.413 ms
     4  fe1-1-border2.sjc.tlct.net (216.227.126.93)  8.812 ms  8.404 ms  8.272 ms
     5  POS6-1.hsa1.sjo1.level3.net (209.245.144.61)  10.249 ms  9.560 ms  9.661 ms
     6  lo0.mp2.SanJose1.level3.net (209.247.8.240)  9.967 ms  10.089 ms  17.220 ms
     7  loop1.hsa1.phx1.Level3.net (209.244.2.63)  28.955 ms  34.029 ms  27.671 ms
     8  * * *
     9  *traceroute: select: Invalid argument
    $ traceroute 207.164.62.34
    traceroute to 207.164.62.34 (207.164.62.34), 30 hops max, 40 byte packets
     1  dsl-64-195-233-38.telocity.com (64.195.233.38)  1.334 ms  1.224 ms  1.168 ms
     2  route-64-195-253-1.telocity.com (64.195.253.1)  8.527 ms  8.160 ms  8.163 ms
     3  fe1-2-core1.sjc.tlct.net (216.227.124.65)  8.619 ms  9.244 ms  8.364 ms
     4  fe1-1-border2.sjc.tlct.net (216.227.126.93)  8.469 ms  8.484 ms  8.286 ms
     5  POS6-1.hsa1.sjo1.level3.net (209.245.144.61)  9.630 ms  10.294 ms  9.672 ms
     6  lo0.mp2.SanJose1.level3.net (209.247.8.240)  10.294 ms  10.256 ms  10.202 ms
     7  loop1.hsa1.phx1.Level3.net (209.244.2.63)  27.929 ms  34.466 ms  27.550 ms
     8  * * *
     9  * * *
    10  * * *
    11  * * 208.30.200.13 (208.30.200.13)  276.000 ms
    12  * * *
    13  * * *
    14  * *traceroute: select: Invalid argument
    $ traceroute 207.164.62.34
    traceroute to 207.164.62.34 (207.164.62.34), 30 hops max, 40 byte packets
     1  dsl-64-195-233-38.telocity.com (64.195.233.38)  1.520 ms  1.256 ms  1.207 ms
     2  route-64-195-253-1.telocity.com (64.195.253.1)  8.517 ms  8.174 ms  8.314 ms
     3  fe1-2-core2.sjc.tlct.net (216.227.124.97)  64.232 ms  8.863 ms  8.610 ms
     4  fe1-0-border2.sjc.tlct.net (216.227.126.85)  8.443 ms  8.322 ms  8.517 ms
     5  POS6-1.hsa1.sjo1.level3.net (209.245.144.61)  10.575 ms  9.628 ms  10.299 ms
     6  lo0.mp2.SanJose1.level3.net (209.247.8.240)  10.216 ms  9.979 ms  10.101 ms
     7  loop1.hsa1.phx1.Level3.net (209.244.2.63)  28.074 ms  27.733 ms  27.699 ms
    traceroute: select: Invalid argument

    (sorry about the line-wrap)  
    The rtcm-sc104/tcp port is different unrelated traffic.

    # tcpdump -i tlp2 host 207.164.62.34
    tcpdump: listening on tlp2
    11:12:11.763122 dsl-64-195-233-37.telocity.com.64497 > 207.164.62.34.rtcm-sc104:
     F 4083960399:4083960399(0) ack 749970613 win 17520 <nop,nop,timestamp 140003 23
    2176984> (DF)
    11:12:22.827939 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33435:  udp
     12 [ttl 1]
    11:12:22.834143 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33436:  udp
     12 [ttl 1]
    11:12:22.835787 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33437:  udp
     12 [ttl 1]
    11:12:22.837529 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33438:  udp
     12
    11:12:22.847502 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33439:  udp
     12
    11:12:22.856080 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33440:  udp
     12
    11:12:22.864934 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33441:  udp
     12
    11:12:22.942207 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33442:  udp
     12
    11:12:22.951481 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33443:  udp
     12
    11:12:22.960675 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33444:  udp
     12
    11:12:22.982034 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33445:  udp
     12
    11:12:22.990757 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33446:  udp
     12
    11:12:22.999840 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33447:  udp
     12
    11:12:23.011811 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33448:  udp
     12
    11:12:23.021836 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33449:  udp
     12
    11:12:23.032713 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33450:  udp
     12
    11:12:23.044366 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33451:  udp
     12
    11:12:23.054799 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33452:  udp
     12
    11:12:23.068479 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33453:  udp
     12
    11:12:23.097965 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33454:  udp
     12
    11:12:23.126156 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33455:  udp
     12
    11:12:23.157803 dsl-64-195-233-37.telocity.com.51545 > 207.164.62.34.33456:  udp
     12
    11:12:31.763350 dsl-64-195-233-37.telocity.com.64490 > 207.164.62.34.rtcm-sc104:
     S 2541006902:2541006902(0) win 16384 <mss 1460,nop,wscale 0,nop,nop,timestamp 1
    40043 0> (DF)
    11:12:42.224916 207.164.62.34.rtcm-sc104 > dsl-64-195-233-37.telocity.com.64678:
     P 1365267624:1365267656(32) ack 2536652829 win 32120 <nop,nop,timestamp 2321957
    19 138113> (DF)
    11:12:42.225040 dsl-64-195-233-37.telocity.com.64678 > 207.164.62.34.rtcm-sc104:
     R 1758314468:1758314468(0) ack 0 win 0
    11:12:43.873793 207.164.62.34.rtcm-sc104 > dsl-64-195-233-37.telocity.com.64497:
     P 4294967272:1(25) ack 0 win 32120 <nop,nop,timestamp 232195884 139689> (DF)
    11:12:43.873938 dsl-64-195-233-37.telocity.com.64497 > 207.164.62.34.rtcm-sc104:
     . ack 1 win 17520 <nop,nop,timestamp 140068 232176984> (DF)
    ^C
    450 packets received by filter
    0 packets dropped by kernel


>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted: