From: William Lee Irwin III <wli@holomorphy.com>
To: raul@pleyades.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: The dreadful CLOSE_WAIT
Date: Tue, 27 Jul 2004 09:00:57 -0700 [thread overview]
Message-ID: <20040727160057.GE2334@holomorphy.com> (raw)
In-Reply-To: <20040727083947.GB31766@DervishD>
On Tue, Jul 27, 2004 at 10:39:47AM +0200, DervishD wrote:
> Seems under Linux that, when a connection is in the CLOSE_WAIT
> state, the only wait to go to LAST_ACK is the application doing the
> 'shutdown()' or 'close()'. Doesn't seem to be a timeout for that.
> Well, I think this is dangerous because a bad application (and a
> couple of widely used servers have this problem) can exhaust system
> network resources (difficult, but possible). For example, a
> concurrent FTP server with a race condition that doesn't do the
> shutdown when the remote end aborts. Writing such a 'bad app' is very
> easy, just do the socket->bind->listen->accept and after accepting
> the connection forget the connected socket and keeps on listening. If
> the remote end aborts, the server leaves the connection in
> CLOSE_WAIT. Sometimes it has a associated timer, when data remains in
> the tx queue, it seems that the kernel tries to retransmit all that
> data, which makes no sense: in CLOSE_WAIT state the other end is not
> there... Surely I'm missing a lot :((
Probably best to implement timeouts by hand in your network daemon.
-- wli
next prev parent reply other threads:[~2004-07-27 16:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-27 8:39 The dreadful CLOSE_WAIT DervishD
2004-07-27 9:28 ` Måns Rullgård
2004-07-27 9:57 ` DervishD
2004-07-27 16:00 ` William Lee Irwin III [this message]
2004-07-27 17:10 ` DervishD
2004-07-27 23:27 ` William Lee Irwin III
2004-07-28 9:09 ` DervishD
2004-07-28 9:24 ` William Lee Irwin III
2004-07-27 16:45 ` Mike Waychison
2004-07-27 17:09 ` DervishD
[not found] ` <20040728140622.2bc69fa5@kingfisher.intern.logi-track.com>
2004-07-28 14:47 ` DervishD
2004-07-29 9:46 ` Markus Schaber
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=20040727160057.GE2334@holomorphy.com \
--to=wli@holomorphy.com \
--cc=linux-kernel@vger.kernel.org \
--cc=raul@pleyades.net \
/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