https://github.com/YannickJadoul/pybind11/commit/727b3aeda951f40d7019d2b189edc3b1184764e0 test -c dbg --config=tsan -- test_gil_scoped.py -- Test started at 2020-12-28 18:23:49 PST -- ----------------------------------------------------------------------------- ============================= test session starts ============================== platform linux -- Python 3.6.12, pytest-4.3.0, py-1.8.0, pluggy-0.9.0 cachedir: tmp rootdir: pybind11/tests, inifile: pytest.ini collected 5 items test_gil_scoped.py ==459==ThreadSanitizer: starting new threads after multi-threaded fork is not supported. Dying (set die_after_fork=0 to override) F==460==ThreadSanitizer: starting new threads after multi-threaded fork is not supported. Dying (set die_after_fork=0 to override) F==461==ThreadSanitizer: starting new threads after multi-threaded fork is not supported. Dying (set die_after_fork=0 to override) F.. [100%] =================================== FAILURES =================================== ___________________ test_python_to_cpp_to_python_from_thread ___________________ def test_python_to_cpp_to_python_from_thread(): """Makes sure there is no GIL deadlock when running in a thread. It runs in a separate process to be able to stop and assert if it deadlocks. """ > assert _run_in_process(_python_to_cpp_to_python_from_threads, 1) == 0 E assert 66 == 0 E + where 66 = _run_in_process(_python_to_cpp_to_python_from_threads, 1) test_gil_scoped.py:60: AssertionError __________ test_python_to_cpp_to_python_from_thread_multiple_parallel __________ def test_python_to_cpp_to_python_from_thread_multiple_parallel(): """Makes sure there is no GIL deadlock when running in a thread multiple times in parallel. It runs in a separate process to be able to stop and assert if it deadlocks. """ > assert _run_in_process(_python_to_cpp_to_python_from_threads, 8, parallel=True) == 0 E assert 66 == 0 E + where 66 = _run_in_process(_python_to_cpp_to_python_from_threads, 8, parallel=True) test_gil_scoped.py:69: AssertionError _________ test_python_to_cpp_to_python_from_thread_multiple_sequential _________ def test_python_to_cpp_to_python_from_thread_multiple_sequential(): """Makes sure there is no GIL deadlock when running in a thread multiple times sequentially. It runs in a separate process to be able to stop and assert if it deadlocks. """ > assert ( _run_in_process(_python_to_cpp_to_python_from_threads, 8, parallel=False) == 0 ) E assert 66 == 0 E + where 66 = _run_in_process(_python_to_cpp_to_python_from_threads, 8, parallel=False) test_gil_scoped.py:78: AssertionError ====================== 3 failed, 2 passed in 0.75 seconds ======================