Skip to content

Python 3.14.0b2 in pip tests: Segmentation fault in mock __exit__ #135448

Closed as duplicate
@hroncok

Description

@hroncok

Crash report

What happened?

Run pip tests on Python 3.14.0b2. To reproduce without running pytest, you can do:

From cloned https://github.com/pypa/pip/tree/dd24396a68d8e8e9c487ca477404081a32272532 (current HEAD)

$ uv venv --python=python3.14d venv
$ . venv/bin/activate
$ uv pip install . virtualenv scripttest pytest
$ rm /tmp/something/ -rf
$ python -X dev -c 'import tests.unit.test_collector, pathlib; tests.unit.test_collector.test_get_index_content_directory_append_index(pathlib.Path("/tmp"))'
Fatal Python error: Segmentation fault

Current thread 0x00007ff2169a2740 [python] (most recent call first):
  File "/usr/lib64/python3.14/unittest/mock.py", line 1630 in __exit__
  File ".../pypa/pip/tests/unit/test_collector.py", line 869 in test_get_index_content_directory_append_index
  File "<string>", line 1 in <module>

Current thread's C stack trace (most recent call first):
  Binary file "/lib64/libpython3.14d.so.1.0", at _Py_DumpStack+0x54 [0x7ff21648a83b]
  Binary file "/lib64/libpython3.14d.so.1.0", at +0x4a5608 [0x7ff2164a5608]
  Binary file "/lib64/libpython3.14d.so.1.0", at +0x4a5a9c [0x7ff2164a5a9c]
  Binary file "/lib64/libc.so.6", at +0x1a050 [0x7ff215e27050]
  Binary file "/lib64/libpython3.14d.so.1.0", at PyObject_GetAttr+0x88 [0x7ff216178426]
  Binary file "/lib64/libpython3.14d.so.1.0", at _PyEval_EvalFrameDefault+0x28892 [0x7ff2162e4d0b]
  Binary file "/lib64/libpython3.14d.so.1.0", at +0x2b98e8 [0x7ff2162b98e8]
  Binary file "/lib64/libpython3.14d.so.1.0", at +0x2fd953 [0x7ff2162fd953]
  Binary file "/lib64/libpython3.14d.so.1.0", at PyEval_EvalCode+0x115 [0x7ff2162bc0e5]
  Binary file "/lib64/libpython3.14d.so.1.0", at +0x462281 [0x7ff216462281]
  Binary file "/lib64/libpython3.14d.so.1.0", at +0x462567 [0x7ff216462567]
  Binary file "/lib64/libpython3.14d.so.1.0", at +0x461ebc [0x7ff216461ebc]
  Binary file "/lib64/libpython3.14d.so.1.0", at +0x46049a [0x7ff21646049a]
  Binary file "/lib64/libpython3.14d.so.1.0", at +0x4a18e2 [0x7ff2164a18e2]
  Binary file "/lib64/libpython3.14d.so.1.0", at +0x4a2928 [0x7ff2164a2928]
  Binary file "/lib64/libpython3.14d.so.1.0", at Py_RunMain+0x3f [0x7ff2164a2afa]
  Binary file "/lib64/libpython3.14d.so.1.0", at +0x4a2bd0 [0x7ff2164a2bd0]
  Binary file "/lib64/libpython3.14d.so.1.0", at Py_BytesMain+0x4e [0x7ff2164a2c98]
  Binary file "python", at +0x117d [0x55e15615c17d]
  Binary file "/lib64/libc.so.6", at +0x3248 [0x7ff215e10248]
  Binary file "/lib64/libc.so.6", at __libc_start_main+0x8b [0x7ff215e1030b]
  Binary file "python", at _start+0x25 [0x55e15615c095]
Segmentation fault (core dumped)

CPython versions tested on:

3.14

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

Python 3.14.0b2 (main, May 26 2025, 00:00:00) [GCC 14.3.1 20250523 (Red Hat 14.3.1-1)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions