python fails asyncio tests (py 3.7 & 3.8)

Mark Geisert mark@maxrnd.com
Thu Dec 3 02:09:23 GMT 2020


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


More information about the Cygwin-developers mailing list