Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Foundry ServerIron and Compay DS10/Linux - SYN Flood Troubles
@ 2000-01-27 13:34 Michael Rommel
  2000-01-29 20:57 ` Greg Lindahl
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Rommel @ 2000-01-27 13:34 UTC (permalink / raw)
  To: axp-list; +Cc: fuh003, sven


Hi there,

we experience an interesting problem here, currently under heavy
investigation, but I thought I'd share it with you in case
it rings a bell...

Abstract

A load-balancing device suddenly stops sending incoming client
requests on to a particular server. Testing the functionality
of the server from a third workstation works fine. Netstat -an on
the server shows an unusual high amount of tcp connections in
SYN_RECV state.

Setup

  +-------------------+     +--------------------+
  | Catalyst    + + +----------+       Router    +-----> Internet
  +-------------|-|---+     +--------------------+
                | +----------------+
  +-------------|-----+     +------+-------------+
  | Foundry   + +     |     |          Client    |
  +-----------|-------+     +--------------------+
              |
  +-----------|-------+
  | C2948   + + + + + |
  +---------|---|-|-|-+
            |   | | +--------------+
  +---------+---|-|---+     +------+-------------+
  | sikinos     | |   |     |          santorini |
  +-------------|-|---+     +--------------------+
                | +----------------+
  +-------------+-----+     +------+-------------+
  | syros             |     |          emporio   |
  +-------------------+     +--------------------+

Normal operation

The normal operation is as follows:

  The client sends a HTTP Request to the virtual IP Address of
  the Foundry (e.g. GET http://www.foundrynetworks.com/ HTTP/1.1)
  The Foundry translates the destination IP field of
  the incoming tcp packet to one of the real caches 
  (sikinos,santorini,emporio or syros) and forwards
  the packet there and remembers the connection somewhere.

  For easier understanding let's assume that the object is in the
  cache, the server then fetches the object from disk storage and
  sends it back to the client.

  The response from the cache passes the Foundry, the
  source address gets translated back and that's about it.

To know when a real cache is down for maintenance or whatever
other reason, the Foundry periodically checks the function of
each real cache. It uses an HTTP connection and retrieves an
object from the cache. If the response code of the real cache is
200-400 everything is okay. Otherwise the real cache is marked
dead and excluded from the round-robin algorithm.

Faulty operation

At the moment we experience the following: 

The testing of a real server fails. The foundry cannot retrieve
an object from a real server. Furhter debugging showed, that
while opening a TCP connection the whole of the TCP handshake
(SYN, SYN_ACK, ACK) is not completed.

Sender's (Foundry) view: After sending the SYN packet, the SYN_ACK
is not received on time, the Foundry sends a RST packet and
assumes the connection is taken down at the other end as well.
(Which is not true :-| btw.) It then tries to open the next
connection USING THE SAME SOURCE PORT 1024 !!! and fails again
and again and again and ... you get the picture.

A dump of the tcp statistics of the foundry lokks like this, but
I cannot yet comment on whether the counters are within normal range
or not :-(

  # sh ip traf
  TCP Statistics
  1 current active tcbs, 67378 tcbs allocated, 67374 tcbs freed
  66155 active opens, 0 passive opens, 46 failed attempts
  181366 active resets, 65045 passive resets, 620 input errors
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  maybe these counters are too high

  276911 in segment, 146132 out segment, 836 retransmission
  keepalive: close connection 0, failure callback 0
  tcp connect: connection exist 0, out of tcb 0
  keepalive: close connection 0, failure callback 0
  tcp connect: connection exist 0, out of tcb 0

  The system uptime is 20 hours 37 minutes 36 seconds


Receiver's (emporio) view: After receiving the SYN packet, the
system sends out an SYN_ACK packet, receives an RST packet. What
it does is not yet clearly understood, I'll debug that tomorrow,
but the results are:

  netstat -an shows a maximum of 128 tcp connections in SYN_RECV
  state, all coming from the same source address AND port, like
  that:

  # netstat -an |grep SYN
  tcp        0      0 193.98.99.158:81        193.98.99.47:1024 SYN_RECV
  tcp        0      0 193.98.99.158:81        193.98.99.47:1024 SYN_RECV
  tcp        0      0 193.98.99.158:81        193.98.99.47:1024 SYN_RECV
  tcp        0      0 193.98.99.158:81        193.98.99.47:1024 SYN_RECV
  tcp        0      0 193.98.99.158:81        193.98.99.47:1024 SYN_RECV
  tcp        0      0 193.98.99.158:81        193.98.99.47:1024 SYN_RECV
  tcp        0      0 193.98.99.158:81        193.98.99.47:1024 SYN_RECV
  tcp        0      0 193.98.99.158:81        193.98.99.47:1024 SYN_RECV
  tcp        0      0 193.98.99.158:81        193.98.99.47:1024 SYN_RECV
  tcp        0      0 193.98.99.158:81        193.98.99.47:1024 SYN_RECV
  tcp        0      0 193.98.99.158:81        193.98.99.47:1024 SYN_RECV
  tcp        0      0 193.98.99.158:81        193.98.99.47:1024 SYN_RECV
  tcp        0      0 193.98.99.158:81        193.98.99.47:1024 SYN_RECV
  ...
  # cat /proc/sys/net/ipv4/tcp_max_syn_backlog
  128

During the buildup of these backlogs I saw SYN_RECV connections
from random other ports, but they disappeared and in the final
stadium, before we have to restart the process that listens on
port 81, there are only connections from port 1024.

So my question: Has anybody experienced something like that under
the condition that you haven't had a routing error. I am aware
that things like that can happen when you have SYN_ACK packets go
to New Zealand but the client sits in Paris. I suspect a
kernel/tcp stack error in the linux kernel on Alpha Systems.

The system deployed is RedHat 6.0 with Kernel 2.2.14 on a Compaq
DS10.

If you need more information, please let me know.

Thanks in advance,

  Michael.

-- 
Michael Rommel, ATD IT PS, Siemens AG, Erlangen, Germany


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Foundry ServerIron and Compay DS10/Linux - SYN Flood Troubles
  2000-01-27 13:34 Foundry ServerIron and Compay DS10/Linux - SYN Flood Troubles Michael Rommel
@ 2000-01-29 20:57 ` Greg Lindahl
  2000-01-31  5:47   ` Mikolaj J. Habryn
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Lindahl @ 2000-01-29 20:57 UTC (permalink / raw)
  To: axp-list

> Sender's (Foundry) view: After sending the SYN packet, the SYN_ACK
> is not received on time, the Foundry sends a RST packet and
> assumes the connection is taken down at the other end as well.
> (Which is not true :-| btw.) It then tries to open the next
> connection USING THE SAME SOURCE PORT 1024 !!! and fails again
> and again and again and ... you get the picture.

First off, this should be a big in intel linux if it's a bug in alpha linux.

Second, it's not clear who has the bug. You will have to go look in the TCP
RFC to see what's supposed to happen when a SYN_ACK is dropped. Apparently
the Foundry switch thinks it's supposed to send RST and then not enter
TIME_WAIT, while Linux thinks that when it gets the RST, it should stay in
SYN_ACK state. (You're sure the RST is not dropped?)

-- greg


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Foundry ServerIron and Compay DS10/Linux - SYN Flood Troubles
  2000-01-29 20:57 ` Greg Lindahl
@ 2000-01-31  5:47   ` Mikolaj J. Habryn
  0 siblings, 0 replies; 3+ messages in thread
From: Mikolaj J. Habryn @ 2000-01-31  5:47 UTC (permalink / raw)
  To: glindahl; +Cc: axp-list

>>>>> "GL" == Greg Lindahl <glindahl@hpti.com> writes:

    GL> First off, this should be a b[u]g in intel linux if it's a bug
    GL> in alpha linux.

  And indeed it is. We've observed the same behaviour on intel boxes
here. On the balance of probabilities, I'm blaming the Foundry :)

m.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-01-31  5:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-01-27 13:34 Foundry ServerIron and Compay DS10/Linux - SYN Flood Troubles Michael Rommel
2000-01-29 20:57 ` Greg Lindahl
2000-01-31  5:47   ` Mikolaj J. Habryn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox