Skip to content

Python loader segfaults on FreeBSD #803

@yug105

Description

@yug105

Here is the full logs of the helgrind on freebsd

[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from metacall_python_async_test
[ RUN      ] metacall_python_async_test.DefaultConstructor
[Sat May 30 04:31:33] #100080 @Error : Backtrace plugin failed to load, you need unwind/libunwind for stacktracing and libbfd/libdw/libdwarf for the debug information. Install the required libraries and recompile to utilise the backtrace plugin. 
For more information visit https://github.com/bombela/backward-cpp
[Sat May 30 04:31:34] #100080 @Error : Error when loading handle: plugins/backtrace_plugin/backtrace_plugin
[Sat May 30 04:31:34] #100080 @Error : Loader load from configuration invalid load from file
[Sat May 30 04:31:34] #100080 @Error : Failed to load plugin: /home/runner/work/core/core/build/plugins/backtrace_plugin/metacall.json
==4198== ---Thread-Announcement------------------------------------------
==4198== 
==4198== Thread #1 is the program's root thread
==4198== 
==4198== ----------------------------------------------------------------
==4198== 
==4198== Thread #1's call to sem_trywait failed
==4198==    with error code 35 (EAGAIN: Try again)
==4198==    at 0x485B873: sem_trywait_WRK (hg_intercepts.c:3318)
==4198==    by 0x6006FB4: PyThread_acquire_lock_timed (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x608233B: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x608269E: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5EA71DD: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5E99938: PyObject_Vectorcall (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F8FBD4: _PyEval_EvalFrameDefault (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F98364: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5E9932B: _PyObject_FastCallDictTstate (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5E9A0B7: _PyObject_Call_Prepend (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F0BA3F: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F12F7A: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5E99128: _PyObject_MakeTpCall (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F8FBD4: _PyEval_EvalFrameDefault (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F88F90: PyEval_EvalCode (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F849EE: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5EEE52D: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F911D7: _PyEval_EvalFrameDefault (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F98364: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5E9B640: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5E9B46F: PyObject_CallMethodObjArgs (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5FCAEFF: PyImport_ImportModuleLevelObject (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F9291B: _PyEval_EvalFrameDefault (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F88F90: PyEval_EvalCode (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F849EE: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F926C9: _PyEval_EvalFrameDefault (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F98364: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5E9B640: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5E9B46F: PyObject_CallMethodObjArgs (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5FCAEFF: PyImport_ImportModuleLevelObject (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F9291B: _PyEval_EvalFrameDefault (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F88F90: PyEval_EvalCode (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5FCCB05: PyImport_ExecCodeModuleObject (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5FCC9E4: PyImport_ExecCodeModule (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x62D6323: py_loader_impl_load_from_memory_compile (source/loaders/py_loader/source/py_loader_impl.c:3080)
==4198==    by 0x62D6323: py_loader_impl_initialize_import (source/loaders/py_loader/source/py_loader_impl.c:2164)
==4198==    by 0x62D6A40: py_loader_impl_initialize (source/loaders/py_loader/source/py_loader_impl.c:2540)
==4198==    by 0x489F129: loader_impl_initialize (source/loader/source/loader_impl.c:756)
==4198==    by 0x489FC2B: loader_impl_load_from_memory (source/loader/source/loader_impl.c:1387)
==4198==    by 0x489DB00: loader_load_from_memory (source/loader/source/loader.c:374)
==4198==    by 0x276A35: metacall_python_async_test_DefaultConstructor_Test::TestBody() (source/tests/metacall_python_async_test/source/metacall_python_async_test.cpp:65)
==4198==    by 0x2D42CA: void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2AB679: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x28CD58: testing::Test::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x28D6D7: testing::TestInfo::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x28DED8: testing::TestSuite::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x29C2B1: testing::internal::UnitTestImpl::RunAllTests() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2DCA7A: bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2ADD59: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x29BE70: testing::UnitTest::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2768D0: RUN_ALL_TESTS (src/google-test-depends/googletest/include/gtest/gtest.h:2334)
==4198==    by 0x2768D0: main (source/tests/metacall_python_async_test/source/main.cpp:27)
==4198== 
==4198== ---Thread-Announcement------------------------------------------
==4198== 
==4198== Thread #2 was created
==4198==    at 0x4B9145A: thr_new (in /lib/libc.so.7)
==4198==    by 0x48BD790: pthread_create (in /lib/libthr.so.3)
==4198==    by 0x4857C01: pthread_create_WRK (hg_intercepts.c:449)
==4198==    by 0x6006CD2: PyThread_start_new_thread (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x6082928: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5EEEA87: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5E99128: _PyObject_MakeTpCall (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F8FBD4: _PyEval_EvalFrameDefault (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F98364: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x62D60F0: py_loader_impl_initialize_asyncio_module (source/loaders/py_loader/source/py_loader_impl.c:1959)
==4198==    by 0x62D6A70: py_loader_impl_initialize (source/loaders/py_loader/source/py_loader_impl.c:2563)
==4198==    by 0x489F129: loader_impl_initialize (source/loader/source/loader_impl.c:756)
==4198==    by 0x489FC2B: loader_impl_load_from_memory (source/loader/source/loader_impl.c:1387)
==4198==    by 0x489DB00: loader_load_from_memory (source/loader/source/loader.c:374)
==4198==    by 0x276A35: metacall_python_async_test_DefaultConstructor_Test::TestBody() (source/tests/metacall_python_async_test/source/metacall_python_async_test.cpp:65)
==4198==    by 0x2D42CA: void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2AB679: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x28CD58: testing::Test::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x28D6D7: testing::TestInfo::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x28DED8: testing::TestSuite::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x29C2B1: testing::internal::UnitTestImpl::RunAllTests() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2DCA7A: bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2ADD59: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x29BE70: testing::UnitTest::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2768D0: RUN_ALL_TESTS (src/google-test-depends/googletest/include/gtest/gtest.h:2334)
==4198==    by 0x2768D0: main (source/tests/metacall_python_async_test/source/main.cpp:27)
==4198== 
==4198== ----------------------------------------------------------------
==4198== 
==4198== Thread #2's call to sem_trywait failed
==4198==    with error code 35 (EAGAIN: Try again)
==4198==    at 0x485B873: sem_trywait_WRK (hg_intercepts.c:3318)
==4198==    by 0x6006FB4: PyThread_acquire_lock_timed (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x608233B: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x608269E: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5EA71DD: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5E99938: PyObject_Vectorcall (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F8FBD4: _PyEval_EvalFrameDefault (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5F98364: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5E9CE5F: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x60832C0: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x6006D33: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x4862336: mythread_wrapper (hg_intercepts.c:410)
==4198==    by 0x48BDB04: ??? (in /lib/libthr.so.3)
==4198== 
sync message 92274752
thread 0x5800040
inside my sleep async 95778720 : 2
inside my sleep fail async 95778720 : 2
thread 0x5b577a0
Got into C callback at least
Resolve C Callback
thread 0x5b577a0
Got into C callback at least
Resolve C Callback
==4198== ----------------------------------------------------------------
==4198== 
==4198== Possible data race during write of size 8 at 0x613D580 by thread #1
==4198== Locks held: none
==4198==    at 0x5FEDA0F: _PyRuntimeState_Fini (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5FEAE8B: Py_FinalizeEx (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x62D7E6F: py_loader_impl_finalize (source/loaders/py_loader/source/py_loader_impl.c:4056)
==4198==    by 0x62D7E6F: py_loader_impl_destroy (source/loaders/py_loader/source/py_loader_impl.c:4219)
==4198==    by 0x48A0C7A: loader_impl_destroy (source/loader/source/loader_impl.c:1885)
==4198==    by 0x4893E58: plugin_destructor (source/plugin/source/plugin_impl.c:110)
==4198==    by 0x489E755: loader_unload_children (source/loader/source/loader.c:773)
==4198==    by 0x489E7F0: loader_destroy (source/loader/source/loader.c:820)
==4198==    by 0x48A17A1: metacall_destroy (source/metacall/source/metacall.c:2374)
==4198==    by 0x2770A3: metacall_python_async_test_DefaultConstructor_Test::TestBody() (source/tests/metacall_python_async_test/source/metacall_python_async_test.cpp:163)
==4198==    by 0x2D42CA: void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2AB679: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x28CD58: testing::Test::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x28D6D7: testing::TestInfo::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x28DED8: testing::TestSuite::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x29C2B1: testing::internal::UnitTestImpl::RunAllTests() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2DCA7A: bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2ADD59: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x29BE70: testing::UnitTest::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2768D0: RUN_ALL_TESTS (src/google-test-depends/googletest/include/gtest/gtest.h:2334)
==4198==    by 0x2768D0: main (source/tests/metacall_python_async_test/source/main.cpp:27)
==4198== 
==4198== This conflicts with a previous read of size 8 by thread #2
==4198== Locks held: none
==4198==    at 0x608341F: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x6006D33: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x4862336: mythread_wrapper (hg_intercepts.c:410)
==4198==    by 0x48BDB04: ??? (in /lib/libthr.so.3)
==4198==  Address 0x613d580 is in the Data segment of /usr/local/lib/libpython3.11.so.1.0
==4198== 
==4198== ----------------------------------------------------------------
==4198== 
==4198== Possible data race during write of size 8 at 0x613D5A0 by thread #1
==4198== Locks held: none
==4198==    at 0x5FEDA4B: _PyRuntimeState_Fini (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x5FEAE8B: Py_FinalizeEx (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x62D7E6F: py_loader_impl_finalize (source/loaders/py_loader/source/py_loader_impl.c:4056)
==4198==    by 0x62D7E6F: py_loader_impl_destroy (source/loaders/py_loader/source/py_loader_impl.c:4219)
==4198==    by 0x48A0C7A: loader_impl_destroy (source/loader/source/loader_impl.c:1885)
==4198==    by 0x4893E58: plugin_destructor (source/plugin/source/plugin_impl.c:110)
==4198==    by 0x489E755: loader_unload_children (source/loader/source/loader.c:773)
==4198==    by 0x489E7F0: loader_destroy (source/loader/source/loader.c:820)
==4198==    by 0x48A17A1: metacall_destroy (source/metacall/source/metacall.c:2374)
==4198==    by 0x2770A3: metacall_python_async_test_DefaultConstructor_Test::TestBody() (source/tests/metacall_python_async_test/source/metacall_python_async_test.cpp:163)
==4198==    by 0x2D42CA: void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2AB679: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x28CD58: testing::Test::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x28D6D7: testing::TestInfo::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x28DED8: testing::TestSuite::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x29C2B1: testing::internal::UnitTestImpl::RunAllTests() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2DCA7A: bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2ADD59: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x29BE70: testing::UnitTest::Run() (in /home/runner/work/core/core/build/metacall-python-async-test)
==4198==    by 0x2768D0: RUN_ALL_TESTS (src/google-test-depends/googletest/include/gtest/gtest.h:2334)
==4198==    by 0x2768D0: main (source/tests/metacall_python_async_test/source/main.cpp:27)
==4198== 
==4198== This conflicts with a previous read of size 8 by thread #2
==4198== Locks held: none
==4198==    at 0x6083418: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x6006D33: ??? (in /usr/local/lib/libpython3.11.so.1.0)
==4198==    by 0x4862336: mythread_wrapper (hg_intercepts.c:410)
==4198==    by 0x48BDB04: ??? (in /lib/libthr.so.3)
==4198==  Address 0x613d5a0 is in the Data segment of /usr/local/lib/libpython3.11.so.1.0
==4198== 
[       OK ] metacall_python_async_test.DefaultConstructor (7805 ms)
[----------] 1 test from metacall_python_async_test (7812 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (7845 ms total)
[  PASSED  ] 1 test.
==4198== ----------------------------------------------------------------
==4198== 
==4198== Possible data race during write of size 8 at 0x4C48388 by thread #1
==4198== Locks held: none
==4198==    at 0x4BBE5C6: ??? (in /lib/libc.so.7)
==4198==    by 0x4011E75: ??? (in /libexec/ld-elf.so.1)
==4198==    by 0x400AF58: ??? (in /libexec/ld-elf.so.1)
==4198==    by 0x4BBDF83: __cxa_finalize (in /lib/libc.so.7)
==4198==    by 0x4BBE4DB: exit (in /lib/libc.so.7)
==4198==    by 0x4858564: exit_WRK (hg_intercepts.c:955)
==4198==    by 0x4858564: exit (hg_intercepts.c:961)
==4198==    by 0x4ADEC40: __libc_start1 (in /lib/libc.so.7)
==4198==    by 0x27683F: (below main) (crt1_s.S:83)
==4198== 
==4198== This conflicts with a previous read of size 8 by thread #2
==4198== Locks held: none
==4198==    at 0x4BBE689: getenv (in /lib/libc.so.7)
==4198==    by 0x4A4D833: ??? (in /lib/libgcc_s.so.1)
==4198==    by 0x4A4D33F: _Unwind_ForcedUnwind (in /lib/libgcc_s.so.1)
==4198==    by 0x48BE1EB: ??? (in /lib/libthr.so.3)
==4198==    by 0x48BE168: ??? (in /lib/libthr.so.3)
==4198==    by 0x48BE01A: pthread_exit (in /lib/libthr.so.3)
==4198==    by 0x48BDB0C: ??? (in /lib/libthr.so.3)
==4198==  Address 0x4c48388 is in the BSS segment of /lib/libc.so.7
==4198== 
==4198== ----------------------------------------------------------------
==4198== 
==4198== Possible data race during write of size 8 at 0x2E7520 by thread #1
==4198== Locks held: none
==4198==    at 0x4BBE5F0: ??? (in /lib/libc.so.7)
==4198==    by 0x4011E75: ??? (in /libexec/ld-elf.so.1)
==4198==    by 0x400AF58: ??? (in /libexec/ld-elf.so.1)
==4198==    by 0x4BBDF83: __cxa_finalize (in /lib/libc.so.7)
==4198==    by 0x4BBE4DB: exit (in /lib/libc.so.7)
==4198==    by 0x4858564: exit_WRK (hg_intercepts.c:955)
==4198==    by 0x4858564: exit (hg_intercepts.c:961)
==4198==    by 0x4ADEC40: __libc_start1 (in /lib/libc.so.7)
==4198==    by 0x27683F: (below main) (crt1_s.S:83)
==4198== 
==4198== This conflicts with a previous read of size 8 by thread #2
==4198== Locks held: none
==4198==    at 0x4BBE671: getenv (in /lib/libc.so.7)
==4198==    by 0x4A4D833: ??? (in /lib/libgcc_s.so.1)
==4198==    by 0x4A4D33F: _Unwind_ForcedUnwind (in /lib/libgcc_s.so.1)
==4198==    by 0x48BE1EB: ??? (in /lib/libthr.so.3)
==4198==    by 0x48BE168: ??? (in /lib/libthr.so.3)
==4198==    by 0x48BE01A: pthread_exit (in /lib/libthr.so.3)
==4198==    by 0x48BDB0C: ??? (in /lib/libthr.so.3)
==4198==  Address 0x2e7520 is 0 bytes inside data symbol "environ"
==4198== 
==4198== ----------------------------------------------------------------
==4198== 
==4198== Possible data race during write of size 8 at 0x4C48390 by thread #1
==4198== Locks held: none
==4198==    at 0x4BBE5F8: ??? (in /lib/libc.so.7)
==4198==    by 0x4011E75: ??? (in /libexec/ld-elf.so.1)
==4198==    by 0x400AF58: ??? (in /libexec/ld-elf.so.1)
==4198==    by 0x4BBDF83: __cxa_finalize (in /lib/libc.so.7)
==4198==    by 0x4BBE4DB: exit (in /lib/libc.so.7)
==4198==    by 0x4858564: exit_WRK (hg_intercepts.c:955)
==4198==    by 0x4858564: exit (hg_intercepts.c:961)
==4198==    by 0x4ADEC40: __libc_start1 (in /lib/libc.so.7)
==4198==    by 0x27683F: (below main) (crt1_s.S:83)
==4198== 
==4198== This conflicts with a previous read of size 8 by thread #2
==4198== Locks held: none
==4198==    at 0x4BBE699: getenv (in /lib/libc.so.7)
==4198==    by 0x4A4D833: ??? (in /lib/libgcc_s.so.1)
==4198==    by 0x4A4D33F: _Unwind_ForcedUnwind (in /lib/libgcc_s.so.1)
==4198==    by 0x48BE1EB: ??? (in /lib/libthr.so.3)
==4198==    by 0x48BE168: ??? (in /lib/libthr.so.3)
==4198==    by 0x48BE01A: pthread_exit (in /lib/libthr.so.3)
==4198==    by 0x48BDB0C: ??? (in /lib/libthr.so.3)
==4198==  Address 0x4c48390 is in the BSS segment of /lib/libc.so.7
==4198== 
==4198== 
==4198== Use --history-level=approx or =none to gain increased speed, at
==4198== the cost of reduced accuracy of conflicting-access information
==4198== For lists of detected and suppressed errors, rerun with: -s
==4198== ERROR SUMMARY: 10 errors from 7 contexts (suppressed: 7787 from 200)
runner@runnervm3jyl0:~/work/core/core$
  • On FreeBSD 14.2 (x86-64)
  • Under Release or RelWithDebInfo builds
  • With parallel execution via ctest (running a single test under GDB masks the race condition, causing it to pass)

Steps to Reproduce

  • Spin up a FreeBSD 14.2 environment.

  • Compile metacall/core in Release or RelWithDebInfo mode.

  • Run the test suite via ctest in parallel.

  • Observe the segmentation faults at the end of the Python tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions