https://github.com/YannickJadoul/pybind11/commit/727b3aeda951f40d7019d2b189edc3b1184764e0 test -c dbg --config=tsan -- test_iostream.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 13 items test_iostream.py ............================== WARNING: ThreadSanitizer: data race (pid=444) Read of size 8 at 0x7b1c000cc540 by thread T8: #0 std::__tsan::basic_streambuf >::xsputn(char const*, long) llvm/llvm-project/libcxx/include/streambuf:462:13 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3bf1beb) #1 std::__tsan::basic_streambuf >::sputn(char const*, long) crosstool/v18/stable/toolchain/bin/../include/c++/v1/streambuf:229:14 (pybind11_tests.abi3.so+0x43d992) #2 std::__tsan::ostreambuf_iterator > std::__tsan::__pad_and_output >(std::__tsan::ostreambuf_iterator >, char const*, char const*, char const*, std::__tsan::ios_base&, char) crosstool/v18/stable/toolchain/bin/../include/c++/v1/locale:1407:26 (pybind11_tests.abi3.so+0x43d749) #3 std::__tsan::basic_ostream >& std::__tsan::__put_character_sequence >(std::__tsan::basic_ostream >&, char const*, unsigned long) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:729:17 (pybind11_tests.abi3.so+0x43d57e) #4 std::__tsan::basic_ostream >& std::__tsan::operator<< >(std::__tsan::basic_ostream >&, char const*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:868:12 (pybind11_tests.abi3.so+0x4d91ab) #5 TestThread::TestThread()::'lambda'()::operator()() const pybind11/tests/test_iostream.cpp:40:27 (pybind11_tests.abi3.so+0x63520e) #6 decltype(std::__tsan::forward(fp)()) std::__tsan::__invoke(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/type_traits:3750:1 (pybind11_tests.abi3.so+0x635161) #7 void std::__tsan::__thread_execute >, TestThread::TestThread()::'lambda'()>(std::__tsan::tuple >, TestThread::TestThread()::'lambda'()>&, std::__tsan::__tuple_indices<>) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:280:5 (pybind11_tests.abi3.so+0x635119) #8 void* std::__tsan::__thread_proxy >, TestThread::TestThread()::'lambda'()> >(void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:291:5 (pybind11_tests.abi3.so+0x634dfa) Previous write of size 8 at 0x7b1c000cc540 by thread T6: #0 std::__tsan::basic_streambuf >::xsputn(char const*, long) llvm/llvm-project/libcxx/include/streambuf:473:21 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3bf1bca) #1 std::__tsan::basic_streambuf >::sputn(char const*, long) crosstool/v18/stable/toolchain/bin/../include/c++/v1/streambuf:229:14 (pybind11_tests.abi3.so+0x43d992) #2 std::__tsan::ostreambuf_iterator > std::__tsan::__pad_and_output >(std::__tsan::ostreambuf_iterator >, char const*, char const*, char const*, std::__tsan::ios_base&, char) crosstool/v18/stable/toolchain/bin/../include/c++/v1/locale:1407:26 (pybind11_tests.abi3.so+0x43d749) #3 std::__tsan::basic_ostream >& std::__tsan::__put_character_sequence >(std::__tsan::basic_ostream >&, char const*, unsigned long) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:729:17 (pybind11_tests.abi3.so+0x43d57e) #4 std::__tsan::basic_ostream >& std::__tsan::operator<< >(std::__tsan::basic_ostream >&, char const*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:868:12 (pybind11_tests.abi3.so+0x4d91ab) #5 TestThread::TestThread()::'lambda'()::operator()() const pybind11/tests/test_iostream.cpp:40:27 (pybind11_tests.abi3.so+0x63520e) #6 decltype(std::__tsan::forward(fp)()) std::__tsan::__invoke(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/type_traits:3750:1 (pybind11_tests.abi3.so+0x635161) #7 void std::__tsan::__thread_execute >, TestThread::TestThread()::'lambda'()>(std::__tsan::tuple >, TestThread::TestThread()::'lambda'()>&, std::__tsan::__tuple_indices<>) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:280:5 (pybind11_tests.abi3.so+0x635119) #8 void* std::__tsan::__thread_proxy >, TestThread::TestThread()::'lambda'()> >(void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:291:5 (pybind11_tests.abi3.so+0x634dfa) Location is heap block of size 112 at 0x7b1c000cc500 allocated by main thread: #0 operator new(unsigned long) llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_new_delete.cpp:64:3 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5d499) #1 pybind11::detail::OstreamRedirect::enter() pybind11/include/pybind11/iostream.h:171:35 (pybind11_tests.abi3.so+0x62df8d) #2 pybind11::cpp_function::cpp_function(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*)::operator()(pybind11::detail::OstreamRedirect*) const pybind11/include/pybind11/pybind11.h:84:66 (pybind11_tests.abi3.so+0x630f39) #3 void pybind11::detail::argument_loader::call_impl(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*)&, 0ul, pybind11::detail::void_type>(pybind11::detail::OstreamRedirect&&, std::__tsan::integer_sequence, pybind11::name&&) && pybind11/include/pybind11/cast.h:2033:16 (pybind11_tests.abi3.so+0x630e93) #4 std::__tsan::enable_if::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader::call(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*)&>(&&) && pybind11/include/pybind11/cast.h:2010:35 (pybind11_tests.abi3.so+0x630bab) #5 void pybind11::cpp_function::initialize(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*), void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(void&&, pybind11::detail::OstreamRedirect (*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const pybind11/include/pybind11/pybind11.h:186:52 (pybind11_tests.abi3.so+0x630a54) #6 void pybind11::cpp_function::initialize(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*), void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(void&&, pybind11::detail::OstreamRedirect (*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::function_call&)::__invoke(pybind11::detail::function_call&) pybind11/include/pybind11/pybind11.h:163:21 (pybind11_tests.abi3.so+0x6309b9) #7 pybind11::cpp_function::dispatcher(_object*, _object*, _object*) pybind11/include/pybind11/pybind11.h:751:30 (pybind11_tests.abi3.so+0x3ebc8a) #8 _PyCFunction_FastCallDict python_runtime/v3_6/Objects/methodobject.c:231:22 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x383173e) #9 devtools::python_launcher::RunMainFromImporter(char const*, int (*)(char const*)) devtools/python/launcher/launcher_common.cc:346:11 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34193f2) #10 devtools::python_launcher::Launcher_Main(int, char**, int (*)(int*, char**), int (*)(int*, char**), int (*)(char const*)) devtools/python/launcher/launcher_common.cc:594:14 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3418c1b) #11 devtools::python_launcher::HermeticLauncherMain(int, char**) devtools/python/launcher/hermetic_launcher_lib.cc:127:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34185b3) #12 main devtools/python/launcher/hermetic_launcher.cc:4:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5e5ae) Thread T8 (tid=461, running) created by main thread at: #0 pthread_create llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:969:3 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1be870a) #1 std::__tsan::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/__threading_support:506:10 (pybind11_tests.abi3.so+0x497fab) #2 std::__tsan::thread::thread(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:307:16 (pybind11_tests.abi3.so+0x634b63) #3 TestThread::TestThread() pybind11/tests/test_iostream.cpp:43:18 (pybind11_tests.abi3.so+0x634a15) #4 TestThread* pybind11::detail::initimpl::construct_or_initialize() pybind11/include/pybind11/detail/init.h:61:68 (pybind11_tests.abi3.so+0x634984) #5 void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)::operator()(pybind11::detail::value_and_holder&) const pybind11/include/pybind11/detail/init.h:175:31 (pybind11_tests.abi3.so+0x63491a) #6 pybind11::class_ pybind11::detail::argument_loader::call_impl::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&, 0ul, pybind11::detail::void_type>(&&, std::__tsan::integer_sequence, void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&) && pybind11/include/pybind11/cast.h:2033:16 (pybind11_tests.abi3.so+0x6348b3) #7 std::__tsan::enable_if >::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader::call::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&>(0&&) && pybind11/include/pybind11/cast.h:2010:35 (pybind11_tests.abi3.so+0x63484b) #8 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const pybind11/include/pybind11/pybind11.h:186:52 (pybind11_tests.abi3.so+0x6347a5) #9 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::__invoke(pybind11::detail::function_call&) pybind11/include/pybind11/pybind11.h:163:21 (pybind11_tests.abi3.so+0x634709) #10 pybind11::cpp_function::dispatcher(_object*, _object*, _object*) pybind11/include/pybind11/pybind11.h:751:30 (pybind11_tests.abi3.so+0x3ebc8a) #11 _PyCFunction_FastCallDict python_runtime/v3_6/Objects/methodobject.c:231:22 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x383173e) #12 _PyObject_FastCallDict python_runtime/v3_6/Objects/abstract.c:2331:18 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x37ec23b) #13 devtools::python_launcher::RunMainFromImporter(char const*, int (*)(char const*)) devtools/python/launcher/launcher_common.cc:346:11 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34193f2) #14 devtools::python_launcher::Launcher_Main(int, char**, int (*)(int*, char**), int (*)(int*, char**), int (*)(char const*)) devtools/python/launcher/launcher_common.cc:594:14 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3418c1b) #15 devtools::python_launcher::HermeticLauncherMain(int, char**) devtools/python/launcher/hermetic_launcher_lib.cc:127:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34185b3) #16 main devtools/python/launcher/hermetic_launcher.cc:4:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5e5ae) Thread T6 (tid=459, running) created by main thread at: #0 pthread_create llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:969:3 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1be870a) #1 std::__tsan::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/__threading_support:506:10 (pybind11_tests.abi3.so+0x497fab) #2 std::__tsan::thread::thread(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:307:16 (pybind11_tests.abi3.so+0x634b63) #3 TestThread::TestThread() pybind11/tests/test_iostream.cpp:43:18 (pybind11_tests.abi3.so+0x634a15) #4 TestThread* pybind11::detail::initimpl::construct_or_initialize() pybind11/include/pybind11/detail/init.h:61:68 (pybind11_tests.abi3.so+0x634984) #5 void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)::operator()(pybind11::detail::value_and_holder&) const pybind11/include/pybind11/detail/init.h:175:31 (pybind11_tests.abi3.so+0x63491a) #6 pybind11::class_ pybind11::detail::argument_loader::call_impl::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&, 0ul, pybind11::detail::void_type>(&&, std::__tsan::integer_sequence, void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&) && pybind11/include/pybind11/cast.h:2033:16 (pybind11_tests.abi3.so+0x6348b3) #7 std::__tsan::enable_if >::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader::call::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&>(0&&) && pybind11/include/pybind11/cast.h:2010:35 (pybind11_tests.abi3.so+0x63484b) #8 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const pybind11/include/pybind11/pybind11.h:186:52 (pybind11_tests.abi3.so+0x6347a5) #9 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::__invoke(pybind11::detail::function_call&) pybind11/include/pybind11/pybind11.h:163:21 (pybind11_tests.abi3.so+0x634709) #10 pybind11::cpp_function::dispatcher(_object*, _object*, _object*) pybind11/include/pybind11/pybind11.h:751:30 (pybind11_tests.abi3.so+0x3ebc8a) #11 _PyCFunction_FastCallDict python_runtime/v3_6/Objects/methodobject.c:231:22 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x383173e) #12 _PyObject_FastCallDict python_runtime/v3_6/Objects/abstract.c:2331:18 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x37ec23b) #13 devtools::python_launcher::RunMainFromImporter(char const*, int (*)(char const*)) devtools/python/launcher/launcher_common.cc:346:11 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34193f2) #14 devtools::python_launcher::Launcher_Main(int, char**, int (*)(int*, char**), int (*)(int*, char**), int (*)(char const*)) devtools/python/launcher/launcher_common.cc:594:14 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3418c1b) #15 devtools::python_launcher::HermeticLauncherMain(int, char**) devtools/python/launcher/hermetic_launcher_lib.cc:127:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34185b3) #16 main devtools/python/launcher/hermetic_launcher.cc:4:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5e5ae) SUMMARY: ThreadSanitizer: data race llvm/llvm-project/libcxx/include/streambuf:462:13 in std::__tsan::basic_streambuf >::xsputn(char const*, long) ================== ================== WARNING: ThreadSanitizer: data race (pid=444) Write of size 1 at 0x7b6000209400 by thread T8: #0 memcpy llvm/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:810:5 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1bf2e30) #1 std::__tsan::char_traits::copy(char*, char const*, unsigned long) llvm/llvm-project/libcxx/include/__string:386:56 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3bf1c29) #2 std::__tsan::basic_streambuf >::xsputn(char const*, long) llvm/llvm-project/libcxx/include/streambuf:472:13 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3bf1c29) #3 std::__tsan::basic_streambuf >::sputn(char const*, long) crosstool/v18/stable/toolchain/bin/../include/c++/v1/streambuf:229:14 (pybind11_tests.abi3.so+0x43d992) #4 std::__tsan::ostreambuf_iterator > std::__tsan::__pad_and_output >(std::__tsan::ostreambuf_iterator >, char const*, char const*, char const*, std::__tsan::ios_base&, char) crosstool/v18/stable/toolchain/bin/../include/c++/v1/locale:1407:26 (pybind11_tests.abi3.so+0x43d749) #5 std::__tsan::basic_ostream >& std::__tsan::__put_character_sequence >(std::__tsan::basic_ostream >&, char const*, unsigned long) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:729:17 (pybind11_tests.abi3.so+0x43d57e) #6 std::__tsan::basic_ostream >& std::__tsan::operator<< >(std::__tsan::basic_ostream >&, char const*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:868:12 (pybind11_tests.abi3.so+0x4d91ab) #7 TestThread::TestThread()::'lambda'()::operator()() const pybind11/tests/test_iostream.cpp:40:27 (pybind11_tests.abi3.so+0x63520e) #8 decltype(std::__tsan::forward(fp)()) std::__tsan::__invoke(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/type_traits:3750:1 (pybind11_tests.abi3.so+0x635161) #9 void std::__tsan::__thread_execute >, TestThread::TestThread()::'lambda'()>(std::__tsan::tuple >, TestThread::TestThread()::'lambda'()>&, std::__tsan::__tuple_indices<>) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:280:5 (pybind11_tests.abi3.so+0x635119) #10 void* std::__tsan::__thread_proxy >, TestThread::TestThread()::'lambda'()> >(void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:291:5 (pybind11_tests.abi3.so+0x634dfa) Previous write of size 1 at 0x7b6000209400 by thread T6: #0 memcpy llvm/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:810:5 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1bf2e30) #1 std::__tsan::char_traits::copy(char*, char const*, unsigned long) llvm/llvm-project/libcxx/include/__string:386:56 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3bf1c29) #2 std::__tsan::basic_streambuf >::xsputn(char const*, long) llvm/llvm-project/libcxx/include/streambuf:472:13 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3bf1c29) #3 std::__tsan::basic_streambuf >::sputn(char const*, long) crosstool/v18/stable/toolchain/bin/../include/c++/v1/streambuf:229:14 (pybind11_tests.abi3.so+0x43d992) #4 std::__tsan::ostreambuf_iterator > std::__tsan::__pad_and_output >(std::__tsan::ostreambuf_iterator >, char const*, char const*, char const*, std::__tsan::ios_base&, char) crosstool/v18/stable/toolchain/bin/../include/c++/v1/locale:1407:26 (pybind11_tests.abi3.so+0x43d749) #5 std::__tsan::basic_ostream >& std::__tsan::__put_character_sequence >(std::__tsan::basic_ostream >&, char const*, unsigned long) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:729:17 (pybind11_tests.abi3.so+0x43d57e) #6 std::__tsan::basic_ostream >& std::__tsan::operator<< >(std::__tsan::basic_ostream >&, char const*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:868:12 (pybind11_tests.abi3.so+0x4d91ab) #7 TestThread::TestThread()::'lambda'()::operator()() const pybind11/tests/test_iostream.cpp:40:27 (pybind11_tests.abi3.so+0x63520e) #8 decltype(std::__tsan::forward(fp)()) std::__tsan::__invoke(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/type_traits:3750:1 (pybind11_tests.abi3.so+0x635161) #9 void std::__tsan::__thread_execute >, TestThread::TestThread()::'lambda'()>(std::__tsan::tuple >, TestThread::TestThread()::'lambda'()>&, std::__tsan::__tuple_indices<>) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:280:5 (pybind11_tests.abi3.so+0x635119) #10 void* std::__tsan::__thread_proxy >, TestThread::TestThread()::'lambda'()> >(void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:291:5 (pybind11_tests.abi3.so+0x634dfa) Location is heap block of size 1024 at 0x7b6000209400 allocated by main thread: #0 operator new[](unsigned long) llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_new_delete.cpp:70:3 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5d599) #1 pybind11::detail::pythonbuf::pythonbuf(pybind11::object, unsigned long) pybind11/include/pybind11/iostream.h:70:20 (pybind11_tests.abi3.so+0x631288) #2 pybind11::scoped_ostream_redirect::scoped_ostream_redirect(std::__tsan::basic_ostream >&, pybind11::object) pybind11/include/pybind11/iostream.h:121:31 (pybind11_tests.abi3.so+0x6310bf) #3 pybind11::detail::OstreamRedirect::enter() pybind11/include/pybind11/iostream.h:171:39 (pybind11_tests.abi3.so+0x62dfd4) #4 pybind11::cpp_function::cpp_function(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*)::operator()(pybind11::detail::OstreamRedirect*) const pybind11/include/pybind11/pybind11.h:84:66 (pybind11_tests.abi3.so+0x630f39) #5 void pybind11::detail::argument_loader::call_impl(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*)&, 0ul, pybind11::detail::void_type>(pybind11::detail::OstreamRedirect&&, std::__tsan::integer_sequence, pybind11::name&&) && pybind11/include/pybind11/cast.h:2033:16 (pybind11_tests.abi3.so+0x630e93) #6 std::__tsan::enable_if::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader::call(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*)&>(&&) && pybind11/include/pybind11/cast.h:2010:35 (pybind11_tests.abi3.so+0x630bab) #7 void pybind11::cpp_function::initialize(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*), void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(void&&, pybind11::detail::OstreamRedirect (*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const pybind11/include/pybind11/pybind11.h:186:52 (pybind11_tests.abi3.so+0x630a54) #8 void pybind11::cpp_function::initialize(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*), void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(void&&, pybind11::detail::OstreamRedirect (*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::function_call&)::__invoke(pybind11::detail::function_call&) pybind11/include/pybind11/pybind11.h:163:21 (pybind11_tests.abi3.so+0x6309b9) #9 pybind11::cpp_function::dispatcher(_object*, _object*, _object*) pybind11/include/pybind11/pybind11.h:751:30 (pybind11_tests.abi3.so+0x3ebc8a) #10 _PyCFunction_FastCallDict python_runtime/v3_6/Objects/methodobject.c:231:22 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x383173e) #11 devtools::python_launcher::RunMainFromImporter(char const*, int (*)(char const*)) devtools/python/launcher/launcher_common.cc:346:11 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34193f2) #12 devtools::python_launcher::Launcher_Main(int, char**, int (*)(int*, char**), int (*)(int*, char**), int (*)(char const*)) devtools/python/launcher/launcher_common.cc:594:14 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3418c1b) #13 devtools::python_launcher::HermeticLauncherMain(int, char**) devtools/python/launcher/hermetic_launcher_lib.cc:127:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34185b3) #14 main devtools/python/launcher/hermetic_launcher.cc:4:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5e5ae) Thread T8 (tid=461, running) created by main thread at: #0 pthread_create llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:969:3 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1be870a) #1 std::__tsan::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/__threading_support:506:10 (pybind11_tests.abi3.so+0x497fab) #2 std::__tsan::thread::thread(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:307:16 (pybind11_tests.abi3.so+0x634b63) #3 TestThread::TestThread() pybind11/tests/test_iostream.cpp:43:18 (pybind11_tests.abi3.so+0x634a15) #4 TestThread* pybind11::detail::initimpl::construct_or_initialize() pybind11/include/pybind11/detail/init.h:61:68 (pybind11_tests.abi3.so+0x634984) #5 void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)::operator()(pybind11::detail::value_and_holder&) const pybind11/include/pybind11/detail/init.h:175:31 (pybind11_tests.abi3.so+0x63491a) #6 pybind11::class_ pybind11::detail::argument_loader::call_impl::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&, 0ul, pybind11::detail::void_type>(&&, std::__tsan::integer_sequence, void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&) && pybind11/include/pybind11/cast.h:2033:16 (pybind11_tests.abi3.so+0x6348b3) #7 std::__tsan::enable_if >::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader::call::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&>(0&&) && pybind11/include/pybind11/cast.h:2010:35 (pybind11_tests.abi3.so+0x63484b) #8 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const pybind11/include/pybind11/pybind11.h:186:52 (pybind11_tests.abi3.so+0x6347a5) #9 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::__invoke(pybind11::detail::function_call&) pybind11/include/pybind11/pybind11.h:163:21 (pybind11_tests.abi3.so+0x634709) #10 pybind11::cpp_function::dispatcher(_object*, _object*, _object*) pybind11/include/pybind11/pybind11.h:751:30 (pybind11_tests.abi3.so+0x3ebc8a) #11 _PyCFunction_FastCallDict python_runtime/v3_6/Objects/methodobject.c:231:22 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x383173e) #12 _PyObject_FastCallDict python_runtime/v3_6/Objects/abstract.c:2331:18 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x37ec23b) #13 devtools::python_launcher::RunMainFromImporter(char const*, int (*)(char const*)) devtools/python/launcher/launcher_common.cc:346:11 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34193f2) #14 devtools::python_launcher::Launcher_Main(int, char**, int (*)(int*, char**), int (*)(int*, char**), int (*)(char const*)) devtools/python/launcher/launcher_common.cc:594:14 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3418c1b) #15 devtools::python_launcher::HermeticLauncherMain(int, char**) devtools/python/launcher/hermetic_launcher_lib.cc:127:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34185b3) #16 main devtools/python/launcher/hermetic_launcher.cc:4:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5e5ae) Thread T6 (tid=459, running) created by main thread at: #0 pthread_create llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:969:3 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1be870a) #1 std::__tsan::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/__threading_support:506:10 (pybind11_tests.abi3.so+0x497fab) #2 std::__tsan::thread::thread(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:307:16 (pybind11_tests.abi3.so+0x634b63) #3 TestThread::TestThread() pybind11/tests/test_iostream.cpp:43:18 (pybind11_tests.abi3.so+0x634a15) #4 TestThread* pybind11::detail::initimpl::construct_or_initialize() pybind11/include/pybind11/detail/init.h:61:68 (pybind11_tests.abi3.so+0x634984) #5 void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)::operator()(pybind11::detail::value_and_holder&) const pybind11/include/pybind11/detail/init.h:175:31 (pybind11_tests.abi3.so+0x63491a) #6 pybind11::class_ pybind11::detail::argument_loader::call_impl::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&, 0ul, pybind11::detail::void_type>(&&, std::__tsan::integer_sequence, void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&) && pybind11/include/pybind11/cast.h:2033:16 (pybind11_tests.abi3.so+0x6348b3) #7 std::__tsan::enable_if >::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader::call::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&>(0&&) && pybind11/include/pybind11/cast.h:2010:35 (pybind11_tests.abi3.so+0x63484b) #8 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const pybind11/include/pybind11/pybind11.h:186:52 (pybind11_tests.abi3.so+0x6347a5) #9 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::__invoke(pybind11::detail::function_call&) pybind11/include/pybind11/pybind11.h:163:21 (pybind11_tests.abi3.so+0x634709) #10 pybind11::cpp_function::dispatcher(_object*, _object*, _object*) pybind11/include/pybind11/pybind11.h:751:30 (pybind11_tests.abi3.so+0x3ebc8a) #11 _PyCFunction_FastCallDict python_runtime/v3_6/Objects/methodobject.c:231:22 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x383173e) #12 _PyObject_FastCallDict python_runtime/v3_6/Objects/abstract.c:2331:18 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x37ec23b) #13 devtools::python_launcher::RunMainFromImporter(char const*, int (*)(char const*)) devtools/python/launcher/launcher_common.cc:346:11 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34193f2) #14 devtools::python_launcher::Launcher_Main(int, char**, int (*)(int*, char**), int (*)(int*, char**), int (*)(char const*)) devtools/python/launcher/launcher_common.cc:594:14 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3418c1b) #15 devtools::python_launcher::HermeticLauncherMain(int, char**) devtools/python/launcher/hermetic_launcher_lib.cc:127:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34185b3) #16 main devtools/python/launcher/hermetic_launcher.cc:4:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5e5ae) SUMMARY: ThreadSanitizer: data race llvm/llvm-project/libcxx/include/__string:386:56 in std::__tsan::char_traits::copy(char*, char const*, unsigned long) ================== ================== WARNING: ThreadSanitizer: data race (pid=444) Read of size 8 at 0x7b1c000cc538 by thread T8: #0 std::__tsan::basic_streambuf >::pbase() const crosstool/v18/stable/toolchain/bin/../include/c++/v1/streambuf:253:64 (pybind11_tests.abi3.so+0x62f10a) #1 pybind11::detail::pythonbuf::_sync() pybind11/include/pybind11/iostream.h:45:13 (pybind11_tests.abi3.so+0x62ee80) #2 pybind11::detail::pythonbuf::sync() pybind11/include/pybind11/iostream.h:63:16 (pybind11_tests.abi3.so+0x62f019) #3 std::__tsan::basic_streambuf >::pubsync() llvm/llvm-project/libcxx/include/streambuf:167:28 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3bf2b6a) #4 std::__tsan::basic_ostream >::flush() llvm/llvm-project/libcxx/include/ostream:951:36 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3bf2b6a) #5 std::__tsan::basic_ostream >& std::__tsan::flush >(std::__tsan::basic_ostream >&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:1024:10 (pybind11_tests.abi3.so+0x62d339) #6 std::__tsan::basic_ostream >::operator<<(std::__tsan::basic_ostream >& (*)(std::__tsan::basic_ostream >&)) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:195:14 (pybind11_tests.abi3.so+0x62d2fb) #7 TestThread::TestThread()::'lambda'()::operator()() const pybind11/tests/test_iostream.cpp:40:34 (pybind11_tests.abi3.so+0x635219) #8 decltype(std::__tsan::forward(fp)()) std::__tsan::__invoke(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/type_traits:3750:1 (pybind11_tests.abi3.so+0x635161) #9 void std::__tsan::__thread_execute >, TestThread::TestThread()::'lambda'()>(std::__tsan::tuple >, TestThread::TestThread()::'lambda'()>&, std::__tsan::__tuple_indices<>) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:280:5 (pybind11_tests.abi3.so+0x635119) #10 void* std::__tsan::__thread_proxy >, TestThread::TestThread()::'lambda'()> >(void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:291:5 (pybind11_tests.abi3.so+0x634dfa) Previous write of size 8 at 0x7b1c000cc538 by thread T6: #0 std::__tsan::basic_streambuf >::setp(char*, char*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/streambuf:265:17 (pybind11_tests.abi3.so+0x62f211) #1 pybind11::detail::pythonbuf::_sync() pybind11/include/pybind11/iostream.h:57:13 (pybind11_tests.abi3.so+0x62ef30) #2 pybind11::detail::pythonbuf::sync() pybind11/include/pybind11/iostream.h:63:16 (pybind11_tests.abi3.so+0x62f019) #3 std::__tsan::basic_streambuf >::pubsync() llvm/llvm-project/libcxx/include/streambuf:167:28 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3bf2b6a) #4 std::__tsan::basic_ostream >::flush() llvm/llvm-project/libcxx/include/ostream:951:36 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3bf2b6a) #5 std::__tsan::basic_ostream >& std::__tsan::flush >(std::__tsan::basic_ostream >&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:1024:10 (pybind11_tests.abi3.so+0x62d339) #6 std::__tsan::basic_ostream >::operator<<(std::__tsan::basic_ostream >& (*)(std::__tsan::basic_ostream >&)) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:195:14 (pybind11_tests.abi3.so+0x62d2fb) #7 TestThread::TestThread()::'lambda'()::operator()() const pybind11/tests/test_iostream.cpp:40:34 (pybind11_tests.abi3.so+0x635219) #8 decltype(std::__tsan::forward(fp)()) std::__tsan::__invoke(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/type_traits:3750:1 (pybind11_tests.abi3.so+0x635161) #9 void std::__tsan::__thread_execute >, TestThread::TestThread()::'lambda'()>(std::__tsan::tuple >, TestThread::TestThread()::'lambda'()>&, std::__tsan::__tuple_indices<>) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:280:5 (pybind11_tests.abi3.so+0x635119) #10 void* std::__tsan::__thread_proxy >, TestThread::TestThread()::'lambda'()> >(void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:291:5 (pybind11_tests.abi3.so+0x634dfa) Location is heap block of size 112 at 0x7b1c000cc500 allocated by main thread: #0 operator new(unsigned long) llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_new_delete.cpp:64:3 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5d499) #1 pybind11::detail::OstreamRedirect::enter() pybind11/include/pybind11/iostream.h:171:35 (pybind11_tests.abi3.so+0x62df8d) #2 pybind11::cpp_function::cpp_function(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*)::operator()(pybind11::detail::OstreamRedirect*) const pybind11/include/pybind11/pybind11.h:84:66 (pybind11_tests.abi3.so+0x630f39) #3 void pybind11::detail::argument_loader::call_impl(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*)&, 0ul, pybind11::detail::void_type>(pybind11::detail::OstreamRedirect&&, std::__tsan::integer_sequence, pybind11::name&&) && pybind11/include/pybind11/cast.h:2033:16 (pybind11_tests.abi3.so+0x630e93) #4 std::__tsan::enable_if::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader::call(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*)&>(&&) && pybind11/include/pybind11/cast.h:2010:35 (pybind11_tests.abi3.so+0x630bab) #5 void pybind11::cpp_function::initialize(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*), void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(void&&, pybind11::detail::OstreamRedirect (*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const pybind11/include/pybind11/pybind11.h:186:52 (pybind11_tests.abi3.so+0x630a54) #6 void pybind11::cpp_function::initialize(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*), void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(void&&, pybind11::detail::OstreamRedirect (*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::function_call&)::__invoke(pybind11::detail::function_call&) pybind11/include/pybind11/pybind11.h:163:21 (pybind11_tests.abi3.so+0x6309b9) #7 pybind11::cpp_function::dispatcher(_object*, _object*, _object*) pybind11/include/pybind11/pybind11.h:751:30 (pybind11_tests.abi3.so+0x3ebc8a) #8 _PyCFunction_FastCallDict python_runtime/v3_6/Objects/methodobject.c:231:22 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x383173e) #9 devtools::python_launcher::RunMainFromImporter(char const*, int (*)(char const*)) devtools/python/launcher/launcher_common.cc:346:11 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34193f2) #10 devtools::python_launcher::Launcher_Main(int, char**, int (*)(int*, char**), int (*)(int*, char**), int (*)(char const*)) devtools/python/launcher/launcher_common.cc:594:14 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3418c1b) #11 devtools::python_launcher::HermeticLauncherMain(int, char**) devtools/python/launcher/hermetic_launcher_lib.cc:127:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34185b3) #12 main devtools/python/launcher/hermetic_launcher.cc:4:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5e5ae) Thread T8 (tid=461, running) created by main thread at: #0 pthread_create llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:969:3 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1be870a) #1 std::__tsan::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/__threading_support:506:10 (pybind11_tests.abi3.so+0x497fab) #2 std::__tsan::thread::thread(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:307:16 (pybind11_tests.abi3.so+0x634b63) #3 TestThread::TestThread() pybind11/tests/test_iostream.cpp:43:18 (pybind11_tests.abi3.so+0x634a15) #4 TestThread* pybind11::detail::initimpl::construct_or_initialize() pybind11/include/pybind11/detail/init.h:61:68 (pybind11_tests.abi3.so+0x634984) #5 void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)::operator()(pybind11::detail::value_and_holder&) const pybind11/include/pybind11/detail/init.h:175:31 (pybind11_tests.abi3.so+0x63491a) #6 pybind11::class_ pybind11::detail::argument_loader::call_impl::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&, 0ul, pybind11::detail::void_type>(&&, std::__tsan::integer_sequence, void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&) && pybind11/include/pybind11/cast.h:2033:16 (pybind11_tests.abi3.so+0x6348b3) #7 std::__tsan::enable_if >::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader::call::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&>(0&&) && pybind11/include/pybind11/cast.h:2010:35 (pybind11_tests.abi3.so+0x63484b) #8 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const pybind11/include/pybind11/pybind11.h:186:52 (pybind11_tests.abi3.so+0x6347a5) #9 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::__invoke(pybind11::detail::function_call&) pybind11/include/pybind11/pybind11.h:163:21 (pybind11_tests.abi3.so+0x634709) #10 pybind11::cpp_function::dispatcher(_object*, _object*, _object*) pybind11/include/pybind11/pybind11.h:751:30 (pybind11_tests.abi3.so+0x3ebc8a) #11 _PyCFunction_FastCallDict python_runtime/v3_6/Objects/methodobject.c:231:22 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x383173e) #12 _PyObject_FastCallDict python_runtime/v3_6/Objects/abstract.c:2331:18 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x37ec23b) #13 devtools::python_launcher::RunMainFromImporter(char const*, int (*)(char const*)) devtools/python/launcher/launcher_common.cc:346:11 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34193f2) #14 devtools::python_launcher::Launcher_Main(int, char**, int (*)(int*, char**), int (*)(int*, char**), int (*)(char const*)) devtools/python/launcher/launcher_common.cc:594:14 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3418c1b) #15 devtools::python_launcher::HermeticLauncherMain(int, char**) devtools/python/launcher/hermetic_launcher_lib.cc:127:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34185b3) #16 main devtools/python/launcher/hermetic_launcher.cc:4:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5e5ae) Thread T6 (tid=459, running) created by main thread at: #0 pthread_create llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:969:3 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1be870a) #1 std::__tsan::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/__threading_support:506:10 (pybind11_tests.abi3.so+0x497fab) #2 std::__tsan::thread::thread(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:307:16 (pybind11_tests.abi3.so+0x634b63) #3 TestThread::TestThread() pybind11/tests/test_iostream.cpp:43:18 (pybind11_tests.abi3.so+0x634a15) #4 TestThread* pybind11::detail::initimpl::construct_or_initialize() pybind11/include/pybind11/detail/init.h:61:68 (pybind11_tests.abi3.so+0x634984) #5 void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)::operator()(pybind11::detail::value_and_holder&) const pybind11/include/pybind11/detail/init.h:175:31 (pybind11_tests.abi3.so+0x63491a) #6 pybind11::class_ pybind11::detail::argument_loader::call_impl::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&, 0ul, pybind11::detail::void_type>(&&, std::__tsan::integer_sequence, void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&) && pybind11/include/pybind11/cast.h:2033:16 (pybind11_tests.abi3.so+0x6348b3) #7 std::__tsan::enable_if >::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader::call::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&>(0&&) && pybind11/include/pybind11/cast.h:2010:35 (pybind11_tests.abi3.so+0x63484b) #8 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const pybind11/include/pybind11/pybind11.h:186:52 (pybind11_tests.abi3.so+0x6347a5) #9 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::__invoke(pybind11::detail::function_call&) pybind11/include/pybind11/pybind11.h:163:21 (pybind11_tests.abi3.so+0x634709) #10 pybind11::cpp_function::dispatcher(_object*, _object*, _object*) pybind11/include/pybind11/pybind11.h:751:30 (pybind11_tests.abi3.so+0x3ebc8a) #11 _PyCFunction_FastCallDict python_runtime/v3_6/Objects/methodobject.c:231:22 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x383173e) #12 _PyObject_FastCallDict python_runtime/v3_6/Objects/abstract.c:2331:18 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x37ec23b) #13 devtools::python_launcher::RunMainFromImporter(char const*, int (*)(char const*)) devtools/python/launcher/launcher_common.cc:346:11 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34193f2) #14 devtools::python_launcher::Launcher_Main(int, char**, int (*)(int*, char**), int (*)(int*, char**), int (*)(char const*)) devtools/python/launcher/launcher_common.cc:594:14 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3418c1b) #15 devtools::python_launcher::HermeticLauncherMain(int, char**) devtools/python/launcher/hermetic_launcher_lib.cc:127:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34185b3) #16 main devtools/python/launcher/hermetic_launcher.cc:4:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5e5ae) SUMMARY: ThreadSanitizer: data race crosstool/v18/stable/toolchain/bin/../include/c++/v1/streambuf:253:64 in std::__tsan::basic_streambuf >::pbase() const ================== ================== WARNING: ThreadSanitizer: data race (pid=444) Read of size 8 at 0x7b1c000cc548 by thread T7: #0 std::__tsan::basic_streambuf >::xsputn(char const*, long) llvm/llvm-project/libcxx/include/streambuf:462:24 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3bf1bfa) #1 std::__tsan::basic_streambuf >::sputn(char const*, long) crosstool/v18/stable/toolchain/bin/../include/c++/v1/streambuf:229:14 (pybind11_tests.abi3.so+0x43d992) #2 std::__tsan::ostreambuf_iterator > std::__tsan::__pad_and_output >(std::__tsan::ostreambuf_iterator >, char const*, char const*, char const*, std::__tsan::ios_base&, char) crosstool/v18/stable/toolchain/bin/../include/c++/v1/locale:1407:26 (pybind11_tests.abi3.so+0x43d749) #3 std::__tsan::basic_ostream >& std::__tsan::__put_character_sequence >(std::__tsan::basic_ostream >&, char const*, unsigned long) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:729:17 (pybind11_tests.abi3.so+0x43d57e) #4 std::__tsan::basic_ostream >& std::__tsan::operator<< >(std::__tsan::basic_ostream >&, char const*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:868:12 (pybind11_tests.abi3.so+0x4d91ab) #5 TestThread::TestThread()::'lambda'()::operator()() const pybind11/tests/test_iostream.cpp:40:27 (pybind11_tests.abi3.so+0x63520e) #6 decltype(std::__tsan::forward(fp)()) std::__tsan::__invoke(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/type_traits:3750:1 (pybind11_tests.abi3.so+0x635161) #7 void std::__tsan::__thread_execute >, TestThread::TestThread()::'lambda'()>(std::__tsan::tuple >, TestThread::TestThread()::'lambda'()>&, std::__tsan::__tuple_indices<>) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:280:5 (pybind11_tests.abi3.so+0x635119) #8 void* std::__tsan::__thread_proxy >, TestThread::TestThread()::'lambda'()> >(void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:291:5 (pybind11_tests.abi3.so+0x634dfa) Previous write of size 8 at 0x7b1c000cc548 by thread T6: #0 std::__tsan::basic_streambuf >::setp(char*, char*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/streambuf:266:17 (pybind11_tests.abi3.so+0x62f21e) #1 pybind11::detail::pythonbuf::_sync() pybind11/include/pybind11/iostream.h:57:13 (pybind11_tests.abi3.so+0x62ef30) #2 pybind11::detail::pythonbuf::sync() pybind11/include/pybind11/iostream.h:63:16 (pybind11_tests.abi3.so+0x62f019) #3 std::__tsan::basic_streambuf >::pubsync() llvm/llvm-project/libcxx/include/streambuf:167:28 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3bf2b6a) #4 std::__tsan::basic_ostream >::flush() llvm/llvm-project/libcxx/include/ostream:951:36 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3bf2b6a) #5 std::__tsan::basic_ostream >& std::__tsan::flush >(std::__tsan::basic_ostream >&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:1024:10 (pybind11_tests.abi3.so+0x62d339) #6 std::__tsan::basic_ostream >::operator<<(std::__tsan::basic_ostream >& (*)(std::__tsan::basic_ostream >&)) crosstool/v18/stable/toolchain/bin/../include/c++/v1/ostream:195:14 (pybind11_tests.abi3.so+0x62d2fb) #7 TestThread::TestThread()::'lambda'()::operator()() const pybind11/tests/test_iostream.cpp:40:34 (pybind11_tests.abi3.so+0x635219) #8 decltype(std::__tsan::forward(fp)()) std::__tsan::__invoke(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/type_traits:3750:1 (pybind11_tests.abi3.so+0x635161) #9 void std::__tsan::__thread_execute >, TestThread::TestThread()::'lambda'()>(std::__tsan::tuple >, TestThread::TestThread()::'lambda'()>&, std::__tsan::__tuple_indices<>) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:280:5 (pybind11_tests.abi3.so+0x635119) #10 void* std::__tsan::__thread_proxy >, TestThread::TestThread()::'lambda'()> >(void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:291:5 (pybind11_tests.abi3.so+0x634dfa) Location is heap block of size 112 at 0x7b1c000cc500 allocated by main thread: #0 operator new(unsigned long) llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_new_delete.cpp:64:3 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5d499) #1 pybind11::detail::OstreamRedirect::enter() pybind11/include/pybind11/iostream.h:171:35 (pybind11_tests.abi3.so+0x62df8d) #2 pybind11::cpp_function::cpp_function(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*)::operator()(pybind11::detail::OstreamRedirect*) const pybind11/include/pybind11/pybind11.h:84:66 (pybind11_tests.abi3.so+0x630f39) #3 void pybind11::detail::argument_loader::call_impl(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*)&, 0ul, pybind11::detail::void_type>(pybind11::detail::OstreamRedirect&&, std::__tsan::integer_sequence, pybind11::name&&) && pybind11/include/pybind11/cast.h:2033:16 (pybind11_tests.abi3.so+0x630e93) #4 std::__tsan::enable_if::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader::call(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*)&>(&&) && pybind11/include/pybind11/cast.h:2010:35 (pybind11_tests.abi3.so+0x630bab) #5 void pybind11::cpp_function::initialize(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*), void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(void&&, pybind11::detail::OstreamRedirect (*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const pybind11/include/pybind11/pybind11.h:186:52 (pybind11_tests.abi3.so+0x630a54) #6 void pybind11::cpp_function::initialize(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::OstreamRedirect*), void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(void&&, pybind11::detail::OstreamRedirect (*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::function_call&)::__invoke(pybind11::detail::function_call&) pybind11/include/pybind11/pybind11.h:163:21 (pybind11_tests.abi3.so+0x6309b9) #7 pybind11::cpp_function::dispatcher(_object*, _object*, _object*) pybind11/include/pybind11/pybind11.h:751:30 (pybind11_tests.abi3.so+0x3ebc8a) #8 _PyCFunction_FastCallDict python_runtime/v3_6/Objects/methodobject.c:231:22 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x383173e) #9 devtools::python_launcher::RunMainFromImporter(char const*, int (*)(char const*)) devtools/python/launcher/launcher_common.cc:346:11 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34193f2) #10 devtools::python_launcher::Launcher_Main(int, char**, int (*)(int*, char**), int (*)(int*, char**), int (*)(char const*)) devtools/python/launcher/launcher_common.cc:594:14 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3418c1b) #11 devtools::python_launcher::HermeticLauncherMain(int, char**) devtools/python/launcher/hermetic_launcher_lib.cc:127:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34185b3) #12 main devtools/python/launcher/hermetic_launcher.cc:4:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5e5ae) Thread T7 (tid=460, running) created by main thread at: #0 pthread_create llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:969:3 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1be870a) #1 std::__tsan::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/__threading_support:506:10 (pybind11_tests.abi3.so+0x497fab) #2 std::__tsan::thread::thread(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:307:16 (pybind11_tests.abi3.so+0x634b63) #3 TestThread::TestThread() pybind11/tests/test_iostream.cpp:43:18 (pybind11_tests.abi3.so+0x634a15) #4 TestThread* pybind11::detail::initimpl::construct_or_initialize() pybind11/include/pybind11/detail/init.h:61:68 (pybind11_tests.abi3.so+0x634984) #5 void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)::operator()(pybind11::detail::value_and_holder&) const pybind11/include/pybind11/detail/init.h:175:31 (pybind11_tests.abi3.so+0x63491a) #6 pybind11::class_ pybind11::detail::argument_loader::call_impl::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&, 0ul, pybind11::detail::void_type>(&&, std::__tsan::integer_sequence, void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&) && pybind11/include/pybind11/cast.h:2033:16 (pybind11_tests.abi3.so+0x6348b3) #7 std::__tsan::enable_if >::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader::call::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&>(0&&) && pybind11/include/pybind11/cast.h:2010:35 (pybind11_tests.abi3.so+0x63484b) #8 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const pybind11/include/pybind11/pybind11.h:186:52 (pybind11_tests.abi3.so+0x6347a5) #9 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::__invoke(pybind11::detail::function_call&) pybind11/include/pybind11/pybind11.h:163:21 (pybind11_tests.abi3.so+0x634709) #10 pybind11::cpp_function::dispatcher(_object*, _object*, _object*) pybind11/include/pybind11/pybind11.h:751:30 (pybind11_tests.abi3.so+0x3ebc8a) #11 _PyCFunction_FastCallDict python_runtime/v3_6/Objects/methodobject.c:231:22 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x383173e) #12 _PyObject_FastCallDict python_runtime/v3_6/Objects/abstract.c:2331:18 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x37ec23b) #13 devtools::python_launcher::RunMainFromImporter(char const*, int (*)(char const*)) devtools/python/launcher/launcher_common.cc:346:11 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34193f2) #14 devtools::python_launcher::Launcher_Main(int, char**, int (*)(int*, char**), int (*)(int*, char**), int (*)(char const*)) devtools/python/launcher/launcher_common.cc:594:14 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3418c1b) #15 devtools::python_launcher::HermeticLauncherMain(int, char**) devtools/python/launcher/hermetic_launcher_lib.cc:127:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34185b3) #16 main devtools/python/launcher/hermetic_launcher.cc:4:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5e5ae) Thread T6 (tid=459, running) created by main thread at: #0 pthread_create llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:969:3 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1be870a) #1 std::__tsan::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) crosstool/v18/stable/toolchain/bin/../include/c++/v1/__threading_support:506:10 (pybind11_tests.abi3.so+0x497fab) #2 std::__tsan::thread::thread(TestThread::TestThread()::'lambda'()&&) crosstool/v18/stable/toolchain/bin/../include/c++/v1/thread:307:16 (pybind11_tests.abi3.so+0x634b63) #3 TestThread::TestThread() pybind11/tests/test_iostream.cpp:43:18 (pybind11_tests.abi3.so+0x634a15) #4 TestThread* pybind11::detail::initimpl::construct_or_initialize() pybind11/include/pybind11/detail/init.h:61:68 (pybind11_tests.abi3.so+0x634984) #5 void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)::operator()(pybind11::detail::value_and_holder&) const pybind11/include/pybind11/detail/init.h:175:31 (pybind11_tests.abi3.so+0x63491a) #6 pybind11::class_ pybind11::detail::argument_loader::call_impl::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&, 0ul, pybind11::detail::void_type>(&&, std::__tsan::integer_sequence, void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&) && pybind11/include/pybind11/cast.h:2033:16 (pybind11_tests.abi3.so+0x6348b3) #7 std::__tsan::enable_if >::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader::call::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&)&>(0&&) && pybind11/include/pybind11/cast.h:2010:35 (pybind11_tests.abi3.so+0x63484b) #8 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const pybind11/include/pybind11/pybind11.h:186:52 (pybind11_tests.abi3.so+0x6347a5) #9 void pybind11::cpp_function::initialize::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&), void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_&&, (*)(0...), void pybind11::detail::initimpl::constructor<>::execute, 0>(pybind11::class_&)::'lambda'(pybind11::detail::value_and_holder&) const&...)::'lambda'(pybind11::detail::function_call&)::__invoke(pybind11::detail::function_call&) pybind11/include/pybind11/pybind11.h:163:21 (pybind11_tests.abi3.so+0x634709) #10 pybind11::cpp_function::dispatcher(_object*, _object*, _object*) pybind11/include/pybind11/pybind11.h:751:30 (pybind11_tests.abi3.so+0x3ebc8a) #11 _PyCFunction_FastCallDict python_runtime/v3_6/Objects/methodobject.c:231:22 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x383173e) #12 _PyObject_FastCallDict python_runtime/v3_6/Objects/abstract.c:2331:18 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x37ec23b) #13 devtools::python_launcher::RunMainFromImporter(char const*, int (*)(char const*)) devtools/python/launcher/launcher_common.cc:346:11 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34193f2) #14 devtools::python_launcher::Launcher_Main(int, char**, int (*)(int*, char**), int (*)(int*, char**), int (*)(char const*)) devtools/python/launcher/launcher_common.cc:594:14 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x3418c1b) #15 devtools::python_launcher::HermeticLauncherMain(int, char**) devtools/python/launcher/hermetic_launcher_lib.cc:127:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x34185b3) #16 main devtools/python/launcher/hermetic_launcher.cc:4:10 (467bb25f8991517df427b7f715423d32c9d33f5d56587175d95419b3df02bc82_02000871e4f8+0x1c5e5ae) SUMMARY: ThreadSanitizer: data race llvm/llvm-project/libcxx/include/streambuf:462:24 in std::__tsan::basic_streambuf >::xsputn(char const*, long) ================== Unhandled exception: @ 0x55a4352a80e4 std::__terminate() @ 0x55a4352a7fd7 std::terminate() @ 0x7fea7102ecea pybind11::scoped_ostream_redirect::~scoped_ostream_redirect() @ 0x7fea7102f71f std::__tsan::default_delete<>::operator()() @ 0x7fea7103105e std::__tsan::unique_ptr<>::reset() @ 0x7fea71031d5d pybind11::detail::OstreamRedirect::exit() @ 0x7fea71031cda pybind11::add_ostream_redirect()::{lambda()#1}::operator()() @ 0x7fea71031c49 pybind11::detail::argument_loader<>::call_impl<>() @ 0x7fea7103190c pybind11::detail::argument_loader<>::call<>() @ 0x7fea71031795 pybind11::cpp_function::initialize<>()::{lambda()#1}::operator()() @ 0x7fea710316fa pybind11::cpp_function::initialize<>()::{lambda()#1}::__invoke() @ 0x7fea70debc8b pybind11::cpp_function::dispatcher() @ 0x55a434e3173f _PyCFunction_FastCallDict @ 0x55a434dec295 _PyObject_FastCallDict @ 0x55a434dec436 _PyObject_Call_Prepend @ 0x55a434e02a1c method_call @ 0x55a434dec23c _PyObject_FastCallDict @ 0x55a434de8b0c PyObject_CallFunctionObjArgs @ 0x55a434eaf844 _PyEval_EvalFrameDefault @ 0x55a434eaa075 PyEval_EvalFrameEx @ 0x55a434eb386a _PyEval_EvalCodeWithName @ 0x55a434eaa044 PyEval_EvalCodeEx @ 0x55a434e1b4c2 function_call @ 0x55a434dec02f PyObject_Call @ 0x55a434eb2f4f do_call_core @ 0x55a434eafc0c _PyEval_EvalFrameDefault @ 0x55a434eaa075 PyEval_EvalFrameEx @ 0x55a434eb386a _PyEval_EvalCodeWithName @ 0x55a434eaa044 PyEval_EvalCodeEx @ 0x55a434e1b4c2 function_call @ 0x55a434dec02f PyObject_Call libc++abi: terminating with uncaught exception of type std::runtime_error: Could not allocate string object! *** SIGABRT received by PID 444 (TID 444) on cpu 96 from PID 444; *** Fatal Python error: Aborted Current thread 0x00007fea77b516c0 (most recent call first): File "pybind11/tests/test_iostream.py", line 241 in test_threading File "py/_pytest/python.py", line 166 in pytest_pyfunc_call File "py/pluggy/callers.py", line 187 in _multicall File "py/pluggy/manager.py", line 62 in File "py/pluggy/manager.py", line 68 in _hookexec File "py/pluggy/hooks.py", line 289 in __call__ File "py/_pytest/python.py", line 1456 in runtest File "py/_pytest/runner.py", line 123 in pytest_runtest_call File "py/pluggy/callers.py", line 187 in _multicall File "py/pluggy/manager.py", line 62 in File "py/pluggy/manager.py", line 68 in _hookexec File "py/pluggy/hooks.py", line 289 in __call__ File "py/_pytest/runner.py", line 198 in File "py/_pytest/runner.py", line 226 in from_call File "py/_pytest/runner.py", line 198 in call_runtest_hook File "py/_pytest/runner.py", line 173 in call_and_report File "py/_pytest/runner.py", line 93 in runtestprotocol File "py/_pytest/runner.py", line 78 in pytest_runtest_protocol File "py/pluggy/callers.py", line 187 in _multicall File "py/pluggy/manager.py", line 62 in File "py/pluggy/manager.py", line 68 in _hookexec File "py/pluggy/hooks.py", line 289 in __call__ File "py/_pytest/main.py", line 271 in pytest_runtestloop File "py/pluggy/callers.py", line 187 in _multicall File "py/pluggy/manager.py", line 62 in File "py/pluggy/manager.py", line 68 in _hookexec File "py/pluggy/hooks.py", line 289 in __call__ File "py/_pytest/main.py", line 250 in _main File "py/_pytest/main.py", line 210 in wrap_session File "py/_pytest/main.py", line 243 in pytest_cmdline_main File "py/pluggy/callers.py", line 187 in _multicall File "py/pluggy/manager.py", line 62 in File "py/pluggy/manager.py", line 68 in _hookexec File "py/pluggy/hooks.py", line 289 in __call__ File "py/_pytest/config/__init__.py", line 80 in main File "pybind11/tests/blaze_pytest_test_iostream.py", line 36 in main File "py/absl/app.py", line 393 in _run_main File "py/absl/app.py", line 467 in run File "pybind11/tests/blaze_pytest_test_iostream.py", line 39 in File "", line 39 in _run_code_in_main File "", line 165 in run_filename_as_main E1228 18:23:57.406118 444 process_state.cc:704] RAW: Raising signal 6 with default behavior