From root@uni-bielefeld.de  Tue Apr 29 07:30:51 2003
Return-Path: <root@uni-bielefeld.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0EBE537B401
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Apr 2003 07:30:51 -0700 (PDT)
Received: from mail.uni-bielefeld.de (mail2.uni-bielefeld.de [129.70.4.90])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6E3E943FA3
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Apr 2003 07:30:49 -0700 (PDT)
	(envelope-from root@uni-bielefeld.de)
Received: from vscan2.hrz.uni-bielefeld.de
 (vscan2.hrz.uni-bielefeld.de [129.70.4.45])
 by mail.uni-bielefeld.de (Sun Internet Mail Server
 sims.4.0.2000.10.12.16.25.p8)
 with ESMTP id <0HE400H2S0ANP4@mail.uni-bielefeld.de> for
 FreeBSD-gnats-submit@freebsd.org; Tue, 29 Apr 2003 16:30:23 +0200 (MET DST)
Received: from vscan2.hrz.uni-bielefeld.de
 (localhost.hrz.uni-bielefeld.de [127.0.0.1])	by vscan2.hrz.uni-bielefeld.de
 (8.12.8p1/8.12.3) with ESMTP id h3TEUMs6012620; Tue, 29 Apr 2003 16:30:22 +0200
Received: (from root@localhost)	by vscan2.hrz.uni-bielefeld.de
 (8.12.8p1/8.12.8/Submit) id h3TEUMJY012619; Tue,
 29 Apr 2003 16:30:22 +0200 (CEST)
Message-Id: <200304291430.h3TEUMJY012619@vscan2.hrz.uni-bielefeld.de>
Date: Tue, 29 Apr 2003 16:30:22 +0200 (CEST)
From: lars.koeller@uni-bielefeld.de
Reply-To: lars.koeller@uni-bielefeld.de
To: FreeBSD-gnats-submit@freebsd.org
Cc: lars@koellers.net
Subject: rsh/rshd connect problem (select: protocol failure in circuit setup)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         51586
>Category:       bin
>Synopsis:       rsh/rshd connect problem (select: protocol failure in circuit setup)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 29 07:40:18 PDT 2003
>Closed-Date:    Thu May 22 23:25:04 PDT 2003
>Last-Modified:  Thu May 22 23:25:04 PDT 2003
>Originator:     Lars Kller
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
Computing Center, University of Bielefeld, Germany
>Environment:
System: FreeBSD vscan2.hrz.uni-bielefeld.de 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Fri Apr 11 12:16:31 CEST 2003 root@vscan2.hrz.uni-bielefeld.de:/usr/src/sys/compile/VSCAN i386


>Description:

- The setup is: machine1 (FreeBSD or Solaris 8) connects to maschine2 (FreeBSD)
  via rsh.

  On machine1:
  while true; do 
      /usr/bin/rsh maschine2 -l vscan pwd; ret=$?
      if [ "$ret" != "0" ]; then 
          echo "Return Code: $ret
	  break
      fi
  done

- On the comman line one sees:

  /usr/home/vscan
  ..........    (repeats several hundred times)
  ..........    
  /usr/home/vscan (hangs, and after 120 seconds)  
  select: protocol failure in circuit setup

  The rshd logs:  Apr 29 16:04:17 vscan2 rshd[2308]: connect second port 623: Operation timed out

- inetd is running as:
  
  /usr/sbin/inetd -w -W -l -C 256 -c 64 -s 64 -R 0

  I tried to start it without -w -W, but this didn't change anything!

- inetd.conf for rsh:

  shell   stream  tcp     nowait/0/0/0 root       /usr/libexec/rshd       rshd

- To avoid a TIME_WAIT blocking of the ip:port quadruple for the connection,
  which was our first guess, I set on both machines (FreeBSD)

  sysctl -w net.inet.tcp.msl=300

  After this you cant see ant TIME_WAIT backlog with netstat -a

  (I need a high rsh connection rate, cause it should be used in a farm setup
   for mail virus scanning).

