public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Mark Geisert <mark@maxrnd.com>
To: cygwin-apps@cygwin.com
Subject: python fails asyncio tests (py 3.7 & 3.8)
Date: Thu, 17 Dec 2020 01:20:28 -0800	[thread overview]
Message-ID: <bea0a2a2-b755-3436-2ffb-76c6a97cbe3d@maxrnd.com> (raw)

Hi Marco,
Below is the patch I developed to work around the problem report in
https://cygwin.com/pipermail/cygwin/2020-November/246830.html
I called the patch file 3.8.3-peercred-cygwin.patch.

I am unable to test the patch myself because of continuing problems building a new 
Python.  I don't know if my issues are due to being on latest Cygwin code vs 
3.1.7, or gcc 10.2 vs 9.3, or what.  Could you tell me what your build environment 
is like?  I'll try to duplicate it.

Test the patch by running a Python built with it on the example from the OP. 
Without the patch, the run would hang in the middle of the test script.  With the 
patch, it should quickly complete with 4 unrelated errors mentioning MSG_OOB.
Thanks & Regards,

..mark

--- origsrc/Python-3.8.3/Modules/socketmodule.c 2020-05-13 10:31:54.000000000-0700
+++ src/Python-3.8.3/Modules/socketmodule.c     2020-12-15 21:00:15.373059900-0800
@@ -1030,6 +1030,14 @@ init_sockobject(PySocketSockObject *s,
              }
          }
      }
+#ifdef __CYGWIN__
+    /* Temporarily work around AF_UNIX credential passing issues */
+    if (s->sock_family == AF_UNIX && s->sock_fd != -1) {
+        if (setsockopt(s->sock_fd, SOL_SOCKET, SO_PEERCRED, 0, 0) == -1) {
+            return -1;
+        }
+    }
+#endif
      return 0;
  }


             reply	other threads:[~2020-12-17  9:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17  9:20 Mark Geisert [this message]
2020-12-28 21:57 ` Marco Atzeri
2020-12-29  0:08   ` Mark Geisert
2020-12-29  5:41     ` Marco Atzeri
2020-12-29  6:20       ` 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=bea0a2a2-b755-3436-2ffb-76c6a97cbe3d@maxrnd.com \
    --to=mark@maxrnd.com \
    --cc=cygwin-apps@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).