To the Python maintainer and anyone else testing Python 3.12:

A few weeks ago, the python developer requested help with evaluating the Python 3.12 release.
I downloaded the python312-test package, and worked out that
python -m test.test_threading -v
failed during the second test in the file, sometimes with an immediate segfault, sometimes by hanging until I tried to attach gdb, which immediately reported an empty stack and a null stack pointer.

Adding print calls to the test narrowed the point of failure to some time during thread cleanup, so I ran the test under gdb, adding breakpoints to pthread_exit and pthread::exit, which caught the test before the segfault, and displayed a stack working back to pthread_wrapper, whose caller was set to null.  Stepping through the function eventually reached a call to ExitThread, then the
segfault with no reported stack.

My current guess is that ExitThread somehow returns, leading to control falling off the end of pthread_wrapper and failing to return.  (This is rather more sensible than my previous guess that Python had somehow managed to call the NULL pointer recursively, and not noticed until gdb took a look at things)  I suppose I could try to compile Cygwin with an error message after
ExitThread to see if that prints, but I am otherwise out of ideas.

I first checked this around January on a Windows 10 machine from 2016, then on a machine from
within the last year that is says it is also Windows 10.

I hope this helps


--
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

Reply via email to