- /etc/hosts.allow

  rshd: machine1        : allow

- ipfw:

73869 : ipfw -ta show 
00100  1450976  204275072 Tue Apr 29 16:23:59 2003 allow ip from any to any via lo0
00200        0          0                          deny ip from any to 127.0.0.0/8
00300        0          0                          deny ip from 127.0.0.0/8 to any
65000 16410061 6975271579 Tue Apr 29 16:23:59 2003 allow ip from any to any
65535        0          0                          allow ip from any to any


- When I do the same on machine2 with 

  .....
  /usr/bin/rsh localhost -l vscan pwd ......
  .....

  instead of machine2 (see while loop above) all seems to work properly!
  It runs and runs and runs


>How-To-Repeat:

  See the above setup/description

>Fix:

  Don't know, but I need one very fast.

Any ideas???

-- 
E-Mail: Lars.Koeller@Uni-Bielefeld.DE        \  Lars Kller
            lkoeller@FreeBSD.org              \  CC University of
PGP: http://www.uk.pgp.net/pgpnet/wwwkeys.html \  Bielefeld, Germany 
     Key-ID: A430D499                           \  Tel: +49 521 106 4964
----------- FreeBSD, what else? ---- http://www.freebsd.org -------------
>Release-Note:
>Audit-Trail:

From: Lars =?iso-8859-1?Q?K=F6ller?= <Lars.Koeller@uni-bielefeld.de>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
Cc: lars.koeller@uni-bielefeld.de, lars+freebsd@koellers.net
Subject: Re: bin/51586: rsh/rshd connect problem (select: protocol failure in
 circuit setup)
