From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 711C9384C008 for ; Mon, 1 Feb 2021 10:17:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 711C9384C008 Received: by mail-wr1-x433.google.com with SMTP id s7so12933604wru.5 for ; Mon, 01 Feb 2021 02:17:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=t4/edwJdIHWmGRJwFDiRPhiMLqEv7ck0OnmP9rAeieM=; b=U3jscrs3iHp9H9eyq0FzwYTkkGa851BXrbZ3NQnNHNWYDegw0qmz4LORD9Rg/oIwg/ Z3aOARIioddc0cxLlxINYB8T8F6RiXdwXsRbwhDv9UUdNecdHUyBTS3aIg9r2gwtX9SY Gt4fpvSO30jlKkMGICd9wnQsB+4eZAzSPUzHyav+OsbV9MiUwa6wklpRlGgekUIEaBnM 9lWKFiWw1/VduuDZHTLezDRLVg1IsI+wS7iEYIix0aQUuuLjK91Sesx/WoGulJKb0PkV f512ch0uV7GYDcicge1OIONIYXojhNCPtq9Pw+wcMsbuIu98yLI7doAozf2r5GDNdsOz oCHQ== X-Gm-Message-State: AOAM530uIl7wbMx2ZAXLm3AvvZnbYjXZyIqPO/fdQ/kkn4B8CKQePusV hpLFQ/jgk1ELApNIYSfOoCpCpUSEupqKKw== X-Google-Smtp-Source: ABdhPJzAkzdISQDtOFepSZsZ91FrztnKwavI8bbcV3SW1hcowkvtGVO30h2HKWEVTtJS/82oLbMCwg== X-Received: by 2002:adf:814f:: with SMTP id 73mr17217890wrm.368.1612174621521; Mon, 01 Feb 2021 02:17:01 -0800 (PST) Received: from ?IPv6:2003:cc:9f02:b06:f4c4:2592:68c8:96b5? (p200300cc9f020b06f4c4259268c896b5.dip0.t-ipconnect.de. [2003:cc:9f02:b06:f4c4:2592:68c8:96b5]) by smtp.gmail.com with ESMTPSA id b132sm20539316wmh.21.2021.02.01.02.17.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Feb 2021 02:17:01 -0800 (PST) Subject: Re: python fails asyncio tests (py 3.7 & 3.8) To: cygwin-developers@cygwin.com References: <9976c726-8bfd-febe-ac86-f7cbf3cc958b@maxrnd.com> <20201202133813.GP303847@calimero.vinschen.de> <20201203092846.GZ303847@calimero.vinschen.de> From: Marco Atzeri Message-ID: Date: Mon, 1 Feb 2021 11:17:00 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20201203092846.GZ303847@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: it Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, 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-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: Mon, 01 Feb 2021 10:17:03 -0000 On 03.12.2020 10:28, Corinna Vinschen via Cygwin-developers wrote: > 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 > the latest python packages to solve the asyncio issue are patched to bypass Cygwin "socketpair" and use an internal alternative Python3 version for system without that functionality. But of course proper working socket functions will be appreciated. https://sourceware.org/pipermail/cygwin/2021-January/247610.html a, b = _socket.socketpair(family, type, proto) SystemError: returned NULL without setting an error https://sourceware.org/pipermail/cygwin/2021-January/247679.html Regards Marco