<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18702">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Hi there,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>today's bug from hell might not be a Racket related
issue (to me it seems more of a Windows type of thing), but maybe somebody has
already come across something similar, so here goes:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I have a Racket application serving as a stress
test against a TCP server, that is, the Racket application calls tcp-connect()
to the remote server, then does some data exchange, closes the ports
and starts all over again. To make it more interesting, I have 12 instances of
this application running concurrently, so there is quite a lot of connection
establishment and -takedown going on.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>So far, so good - only thing I need to mention is
that I call tcp-connect only with the minimum necessary parameters (remote name
and remote port).</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>All of this runs fine for a while, until ALL of the
stress clients begin to raise WSAEADDRESSINUSE exceptions. Now I understand that
WSAEADDRESSINUSE means that an application tries to bind a socket to a
local port that is already used for another connection - but in the case
of tcp-connect(), I assume that the call with no local port translates
to a bind() with port 0 which instructs the TCP layer to select a free port? Or
does the Racket TCP/IP translation layer do its own magic with local port
selection which might be buggy?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I also understand that the OS will keep bound
sockets around for a while (which can be easily verified by looking at the
netstat() output), but the "normal" BSD compatible implementation of
bind(...0...) will skip sockets in those states, so I don't quite
understand where the WSAEADDRESSINUSE error comes from unless the port
selection was made outside of the low level network
software...</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>any ideas?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>Thanks!</FONT></DIV>
<DIV> </DIV></BODY></HTML>