Date: Wed, 30 Apr 2003 10:00:50 +0200

 ----------
 
 Hi,
 
 here is a followup with a ethereal trace of the last hanging rsh =
 
 connect:
 
     361 09:07:19.416551 machine1 machine2 TCP      878 > shell [SYN] Seq=3D=
 3590687527 Ack=3D0 Win=3D57344 Len=3D0
     362 09:07:19.416724 machine2 machine1 TCP      shell > 878 [SYN, ACK]=
  Seq=3D2380690620 Ack=3D3590687528 Win=3D57344 Len=3D0
     363 09:07:19.416756 machine1 machine2 TCP      878 > shell [ACK] Seq=3D=
 3590687528 Ack=3D2380690621 Win=3D57920 Len=3D0
     364 09:07:19.416796 machine1 machine2 RSH      877\000
     365 09:07:19.420841 machine2 machine1 TCP      623 > 877 [SYN] Seq=3D=
 292382242 Ack=3D0 Win=3D57344 Len=3D0
     366 09:07:19.420865 machine1 machine2 TCP      877 > 623 [SYN, ACK] S=
 eq=3D2039972049 Ack=3D292382243 Win=3D57344 Len=3D0
     367 09:07:19.517035 machine2 machine1 TCP      shell > 878 [ACK] Seq=3D=
 2380690621 Ack=3D3590687532 Win=3D57920 Len=3D0
     368 09:07:22.415686 machine1 machine2 TCP      877 > 623 [SYN, ACK] S=
 eq=3D2039972049 Ack=3D292382243 Win=3D57344 Len=3D0
     369 09:07:22.417096 machine2 machine1 TCP      623 > 877 [SYN] Seq=3D=
 292382242 Ack=3D0 Win=3D57344 Len=3D0
     370 09:07:22.417118 machine1 machine2 TCP      877 > 623 [SYN, ACK] S=
 eq=3D2039972049 Ack=3D292382243 Win=3D57344 Len=3D0
     371 09:07:25.617105 machine2 machine1 TCP      623 > 877 [SYN] Seq=3D=
 292382242 Ack=3D0 Win=3D57344 Len=3D0
     372 09:07:25.617130 machine1 machine2 TCP      877 > 623 [SYN, ACK] S=
 eq=3D2039972049 Ack=3D292382243 Win=3D57344 Len=3D0
     373 09:07:28.817114 machine2 machine1 TCP      623 > 877 [SYN] Seq=3D=
 292382242 Ack=3D0 Win=3D57344 Len=3D0
     374 09:07:28.817133 machine1 machine2 TCP      877 > 623 [SYN, ACK] S=
 eq=3D2039972049 Ack=3D292382243 Win=3D57344 Len=3D0
     375 09:07:32.017124 machine2 machine1 TCP      623 > 877 [SYN] Seq=3D=
 292382242 Ack=3D0 Win=3D57344 Len=3D0
     376 09:07:32.017147 machine1 machine2 TCP      877 > 623 [SYN, ACK] S=
 eq=3D2039972049 Ack=3D292382243 Win=3D57344 Len=3D0
     377 09:07:35.217258 machine2 machine1 TCP      623 > 877 [SYN] Seq=3D=
 292382242 Ack=3D0 Win=3D57344 Len=3D0
     378 09:07:35.217278 machine1 machine2 TCP      877 > 623 [SYN, ACK] S=
 eq=3D2039972049 Ack=3D292382243 Win=3D57344 Len=3D0
     379 09:07:41.215755 machine1 machine2 TCP      877 > 623 [SYN, ACK] S=
 eq=3D2039972049 Ack=3D292382243 Win=3D57344 Len=3D0
     380 09:07:41.417270 machine2 machine1 TCP      623 > 877 [SYN] Seq=3D=
 292382242 Ack=3D0 Win=3D57344 Len=3D0
     381 09:07:41.417288 machine1 machine2 TCP      877 > 623 [SYN, ACK] S=
 eq=3D2039972049 Ack=3D292382243 Win=3D57344 Len=3D0
     382 09:07:53.415814 machine1 machine2 TCP      877 > 623 [SYN, ACK] S=
 eq=3D2039972049 Ack=3D292382243 Win=3D57344 Len=3D0
     383 09:07:53.617408 machine2 machine1 TCP      623 > 877 [SYN] Seq=3D=
 292382242 Ack=3D0 Win=3D57344 Len=3D0
     384 09:07:53.617428 machine1 machine2 TCP      877 > 623 [SYN, ACK] S=
 eq=3D2039972049 Ack=3D292382243 Win=3D57344 Len=3D0
     385 09:08:17.817676 machine2 machine1 TCP      623 > 877 [SYN] Seq=3D=
 292382242 Ack=3D0 Win=3D57344 Len=3D0
     386 09:08:17.817731 machine1 machine2 TCP      877 > 623 [SYN, ACK] S=
 eq=3D593155178 Ack=3D292382243 Win=3D57344 Len=3D0
     387 09:08:20.815901 machine1 machine2 TCP      877 > 623 [SYN, ACK] S=
 eq=3D593155178 Ack=3D292382243 Win=3D57344 Len=3D0
     388 09:08:26.815924 machine1 machine2 TCP      877 > 623 [SYN, ACK] S=
 eq=3D593155178 Ack=3D292382243 Win=3D57344 Len=3D0
     389 09:08:34.418248 machine2 machine1 TCP      shell > 878 [FIN, ACK]=
  Seq=3D2380690621 Ack=3D3590687532 Win=3D57920 Len=3D0
     390 09:08:34.418271 machine1 machine2 TCP      878 > shell [ACK] Seq=3D=
 3590687532 Ack=3D2380690622 Win=3D57920 Len=3D0
     391 09:08:34.418585 machine1 machine2 TCP      878 > shell [FIN, ACK]=
  Seq=3D3590687532 Ack=3D2380690622 Win=3D57920 Len=3D0
     392 09:08:34.418751 machine2 machine1 TCP      shell > 878 [ACK] Seq=3D=
 2380690622 Ack=3D3590687533 Win=3D57920 Len=3D0
 
 Best regards
 
 L. K=F6ller
 
 -- =
 
 E-Mail: Lars.Koeller@Uni-Bielefeld.DE        \  Lars K=F6ller
             lkoeller@FreeBSD.org              \  CC University of
 PGP: http://www.uk.pgp.net/pgpnet/wwwkeys.html \  Bielefeld, Germany =
 
      Key-ID: A430D499                           \  Tel: +49 521 106 4964
 ----------- FreeBSD, what else? ---- http://www.freebsd.org -------------=
 
 
 

