Subject: corruption in socket layer?
From: [email-masked] (Tim Newsham)

6 Oct 1997 14:59:12 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
To: [email-masked]

Hi,

    I occasionally observe some very strange behaviour in
the socket code.  It seems to me that there is corruption
going on somewhere.  I'm not sure if its cygwin's problem
or winsock's problem.

What I'm seeing is the tcp/ip stack behave improperly at
times.  For example sometimes a close() happens and not
FIN is sent out.  Instead the connection is silently placed
into the closed state.  On the next incoming packet from
the remote, the local TCP stack sends out an RST.

It also appears that I sometimes get an EOF indication
(read returns zero) when the remote side has not closed
the connection, and I have not explicitely asked for
the connection to be closed.

What is strange about both of these is that I cannot
reproduce it in simple test cases, and the problems
happen intermittently.  I have some (large) programs that
exhibit this behavior reliably, but it seems to depend
on a number of factors:  The program iterates over many
connections and fails constantly in one iteration with
one version of cygwin.dll, and constantly in a later
iteration with a different version of the .dll.  It
also seems to fail much later when debugging (STRACE=1,out)
is turned on.  This seems to indicate some sort of
race condition, or possibly a corruption bug that is
trashing some internal state.

I see this behaviour in all the cygwin.dll's I have tried
it on, and am guessing that this problem has existed in
all versions of the dll (possibly a winsock bug).

Has anyone observed this behavior and looked into it?
Is it possible for my program to be trashing the cygwin
internal state, or would corruption of winsock state
have to be in the winsock dll itself?

                                         Tim N.

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".