Oron Peled wrote:

On Monday 24 January 2005 11:28, Shachar Shemesh wrote:


I see a large number of connections in "SYN_RECEIVED" state. In fact, all port 80 connections are in this state. Running a sniffer reveals that a SYN is received, a SYN+ACK sent. Then an ACK is received (the sniffer is running on the server, so this is not a question of network routes or something), followed by the request. The server, however, does not pass this packet through. The connection stays in "SYN_REC", and the request is not acknowledged. I even see the request retransmitted.



Interesting... if you have the exact apache pid's related
to these (via netstat -p option) and verify if they are
stuck inside accept() or select():
- If they are, then it looks like a kernel problem, since
the 3-way handshake is done (and the remote side believe
so as well [the retransmit requests]), but the kernel
does not return from accpet()/select() as it should.


I MAY try that if it happens again. However, I think it's a kernel bug whichever way you turn it.

If a sniffer on the machine shows that three way handshake was successfully completed, and the kernel shows the connection in "SYN_RECV" and not "ESTABLISHED", it's a kernel bug. Whether apache was doing "accept" at the time or not is irrelevant, IMHO.

 - If the process is doing something else, than it looks like
   an application bug. I.e: the connections are in the listen
   queue and the application hasn't accepted them.

Connections in the listen queue have the "ESTABLISHED" state. This is not what netstat is showing.

If this is
the case, connecting to the server (even via telnet to
port 80) more times then the listen queue size -- should
return "connection refused" to the client -- does it?


No. You get a SYN+ACK, and then you don't get any ACKs for the data you send.

I've replaced the kernel with 2.4.29 vanilla, and we'll have to wait out and see whether the problem happens again. If it does, I got some recommendations to switch to 2.6. This isn't going to be easy (Debian Woody), but we'll cross that bridge when we get to it.

         Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting ltd.
http://www.lingnu.com/


================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]



Reply via email to