From: Lars =?iso-8859-1?Q?K=F6ller?= <Lars.Koeller@uni-bielefeld.de>
To: freebsd-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
Cc: lars.koeller@uni-bielefeld.de, lars+freebsd@koellers.net
Subject: Re: bin/51586: rsh/rshd connect problem (select: protocol failure in
 circuit setup)
Date: Tue, 06 May 2003 09:01:37 +0200

 --------
 
 Hi,
 
 this bug seems to be a serious one perhaps TCP/kernel based.
 
 The same setup (even manipulating tcp_time_wait_interval on solaris) =
 
 between two Solaris machines runes very well!
 
 The Solaris rshd machine which is connected from the FreeBSD rsh Client
 reports:
 
   rsh[22477]: [ID 632004 daemon.info] connect second port: Connection tim=
 ed out
 
 Please, again, can someone have a look at it???
 
 It's really important for us!
 
 Thanks
 
 Lars
 
 -- =
 
 E-Mail: Lars.Koeller@Uni-Bielefeld.DE        \  Lars K=F6ller
             lkoeller@FreeBSD.org              \  CC University of
 PGP: http://www.uk.pgp.net/pgpnet/wwwkeys.html \  Bielefeld, Germany =
 
      Key-ID: A430D499                           \  Tel: +49 521 106 4964
 ----------- FreeBSD, what else? ---- http://www.freebsd.org -------------=
 
 
 

From: Lars =?iso-8859-1?Q?K=F6ller?= <Lars.Koeller@uni-bielefeld.de>
To: freebsd-gnats-submit@FreeBSD.org
Cc: Lars.Koeller@uni-bielefeld.de, ianf@za.uu.net, silby@silby.com,
	Jeffrey Hsu <hsu@FreeBSD.org>,
	mark tinguely <tinguely@web.cs.ndsu.nodak.edu>
Subject: Re: bin/51586: rsh/rshd connect problem (select: protocol failure in
 circuit setup)
Date: Tue, 13 May 2003 09:07:02 +0200

 --------
 
 Hello,
 
 as extensive test have shown, the problem didn't occur with the second =
 
 intel LAN interface on the board. The fxp driver works well without any =
 
 problems.
 
 You can easily verift that there is a problem when telnet-ing to the =
 
 questionable machine:
 
 
 75361 : telnet vscan1 622
 Trying 129.70.4.44...
 telnet: connect to address 129.70.4.44: Connection refused
 telnet: Unable to connect to remote host
 
 
 75362 : telnet vscan1 623
 Trying 129.70.4.44...
 
 -- Hanging --
 
 
 75363 : telnet vscan1 624
 Trying 129.70.4.44...
 telnet: connect to address 129.70.4.44: Connection refused
 
 
 It is clear, thar on these ports NO SERVICE IS enabled!
 
 
 So it seems the problem is located in the em driver or firmware or board =
 
 which is a =
 
 
 MSI: MS-9129
 
 An update to the newest driver provided by intel didn't change anything:
 
 em0: <Intel(R) PRO/1000 Network Connection, Version - 1.5.31> port 0xc000=
 -0xc03f mem 0xe2000000-0xe201ffff irq 10 at device 5.0 on pci2
 em0:  Speed:100 Mbps  Duplex:Full
 
 irq 10 is used exclusivly.
 
 Even the em driver was used in 100MBit full duplex on the same =
 
 switchport as the fxp0 LAN port.
 
 If I can find some time I will try to upgrade the firmware/BIOS.
 
 Best regards
 
 Lars
 
 -- =
 
 E-Mail: Lars.Koeller@Uni-Bielefeld.DE        \  Lars K=F6ller
             lkoeller@FreeBSD.org              \  CC University of
 PGP: http://www.uk.pgp.net/pgpnet/wwwkeys.html \  Bielefeld, Germany =
 
      Key-ID: A430D499                           \  Tel: +49 521 106 4964
 ----------- FreeBSD, what else? ---- http://www.freebsd.org -------------=
 
 
 

