Re: FIN_WAIT2 not working



Gary R. Garrison <g.r.garrison@xxxxxxxxxxxxxxx> wrote:
I'm using an embedded Linux version 2.6.25-rc8.

All communications between the Linux machine and MSWindows machines
(WinXP pro, Vista and WinXP embedded) where the Linux machine
transmits information then calls Close() result in tcp window
updates arriving from the Windows machines after the Linux machine
has sent it's FIN.

Does the behaviour change if in the app on the Linux side you call
shutdown(SHUT_WR) on the socket and then hang in a timed select/poll
waiting for the socket to become readable, meanwhile on the Windows
side, you make certain that the Windows side calls close() after the
read return of zero? That sequence is what netperf does to be "sure"
that the receiver has received all the data.

Perhaps the Linux stack will be more "forgiving" of the window update
if the connection end-point isn't orhpaned after a close().

Communications between Windows machines also show tcp window updates
arriving from other Windows machines after we've sent them FIN.

The problem is the Linux machine sending the RST.

Well, or the Windows system sending a window update after a FIN.

Since this newsgroup keeps rejecting everything I send with a
".pcap" file attached heres a topo of the end of a capture :

the linux machine : 192.168.250.1
WinXP embedded machine 192.168.250.2

I've taken the liberty of converting the IPs to shorter things and
done some other "tightening-up" of the putput.

Time Src Dst Protocol Info
0.178455 LNX WIN [A] Seq=204430 Ack=1 Win=5840 Len=1448
0.178472 WIN LNX [A] Seq=1 Ack=204430 Win=2755 Len=0

Did the application do anything to put the Windows system into an
immediate ACK mode or is this very close to the beginning of the
connection?

0.261309 WIN LNX [A] Seq=1 Ack=205878 Win=14339 Len=0
0.261759 LNX WIN [A] Seq=205878 Ack=1 Win=5840 Len=1448
0.261881 LNX WIN [A] Seq=207326 Ack=1 Win=5840 Len=1448
0.262002 LNX WIN [F, P, A] Seq=208774 Ack=1 Win=5840 Len=1256
0.262013 WIN LNX [A] Seq=1 Ack=208774 Win=11443 Len=0
0.262102 WIN LNX [A] Seq=1 Ack=210031 Win=10187 Len=0
0.283422 WIN LNX[TCP Window Update] [A] Seq=1 Ack=210031 Win=61383 Len=0
0.283635 LNX WIN [R] Seq=210031 Win=0 Len=0


Linux client connects WinXP server, sends a block of 29 bytes
indicating the Linux machine is going to send 2500
"ArticleInformation" objects. The transfer is accomplished but at
the end, after the FIN by the Linux client, the WinXP machine sends
a window update then the Linux client sends a RST. Since windows
handles RST in realtime and the windows application hasn't yet
"taken" all of the incoming data, an error is seen in "read()".

Simple situation mais solution unknown.

If all else fails and you have the ability to change both sides of the
equation, you could have the Windows side to an application-level ack
of the data on which the Linux side waits before calling close() on
the socket. It goes one step further than the shutdown() idea above
by making sure that the Windows side has no more window updates to
send - they best be piggy-backed on that app-level ack.

rick jones
--
The computing industry isn't as much a game of "Follow The Leader" as
it is one of "Ring Around the Rosy" or perhaps "Duck Duck Goose."
- Rick Jones
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
.



Relevant Pages

  • Re: Future of IT in Lebanon
    ... working knowledge of Indian programmers DNA, nor of their intuitive Java ... > So Longhorn is not an experiment and Linux is an experiment? ... another chapter in the Windows story, and the Microsoft marketing machine is ... > application opens, Check the about, it says Microsoft Visual Basic 6.3. ...
    (soc.culture.lebanon)
  • FTP DOWNLOAD! More than 6500 CRACKED SOFTWARE(CAD,CAE,CAM,ED
    ... Autodesk Architectural Desktop 2005 ... DASSAULT SYSTEMES CAA ENOVIA LCA V5R13 ... ALTAIR.OPTISTRUCT V5.1 for LINUX ... ANSYS V8.0 FOR WINDOWS ...
    (microsoft.public.dotnet.framework.adonet)
  • Linux for Senior Citizens
    ... Linux for Senior Citizens ... For such people, I believe, Windows really is a better option: ... The kernel manages all the hardware and also looks after all running ...
    (uk.people.silversurfers)
  • Re: Future of IT in Lebanon
    ... It's the same Linux code base. ... Microsoft Office on a Windows server, it will install and run fine, the main ...
    (soc.culture.lebanon)
  • Re: [SLE] Developing a Real Time Data System
    ... The KBasic License is valid for both operating systems: Windows and Linux. ... Modern BASIC language ... chapters learning about the programming language. ...
    (SuSE)