delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/05/08/06:10:56

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 89830396E463
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1588932620;
bh=MjiTRr1/k+8rIVliKsbfkRnIMHxT0eBxaxyEE73FId8=;
h=Date:From:To:Subject:References:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
Reply-To:From;
b=l/M5X17vIg26RjdT9+g6tXyQ8aWRlH49S9PHYmEXmQSzvNpVUS0F1shFyeLBZR4LH
fuXPcUfDM73J5y76yWwedAdipPmzCdT5UUpAwQJs03/oObyVIUCNWoBom6eJu2y45Q
DM2jKUpoKlZtrFhp48SNydNF7mt+hpMAeubAsEh0=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 651583851C0B
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=cygwin.com
Authentication-Results: sourceware.org;
spf=fail smtp.mailfrom=corinna-cygwin AT cygwin DOT com
Date: Fri, 8 May 2020 12:10:15 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: ECONNABORTED and ECONNRESET on TCP socket using recv()
Message-ID: <20200508101015.GI3947@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <008001d62513$42ec3130$c8c49390$@gmail.com>
MIME-Version: 1.0
In-Reply-To: <008001d62513$42ec3130$c8c49390$@gmail.com>
X-Provags-ID: V03:K1:0v/E+Jk1PajwzGWCqzkaDORYF+CHUAJByDq2Io7Drq4JosXRgUH
frUVSgmQNK3uXadP/fX+zq/563eRAW+xxZNsGBgbPIaC3OuNqphhAxM3EMeDV3LVgXuDri+
OJNUvJYdv8Psl1D+K0ZkQpx72hBLuoCt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_00,
GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE,
RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NEUTRAL,
TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT 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
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019