public inbox for cygwin-developers@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-developers@cygwin.com
Subject: Re: python fails asyncio tests (py 3.7 & 3.8)
Date: Thu, 3 Dec 2020 10:28:46 +0100	[thread overview]
Message-ID: <20201203092846.GZ303847@calimero.vinschen.de> (raw)
In-Reply-To: <Pine.BSF.4.63.2012022251030.59003@m0.truegem.net>

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

  reply	other threads:[~2020-12-03  9:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02  9:01 Mark Geisert
2020-12-02 13:38 ` Corinna Vinschen
2020-12-03  2:09   ` Mark Geisert
2020-12-03  6:57     ` Mark Geisert
2020-12-03  9:28       ` Corinna Vinschen [this message]
2021-02-01 10:17         ` Marco Atzeri

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=20201203092846.GZ303847@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin-developers@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).