public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anders Furuhed <anders.furuhed@pantor.com>
To: linux-kernel@vger.kernel.org
Subject: Intra-host socket write fails after 1024s if write size <= 970 (in 2.2, not 2.4)
Date: Thu, 25 Oct 2001 16:05:16 +0200	[thread overview]
Message-ID: <3BD81C1C.5040005@pantor.com> (raw)

A simple server [ignore SIGPIPE,socket(PF_INET,SOCK_STREAM,0),
setsockopt/REUSEADDR,bind,listen,accept] ignores connecting clients
after accepting them. It just loops over accept.

A simple client [ignore SIGPIPE,socket,connect,write] connects to the
simple server and tries to write blocks of size x forever. A write
call blocks eventually.

In 2.4, the write remains blocking, but in 2.2 (2.2.19, 2.2.20pre11)
the outcome depends on the size x and whether a network is involved.

If (x <= 970 && within a host && using 2.2), the final blocking
write returns after exactly 1024 seconds with errno set to EPIPE
(or sometimes ETIMEDOUT). After this, netstat says that the client
is in 'CLOSE' and that the server is in 'ESTABLISHED'.
Using 2.4, larger block sizes or over a network, the client as we
expect blocks until we get tired of waiting and stop the test (~1h)

The test hosts are RH7.1 or 7.2-based and use the standard
2.2.19-7.0.8 from RH7.0. We have also tried with a basic 2.2.20pre11.
We don't believe that we have modified any tcp parameters etc.

Is there a reason that the write call returns?
I'm on the list if someone has a clue!
The code is available on request (188 lines).

Cheers,
Anders Furuhed, Pantor Engineering


                 reply	other threads:[~2001-10-25 14:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BD81C1C.5040005@pantor.com \
    --to=anders.furuhed@pantor.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox