python fails asyncio tests (py 3.7 & 3.8)

Jim Bell
Sun Nov 22 00:13:14 GMT 2020

On 2020-11-21 5:59 AM, Jim Bell wrote:
> The standard python asyncio tests hang.
>         cd /usr/lib/python3.8/test
>         python3.8 -v
> [...]

Using strace, stripping down this very repeatable test, and grabbing the 
source-code snapshot, it looks like winsup/cygwin/ 
socket_cleanup() is waiting forever for the thread to go away.


   121 6732185 [main] python3.8 13329 select_stuff::cleanup: calling 
cleanup rout
   178 6732363 [main] python3.8 13329 socket_cleanup: si 0x800290E10 
si->thread 0

But I don't see the select_printf("returning")  at, so 
the si->thread->detach() call seems to be blocked forever.  I don't see 
that we make it here either:  select_printf ("leaving thread_socket");

I see a bool stop_thread field in select_info, inherited by 
select_socket_info (select.h), used by other mechanisms. Seems that 
could be set by socket_cleanup() and used by thread_socket() to break 
out of its event loops ( lines 1660  and 1667);a=blob;f=winsup/cygwin/;hb=HEAD#l1796

More information about the Cygwin mailing list