From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: ECONNABORTED and ECONNRESET on TCP socket using recv()
Date: Fri, 8 May 2020 12:10:15 +0200 [thread overview]
Message-ID: <20200508101015.GI3947@calimero.vinschen.de> (raw)
In-Reply-To: <008001d62513$42ec3130$c8c49390$@gmail.com>
On May 8 10:32, Kristian Ivarsson via Cygwin wrote:
> Hi all
>
> Have anyone experienced getting ECONNABORTED and ECONNRESET on local TCP
> socket when using recv() ?
>
>
> We have a fairly complex application where it, amongst others, spawns child
> processes (using posix_spawnp)
>
> This is a simplified scenario
>
> - parent performs socket() + bind() + listen() to localhost
> - parent spawns a client-child process
> - client-child is doing socket() + connect() to localhost
> - client-child is doing send()
> - client-child is doing recv() and getting ECONNRESET
>
> - parent performs accept()
> - parent spawns a server-child process
> - server-child is doing recv() and getting ECONNABORTED
>
>
> According to strace, both of these errors originates from
> fhandler_socket_inet::recv_internal() (in my version it says line 1221)
The errors are generated by the called Windows function WSARecvFrom.
We'd need a reproducible testcase for this to allow debugging.
> Maybe there's some defect in our application (there's a lot of other fuzz
> going on as well), but it works in several Linux-implementations but this
> error is deterministically occurring using CYGWIN
>
>
> I've searched mail archives but I cannot really find any explanation or
> cause
>
> Does anyone have any knowledge about this ?
>
>
>
> Best regards
> Kristian
>
> p.s.
> strace -f works in the opposite way as in most Linux-implementation btw
> (as far as I understand)
It's a toggle, multiple -f on the cli will switch it multiple times.
The fact that the default is to follow forks is pretty old, commit
f69af9b3d2352 from 2002.
Corinna
--
Corinna Vinschen
Cygwin Maintainer
next prev parent reply other threads:[~2020-05-08 10:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 8:32 sten.kristian.ivarsson
2020-05-08 10:10 ` Corinna Vinschen [this message]
2020-05-15 9:04 ` Sv: " sten.kristian.ivarsson
2020-05-22 13:26 ` sten.kristian.ivarsson
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=20200508101015.GI3947@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin@cygwin.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).