[Replying to myself...]
Mark Geisert wrote:
Jim Bell wrote:
On 2020-11-21 5:59 AM, Jim Bell wrote:
The standard python asyncio tests hang.
cd /usr/lib/python3.8/test
python3.8 test_asyncore.py -v
[...]
Using strace, stripping down this very repeatable test, and grabbing the
source-code snapshot, it looks like winsup/cygwin/select.cc socket_cleanup() is
waiting forever for the thread to go away.
strace:
121 6732185 [main] python3.8 13329 select_stuff::cleanup: calling cleanup
rout
ines
178 6732363 [main] python3.8 13329 socket_cleanup: si 0x800290E10 si->thread 0
x18023E758
-
[...]
Thanks for the report and especially for the initial debugging you've done. I've
reproduced the issue on my test machine. No need to supply 'cygcheck -svr' at
this point. I'll investigate this further and keep you posted (on the Cygwin
mailing list).
The problem is actually further down in the guts of Cygwin's Unix Domain Socket
handling. Specifically it has to do with the credential passing between client
and server ends of a connection as part of its setup. There is a workaround for
this problem that involves turning off socket option SO_PEERCRED on both the
connecting and listening sockets.
Unfortunately there's another problem. With the current Cygwin DLL build you'll
get an EINVAL error trying to do that setsockopt() operation. I have submitted a
patch that fixes this 2nd problem. A future Cygwin snapshot TBA will contain this
patch.
As for the test script errors you reported, I can submit a workaround patch that
would make its way into the Python3.8 tests. I am unsure at the moment which
Cygwin package contains those tests but I can figure that out. Otherwise, I could
tell you what needs to be patched in test_asyncore.py and you could edit the
script yourself to fix this locally for yourself.
Let me know how you'd like to proceed, when you have a chance.
..mark
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple