All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: netdev@vger.kernel.org
Subject: Fw: [Bug 8013] New: select for write hangs on a socket after write returned ECONNRESET
Date: Thu, 15 Feb 2007 16:04:05 -0800	[thread overview]
Message-ID: <20070215160405.3bd30b05@localhost.localdomain> (raw)

Someone want to take a stab at fixing this??

Begin forwarded message:

Date: Wed, 14 Feb 2007 19:32:52 -0800
From: bugme-daemon@bugzilla.kernel.org
To: shemminger@linux-foundation.org
Subject: [Bug 8013] New: select for write hangs on a socket after write
returned ECONNRESET


http://bugzilla.kernel.org/show_bug.cgi?id=8013

           Summary: select for write hangs on a socket after write
returned ECONNRESET
    Kernel Version: 2.6.16
            Status: NEW
          Severity: normal
             Owner: shemminger@osdl.org
         Submitter: ajd@gentrack.com


Distribution: Debian
Also reproduced on: 2.4 based Redhat.

Hardware Environment:
i686/Xeon
Problem Description:

If you write() to a disconnected socket, write returns ECONNRESET.
If you then select() on that socket, checking for write, the select
never returns.

For example from strace:
write(4, "fred", 4)                     = 4
...
write(4, "fred", 4)                     = -1 ECONNRESET (Connection
reset by peer)
select(5, NULL, [4], NULL, NULL ... hung in select

The select documentation says "those in writefds will be watched to see
if a write will not block".
A write on this socket will not block, therefore select should return 
immediately.

When the program is run on Solaris, AIX and HPUX, the select returns 
immediately.

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

             reply	other threads:[~2007-02-16  0:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-16  0:04 Stephen Hemminger [this message]
2007-02-16 15:25 ` Fw: [Bug 8013] New: select for write hangs on a socket after write returned ECONNRESET Evgeniy Polyakov
2007-02-16 15:28   ` Evgeniy Polyakov
2007-02-16 15:39     ` Evgeniy Polyakov
2007-02-16 15:54       ` Evgeniy Polyakov
2007-02-16 16:10         ` Evgeniy Polyakov
2007-02-16 18:29           ` Stephen Hemminger
2007-02-16 18:34             ` Evgeniy Polyakov
2007-02-17 16:25               ` Evgeniy Polyakov
2007-02-19 14:19                 ` Jarek Poplawski
2007-02-22  6:47                 ` David Miller
2007-02-22  6:45               ` David Miller
2007-02-22 12:14                 ` Evgeniy Polyakov
2007-02-22 13:31                   ` David Miller
2007-02-22 13:46                     ` Evgeniy Polyakov
2007-02-22 14:08                       ` David Miller
2007-02-22 18:24                         ` Stephen Hemminger

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=20070215160405.3bd30b05@localhost.localdomain \
    --to=shemminger@linux-foundation.org \
    --cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.