[issue46417] Clear static types in Py_Finalize() for embedded Python

STINNER Victor report at bugs.python.org
Fri Jan 21 07:44:57 EST 2022


STINNER Victor <vstinner at python.org> added the comment:

> bpo-46417: Py_Finalize() clears static types (GH-30743)

Oh, test_unittest crashed on s390x Debian 3.x:
https://buildbot.python.org/all/#/builders/49/builds/1789

I fail to see the relationship between my change and this crash. I don't expect test_unittest to call Py_Finalize() and then Py_Initialize() again.

---
0:01:32 load avg: 4.77 [152/432/1] test_unittest crashed (Exit code -11) -- running: test_peg_generator (48.3 sec)
Fatal Python error: Segmentation fault

Current thread 0x000003ff89cf8720 (most recent call first):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/inspect.py", line 2179 in _signature_fromstr
  File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/inspect.py", line 2273 in _signature_from_builtin
  File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/inspect.py", line 2461 in _signature_from_callable
  File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/inspect.py", line 2465 in _signature_from_callable
  File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/inspect.py", line 2966 in from_callable
  File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/inspect.py", line 3218 in signature
  File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/unittest/mock.py", line 112 in _get_signature_object
  File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/unittest/mock.py", line 505 in _mock_add_spec
  File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/unittest/mock.py", line 487 in mock_add_spec
  File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/unittest/test/testmock/testmock.py", line 1767 in test_mock_add_spec
  File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/unittest/case.py", line 547 in _callTestMethod
  (...)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/test/regrtest.py", line 47 in <module>
  File "<frozen runpy>", line 88 in _run_code
  File "<frozen runpy>", line 198 in _run_module_as_main

Extension modules: _testcapi (total: 1)
---

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46417>
_______________________________________


More information about the Python-bugs-list mailing list