From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by sourceware.org (Postfix) with ESMTPS id 43815385C426 for ; Fri, 8 May 2020 08:32:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 43815385C426 Received: by mail-lf1-x12b.google.com with SMTP id t11so775236lfe.4 for ; Fri, 08 May 2020 01:32:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding:thread-index:content-language; bh=7kqY6zAPpz+Zr292YV6bgu/hvbz1EOV8X+RPWGb0shs=; b=AOni5yokusyrIWT2K42vtMfNmx7qHYjLucrj6PDHUosuh4hotusa7y6aB3uo1+ee2B N0jyEx6yep8fvj0uQ+xt1Fpj+eGaZ8yOCGj9F/XI/3xI+bFUPA4eNQsl+T/LMhyKM0Z2 X4DdFir0qNoM8PGfF9/It5VdLw52bmC8tJSxmV3bQjf6XN41+7M+1Yi+JD+juFomOBjf nM9wygeB+dXRUd/G+vG4Ghp2LQWA/wXT2g01jDWCIE9FS/dG5kI8JD8V0tMf7ED59p4a ZBHMnHXw0qK/oevZ0X0kfSOUyNP4fn+ggRlOLBhgM7tM2rZVPfQv4wNUeFz02Cje/veI HcQg== X-Gm-Message-State: AOAM5304urtM9HgyC0SQqeb7igz2dYuiw416YX/PIhD0/bMtF+3GeKCj yMsdPj2G4AGwmZroTiUgn+cATetW X-Google-Smtp-Source: ABdhPJyq+z9ngm0Npyc+IkOcgf3mHMJQFluT21nIlJJfp5dxyI+3KicSGKOa4wV4N6nsfde9FM1iVQ== X-Received: by 2002:a19:8809:: with SMTP id k9mr1108679lfd.151.1588926771723; Fri, 08 May 2020 01:32:51 -0700 (PDT) Received: from JOKK (87-249-176-245.ljusnet.se. [87.249.176.245]) by smtp.gmail.com with ESMTPSA id c20sm693654ljk.59.2020.05.08.01.32.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 May 2020 01:32:51 -0700 (PDT) From: To: Subject: ECONNABORTED and ECONNRESET on TCP socket using recv() Date: Fri, 8 May 2020 10:32:50 +0200 Message-ID: <008001d62513$42ec3130$c8c49390$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdYlDFQvN6jgP7JNTmG/GkSZRpdL2Q== Content-Language: en-gb X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2020 08:32:54 -0000 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) 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) d.s.