All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank van Maarseveen <frankvm@frankvm.com>
To: linux-kernel@vger.kernel.org
Subject: select(outfd) times out after send(outfd) returns ECONNRESET. bug?
Date: Wed, 1 Feb 2006 10:17:55 +0100	[thread overview]
Message-ID: <20060201091755.GA28321@janus> (raw)

Saw this (strace -tt -T) on 2.6.14.2 and 2.6.14.6:

12:04:14.180892 accept(3, {sa_family=AF_INET, sin_port=htons(3232), sin_addr=inet_addr("172.17.2.206")}, [16]) = 8 <0.000048>
	...
12:04:14.233478 select(1024, NULL, [8], NULL, {5, 0}) = 1 (out [8], left {5, 0}) <0.000032>
12:04:14.233871 send(8, "\0\252#\307G\355#\307G\355#\307G\355#\307G\355#\307G\355"..., 147, 0) = -1 ECONNRESET (Connection reset by peer) <0.000028>
12:04:14.234109 select(1024, NULL, [8], NULL, {5, 0}) = 0 (Timeout) <4.999045>
12:04:19.233456 select(1024, NULL, [8], NULL, {0, 0}) = 0 (Timeout) <0.000029>
	...
12:04:19.246691 recv(8, "", 147, 0)     = 0 <0.000028>
12:04:19.246888 shutdown(8, 2 /* send and receive */) = -1 ENOTCONN (Transport endpoint is not connected) <0.000017>
12:04:19.247069 close(8)                = 0 <0.000043>


I thought the second (and third) select() call should have returned
immediately, flagging the fd of the reset connection as writable.


-- 
Frank

                 reply	other threads:[~2006-02-01  9:18 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=20060201091755.GA28321@janus \
    --to=frankvm@frankvm.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 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.