random hangs

Robert Terzi rct+cygwin@r-t.org
Fri Jan 3 20:47:00 GMT 2025


On 1/3/2025 2:45 PM, Jeremy Drake via Cygwin wrote:
> There are known (and as yet unknown) hang issues with cygwin 3.5.5, the
> known being in signal handling.  You might try with cygwin 3.5.4 to see if
> your hang issues go away.  That might help elimiate python as the culprit.

I'm seeing reproducible (for me) hangs with the test Python 3.12 packages under Cygwin 3.5.4.

$ cygcheck -c | grep cyg
base-cygwin                                3.8-2                          OK
cygrunsrv                                  1.64-1                         OK
cygutils                                   1.4.17-1                       OK
cygutils-extra                             1.4.17-1                       OK
cygwin                                     3.5.4-1                        OK
cygwin-devel                               3.5.4-1                        OK


First, I see a hang doing `python312 -m pip install ipython` in a venv.
The hang occurs during downloading. If the package is already downloaded
it doesn't hang. So I'm doing a `pip cache purge` to get it to reoccur.

It usually hangs on downloading Jedi which is a large-ish module.

   Downloading jedi-0.19.2-py2.py3-none-any.whl (1.6 MB)
      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/1.6 MB ? eta -:--:--

If I do an end task and try again, it sometimes hangs on the next
package > 1 MB:

   Downloading pygments-2.18.0-py3-none-any.whl (1.2 MB)
      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/1.2 MB ? eta -:--:--

Second, Once I get IPython installed, it hangs as soon as I hit enter
at the first prompt. (The input I give is empty, I just hit enter.)
However, if I type `quit` it will exit without hanging.

In both cases strace indicates it's stuck in a loop dealing with an
exception, exception c0000005 at 0000000000000000

(Is that maybe a null pointer deref in a signal/exception handler?)


Steps I'm taking are:
# clean up from previous runs
rm -rf /srv/pyvenvs/py312
pip3 cache purge


# Create a venv in an empty directory
python3.12 -m venv --system-site-packages --without-pip /srv/pyvenvs/py312

(The --without-pip is needed because it fails without it running `-m ensurepip`
It is looking for the pip wheel but not finding it.)

# activate venv and Install IPython
source /srv/pyvenvs/py312/bin/activate
python -m pip install ipython

# When it hangs, end task and then repeat `pip install` until it succeeds.

# Run IPython, hit enter at first prompt

$ ipython
Python 3.12.8 (main, Dec 28 2024, 22:01:20) [GCC 12.4.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.31.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]:

# it's now hung and only task manager "End Task" will kill it.




More information about the Cygwin mailing list