
Messages in this thread
SubjectNetworking Problems (1.99.7)
I've been seeing a few strange problems with Linux networking.  I
created a client and a server. The client continuously connects to and
disconnects from the server. The code and the binaries can be found

The problem I see is that the client starts taking about 3 seconds
for certain connections to occur. This happens when the server is
run locally on the Linux machine and when the server is run on a
SunOS 4.1.3 or SunOS 2.3 machine. Normally, it takes only a few
milliseconds for a connection to occur.

If I run a server on the Linux machine and connect up from a SunOS 4.1.3
machine, the client gets very even connections the entire time. It
never experiences the 3 second delays.

Occasionally, I've seen Linux get stuck in the SYN_SENT state. I have
another program that connects up to a Windows NT machine. It does this
continuously, gets a response, and disconnects. It hangs in a call to
connect(), and netstat shows that the socket is in the SYN_SENT state.
The call never times out. The socket does not appear in a netstat listing
on the NT machine--it seems to have timed out. This problem does not
occur very often. Sometimes it will take thousands of connects and
disconnects before the problem shows up. I just saw it show up after
383 connections (I was running 6 simultaneously, one hung). Here are the
key lines of output from /proc/net/tcp:

208: 070200C0:06D0 040200C0:0055 02 00000000:00000000 00:FFFA663A 00000000 500 0 8052

and from netstat:

Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (State) User
tcp 0 0 atlantic.inetdata:1744 SYN_SENT chaffee

I tried looking through the TCP code for an answer, but I didn't find
anything obvious. The net code is still rather new to me.

To run the client and server, do something like:
machine1% server -logfile -

machine1(or2)% client -logfile - machine1

Gordon Chaffee

 \ /
  Last update: 2005-03-22 13:37    [W:0.046 / U:0.692 seconds]