From: Lars =?iso-8859-1?Q?K=F6ller?= <Lars.Koeller@uni-bielefeld.de>
To: freebsd-gnats-submit@FreeBSD.org
Cc: Lars.Koeller@uni-bielefeld.de, ianf@za.uu.net, silby@silby.com,
	Jeffrey Hsu <hsu@FreeBSD.org>,
	mark tinguely <tinguely@web.cs.ndsu.nodak.edu>
Subject: Re: bin/51586: rsh/rshd connect problem (select: protocol failure in
 circuit setup)
Date: Wed, 14 May 2003 09:08:05 +0200

 --------
 
 Hi,
 
 I can't find any firmware or PXE Software for the Board, even on intel =
 
 nor MSI site.
 
 So I'm not able to solve the problem with the em-Interface on this =
 
 board.
 
 It's hard to belive it is the Cisco switch port, cause the same port =
 
 with the same 100 MBit full duplex works with the fxp driver/chip of =
 
 the second interface very well.
 
 However it is even hard to belive, that the 82540 intel chip on the =
 
 board is working incorrect on all 7 boards.
 
 So perhaps it is the em-driver?
 
 Any ideas?
 
 Best regards
 
 Lars
 
 -- =
 
 E-Mail: Lars.Koeller@Uni-Bielefeld.DE        \  Lars K=F6ller
             lkoeller@FreeBSD.org              \  CC University of
 PGP: http://www.uk.pgp.net/pgpnet/wwwkeys.html \  Bielefeld, Germany =
 
      Key-ID: A430D499                           \  Tel: +49 521 106 4964
 ----------- FreeBSD, what else? ---- http://www.freebsd.org -------------=
 
 
 

From: Mike Silbersack <silby@silby.com>
To: Lars =?iso-8859-1?Q?K=F6ller?= <Lars.Koeller@uni-bielefeld.de>
Cc: freebsd-gnats-submit@FreeBSD.org, ianf@za.uu.net,
	Jeffrey Hsu <hsu@FreeBSD.org>,
	mark tinguely <tinguely@web.cs.ndsu.nodak.edu>
Subject: Re: bin/51586: rsh/rshd connect problem (select: protocol failure 
   in circuit setup)
Date: Wed, 14 May 2003 10:40:47 -0500 (CDT)

 On Wed, 14 May 2003, Lars [iso-8859-1] K=F6ller wrote:
 
 > Hi,
 >
 > I can't find any firmware or PXE Software for the Board, even on intel
 > nor MSI site.
 >
 > So I'm not able to solve the problem with the em-Interface on this
 > board.
 >
 > So perhaps it is the em-driver?
 >
 > Any ideas?
 >
 > Best regards
 >
 > Lars
 
 Try e-mailing Prafulla Deuskar <pdeuskar@FreeBSD.org>; he's an Intel
 employee, and he's responsible for the em driver.  Hopefully he'll be able
 to help you with the problem.
 
 Good luck,
 
 Mike "Silby" Silbersack
State-Changed-From-To: open->closed 
State-Changed-By: silby 
State-Changed-When: Thu May 22 23:24:18 PDT 2003 
State-Changed-Why:  
This bug turns out to be related to the em driver somehow, 
not rsh / rshd.  So, I'm closing it.  Lars, you're welcome 
to open a new PR with updated info on the problem. 

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