From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by sourceware.org (Postfix) with ESMTPS id A3CF13851C23 for ; Thu, 3 Dec 2020 09:28:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A3CF13851C23 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Macay-1k9l8s0Q8o-00c9Yd for ; Thu, 03 Dec 2020 10:28:48 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id C3DF0A80D29; Thu, 3 Dec 2020 10:28:46 +0100 (CET) Date: Thu, 3 Dec 2020 10:28:46 +0100 From: Corinna Vinschen To: cygwin-developers@cygwin.com Subject: Re: python fails asyncio tests (py 3.7 & 3.8) Message-ID: <20201203092846.GZ303847@calimero.vinschen.de> Reply-To: cygwin-developers@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com References: <9976c726-8bfd-febe-ac86-f7cbf3cc958b@maxrnd.com> <20201202133813.GP303847@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:o9z1s2DRJLU6Dvby2WGVMNm0Z0jRK6GlGxQ6JrJjUwXWT9XB51E NrEaYG2y2ZT8rJ5MwBKpBaHKZo4hUTwxco3YJiaoZjirY4WEEWTLi0cjW1GLY+oa6V0TR8P M5HuYTZaGOUYDDQYhLZn6UuQW2yr80ehZ9PyxGgam199cCw+82kcaGkmDpAmQ0Fuxbtll/4 o0hvMZgEactdyxt/fM6cA== X-UI-Out-Filterresults: notjunk:1;V03:K0:wPU7MRevCFs=:Ki0CWsdZ2LUhUSAx/Hj9oB 6jxnhTqJg8rMNZBq46rkGzOBoLnhI+mADvnHf3B0A/TxYdhA0xBATJ14WNzVMNquNNG18SiXT I4rwjIb6WESR79kXwq3kHUdtMnDronr9SpynXlYJm3yYPTMmSjvUV8duqCgT8qMMzCU4hRedK wUBeXq2ZojcTWP+8aj4u91klskZUwx3a7vYiG63vSuLOE9kKVSL1SAmPBGFwIZoua/F5tbKSG 1/nV+PyeVxJtF/OGReqt72XdBdHO9l9tyIN2B3PvCGI3d/quYWrmDAJju/J8O7g98UsePFiti IVyKxpz8ExG8KGhlmjBd1K2tZICbwCIs/8scqFfG1XNdkSicmnbpW3M4bt0Z8OtHzuChDdS/u bVrUNS+WU9DZyhKDqmUyeESz8FjHUiMvGiBQ8HDPRyM5jIIPcInw484l3ss5wbdzJH8h1z8Oo 0TZRt0HNcg== X-Spam-Status: No, score=-100.4 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2020 09:28:51 -0000 On Dec 2 22:57, Mark Geisert wrote: > [replying to myself.. sorry..] > > On Wed, 2 Dec 2020, Mark Geisert wrote: > > > Hi Corinna, > > > > On Wed, 2 Dec 2020, Corinna Vinschen wrote: > > [...] > > > > > > This is apparently an old problem in the still current AF_LOCAL > > > implementation. Christian Franke encountered it when porting postfix: > > > > > > https://sourceware.org/legacy-ml/cygwin/2014-08/msg00420.html > > > > > > The problem is the security handshake between listening/accepting socket > > > and connecting socket. The connecting socket send its half of the > > > handshake and waits for accept on the other side to return the other > > > half. However, if the listening side doesn't accept right away, the > > > connecting side hangs. > > > > > > The workaround right now is to call > > > > > > int peercred_off = 1; > > > fd = socket (AF_LOCAL, SOCK_STREAM, 0); > > > setsockopt(fd, SOL_SOCKET, SO_PEERCRED, &peercred_off, sizeof > > > peercred_off); > > > > > > This disables the security handshake. > > > > I see. For this problem report should the setsockopt() workaround be > > applied to Python (yikes!) or can it be done for all apps at once in > > fhandler_socket_local::socket()? I might be able to look into the > > standing issue with the security handshake later on, if (my) time > > permits. I appreciate the history/explanation on this. > > Thanks & Regards, > > > > ..mark > > Putting the workaround in fhandler_socket_local::socket() compiles fine and > the OP's Python testing issue seems fixed. OTOH XWin and X apps exit soon > after starting so that's no bueno. > > It looks like the individual Python tests that exhibit the problem are going > to need patching. Does that sound about right? In theory it's just a testcase and we have a known workaround for that. The testcase can be marked as XFAIL for Cygwin or get the extra setsockopt() call for Cygwin, both is fine. Corinna