gh-85934: Use getattr_static when adding mock spec by melwitt · Pull Request #22209 · python/cpython

0:00:18 load avg: 2.10 [ 18/427/1] test__xxsubinterpreters crashed (Exit code -6)

Fatal Python error: drop_gil: PyMUTEX_LOCK(gil->switch_mutex) failed
Python runtime state: initialized

Thread 0x00007fdc1efb44c0 (most recent call first):
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test__xxsubinterpreters.py", line 80 in clean_up_interpreters
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test__xxsubinterpreters.py", line 88 in tearDown
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/case.py", line [59](https://github.com/python/cpython/actions/runs/4988297478/jobs/8930880863?pr=22209#step:19:60)4 in _callTearDown
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/case.py", line 637 in run
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/case.py", line 690 in __call__
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/suite.py", line 122 in run
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/suite.py", line 84 in __call__
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/suite.py", line 122 in run
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/suite.py", line 84 in __call__
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/suite.py", line 122 in run
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/suite.py", line 84 in __call__
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/runner.py", line 240 in run
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/support/__init__.py", line 1115 in _run_suite
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/support/__init__.py", line 1241 in run_unittest
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/runtest.py", line 294 in _test_module
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/runtest.py", line 330 in _runtest_inner2
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/runtest.py", line 373 in _runtest_inner
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/runtest.py", line 232 in _runtest
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/runtest.py", line 278 in runtest
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/runtest_mp.py", line 98 in run_tests_worker
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/main.py", line 759 in _main
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/main.py", line 738 in main
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/main.py", line 802 in main
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/regrtest.py", line 43 in _main
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/regrtest.py", line 47 in <module>
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/runpy.py", line 88 in _run_code
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/runpy.py", line 198 in _run_module_as_main
Fatal Python error: Aborted

Thread 0x00007fdc1efb44c0 (most recent call first):
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test__xxsubinterpreters.py", line 80 in clean_up_interpreters
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test__xxsubinterpreters.py", line 88 in tearDown
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/case.py", line 594 in _callTearDown
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/case.py", line [63](https://github.com/python/cpython/actions/runs/4988297478/jobs/8930880863?pr=22209#step:19:64)7 in run
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/case.py", line 690 in __call__
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/suite.py", line 122 in run
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/suite.py", line 84 in __call__
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/suite.py", line 122 in run
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/suite.py", line 84 in __call__
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/suite.py", line 122 in run
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/suite.py", line 84 in __call__
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/runner.py", line 240 in run
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/support/__init__.py", line 1115 in _run_suite
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/support/__init__.py", line 1241 in run_unittest
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/runtest.py", line 294 in _test_module
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/runtest.py", line 330 in _runtest_inner2
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/runtest.py", line 3[73](https://github.com/python/cpython/actions/runs/4988297478/jobs/8930880863?pr=22209#step:19:74) in _runtest_inner
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/runtest.py", line 232 in _runtest
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/runtest.py", line 278 in runtest
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/runtest_mp.py", line 98 in run_tests_worker
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/main.py", line [75](https://github.com/python/cpython/actions/runs/4988297478/jobs/8930880863?pr=22209#step:19:76)9 in _main
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/main.py", line 738 in main
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/libregrtest/main.py", line [80](https://github.com/python/cpython/actions/runs/4988297478/jobs/8930880863?pr=22209#step:19:81)2 in main
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/regrtest.py", line 43 in _main
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/regrtest.py", line 47 in <module>
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/runpy.py", line 88 in _run_code
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/runpy.py", line 198 in _run_module_as_main

Extension modules: _testcapi, _xxsubinterpreters (total: 2)