From nobody@FreeBSD.org  Mon Jun  4 14:54:40 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 1F6E737B403
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  4 Jun 2001 14:54:40 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.3/8.11.3) id f54Lse016936;
	Mon, 4 Jun 2001 14:54:40 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200106042154.f54Lse016936@freefall.freebsd.org>
Date: Mon, 4 Jun 2001 14:54:40 -0700 (PDT)
From: proett@pbspro.com
To: freebsd-gnats-submit@FreeBSD.org
Subject: select fails to return incoming connect
X-Send-Pr-Version: www-1.0

>Number:         27880
>Category:       misc
>Synopsis:       select fails to return incoming connect
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 04 15:00:13 PDT 2001
>Closed-Date:    Thu Jan 17 08:12:05 PST 2002
>Last-Modified:  Thu Jan 17 08:43:02 PST 2002
>Originator:     Tom Proett
>Release:        4.3-STABLE
>Organization:
Veridian Systems
>Environment:
FreeBSD mongo.pbspro.com 4.3-STABLE FreeBSD 4.3-STABLE #3: Thu May 10 16:27:47 PDT 2001     proett@mongo.pbspro.com:/usr/src/sys/compile/BONGO  i386

>Description:
A program sets up a socket to listen to and waits for incoming
connections in select.  A second program calls connect which is
fairly often not detected.
>How-To-Repeat:
Run these two programs on the same 4.3 machine.

begin 644 two.tgz
M'XL(`"<"'#L``^U7?T_C1A#E7_M3#*E([5,`._Q2+U`I*CDU*@VG!*[J<2?+
MV!MB7;*.O&LHK?CNG=FUDS@$N-,=M%7WG<YV9F??SHQGUP^11I\2OA6M/2-\
MS]O?W84U`/]@SZ<[PBON`#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T'_-`])\6O]Y!]X^Z;^]7:/_7@3?1/_ACN;I"NWW[Y6$7RX!_TN";L(F^#ET
MRL^2MRQTOH7&FFF][MNWIWW\*G0&G?Z[SC%L:BU947SPA.2SK9M1,F9?)]I4
M+54KTAM24K7;0\WJ0KT.2P.]T[/VNW;WQ%WZ."\(/NLJE2G$*9]]G$ED`*VR
MN:F2.H3E=)RE8FPWES5)%G+`\Q;2H>H0,=,C]U;[L@K2E'(-I%+DL!&K]IL5
M^3/ZXK,$_)/!/-1=2L+0LU/SFP=;'O[S:^X3G::E1,HY2=.O%/0%C:[Y8LG+
MS7B3)9(Y,P75Q/FTW9=HE-<JDKD*6RW"UDGN+NBM.(GY]Q*N4*:BDVX&6]&]
MMA<D5$5!W1=0&9-YQNDO!2.D#`P,#`P,#`P,#`P,#`P,#`P,#`P,%/X&P];[
%#``H``!!
`
end

>Fix:

>Release-Note:
>Audit-Trail:

From: Assar Westerlund <assar@FreeBSD.org>
To: proett@pbspro.com
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/27880: select fails to return incoming connect
Date: 16 Jun 2001 05:13:46 +0200

 I'm not able to reproduce your problem on either 4.3 RELEASE or
 current 4.3-STABLE.  On both of these I get:
 
 $ ./sockin 4711
 ./sockin: 127.0.0.1
 close
 
 (which I assume is the correct behaviour).
 
 Could you give me more information to allow me to debug your problem?
 Thanks.
 
 /assar
State-Changed-From-To: open->feedback 
State-Changed-By: assar 
State-Changed-When: Fri Jun 15 20:22:24 PDT 2001 
State-Changed-Why:  
tried on 4.3 and 4.3-stable and send back mail to submitter for more details 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27880 

From: "Thomas M. Proett" <proett@pbspro.com>
To: Assar Westerlund <assar@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/27880: select fails to return incoming connect
Date: Tue, 19 Jun 2001 12:30:52 -0700 (PDT)

 On 16 Jun 2001, Assar Westerlund wrote:
 
 > I'm not able to reproduce your problem on either 4.3 RELEASE or
 > current 4.3-STABLE.  On both of these I get:
 > 
 > $ ./sockin 4711
 > ./sockin: 127.0.0.1
 > close
 > 
 > (which I assume is the correct behaviour).
 > 
 > Could you give me more information to allow me to debug your problem?
 > Thanks.
 > 
 > /assar
 
 Hi,
 
 The problem occurs after some number of calls to sockout.  Here is
 an example done on my machine.  The output of uname -a is:
 
 FreeBSD mongo.pbspro.com 4.3-STABLE FreeBSD 4.3-STABLE #3: Thu May 10 16:27:47 PDT 2001     proett@mongo.pbspro.com:/usr/src/sys/compile/BONGO i386 
 
 --- window 1 ---
 mongo# ./sockout 4711
 got port 1023
 mongo# ./sockout 4711
 got port 1023
 mongo# ./sockout 4711
 got port 1023
 connect: Operation timed out
 mongo# 
 --- window 1 ---
 
 --- window 2 ---
 proett 1> ./sockin 4711
 timeout
 ./sockin: 127.0.0.1
 close
 ./sockin: 127.0.0.1
 close
 timeout
 timeout
 timeout
 ...
 ^C
 proett 2> 
 --- window 2 ---
 
 The third call to sockout was not detected by sockin which continued
 to periodicaly timeout until I hit ^C.  I ran netstat while it was in
 this state and got:
 
 tcp4       0      0  localhost.1023         localhost.4711         SYN_SENT
 tcp4       0      0  localhost.4711         localhost.1023         TIME_WAIT
 
 
 Tom Proett
 Veridian Systems
 PBSPro Development
 650-967-4675 x233
 
State-Changed-From-To: feedback->closed 
State-Changed-By: sheldonh 
State-Changed-When: Thu Jan 17 08:12:05 PST 2002 
State-Changed-Why:  
Automatic feedback timeout.  If additional feedback that warrants 
the re-opening of this PR is available but not included in the 
audit trail, please include the feedback in a reply to this message 
(preserving the Subject line) and ask that the PR be re-opened. 

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