unit-tests failing in libutil with thread sanitizer enabled
There are thread related issues in src/lib/util. When built !602 (merged) normally, unit-tests pass on ubuntu 19.04. When built with thread sanitizer enabled (CXXFLAGS="-g -O2 -fsanitize=thread" ./configure --with-gtest-source=/usr/src/googletest
), they fail in src/lib/util with the following errors:
[----------] 1 test from WatchedThreadTest
[ RUN ] WatchedThreadTest.watchedThreadClassBasics
==================
WARNING: ThreadSanitizer: data race (pid=5749)
Read of size 8 at 0x7b1c000000f8 by main thread:
#0 memcpy <null> (libtsan.so.0+0x340c5)
#1 std::char_traits<char>::copy(char*, char const*, unsigned long) /usr/include/c++/8/bits/char_traits.h:352 (libkea-util.so.8+0x80eeb)
#2 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy(char*, char const*, unsigned long) /usr/include/c++/8/bits/basic_string.h:340 (libkea-util.so.8+0x80eeb)
#3 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy(char*, char const*, unsigned long) /usr/include/c++/8/bits/basic_string.h:335 (libkea-util.so.8+0x80eeb)
#4 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy_chars(char*, char*, char*) /usr/include/c++/8/bits/basic_string.h:382 (libkea-util.so.8+0x80eeb)
#5 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) /usr/include/c++/8/bits/basic_string.tcc:225 (libkea-util.so.8+0x80eeb)
#6 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct_aux<char*>(char*, char*, std::__false_type) /usr/include/c++/8/bits/basic_string.h:236 (libkea-util.so.8+0x80eeb)
#7 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*) /usr/include/c++/8/bits/basic_string.h:255 (libkea-util.so.8+0x80eeb)
#8 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /usr/include/c++/8/bits/basic_string.h:440 (libkea-util.so.8+0x80eeb)
#9 isc::util::WatchedThread::getLastError[abi:cxx11]() /home/thomson/devel/kea-premium/src/lib/util/watched_thread.cc:73 (libkea-util.so.8+0x80eeb)
#10 TestBody /home/thomson/devel/kea-premium/src/lib/util/tests/watched_thread_unittest.cc:116 (run_unittests+0x132e72)
#11 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2443 (run_unittests+0x16fc28)
#12 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2479 (run_unittests+0x16fc28)
#13 testing::Test::Run() /usr/src/googletest/googletest/src/gtest.cc:2517 (run_unittests+0x1614ed)
#14 testing::TestInfo::Run() /usr/src/googletest/googletest/src/gtest.cc:2693 (run_unittests+0x161909)
#15 testing::TestCase::Run() /usr/src/googletest/googletest/src/gtest.cc:2813 (run_unittests+0x161ba9)
#16 testing::internal::UnitTestImpl::RunAllTests() /usr/src/googletest/googletest/src/gtest.cc:5179 (run_unittests+0x16221e)
#17 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2443 (run_unittests+0x170344)
#18 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2479 (run_unittests+0x170344)
#19 testing::UnitTest::Run() /usr/src/googletest/googletest/src/gtest.cc:4788 (run_unittests+0x1627c9)
#20 RUN_ALL_TESTS() /usr/src/googletest/googletest/include/gtest/gtest.h:2341 (run_unittests+0x13a032)
#21 isc::util::unittests::run_all() /home/thomson/devel/kea-premium/src/lib/util/unittests/run_all.cc:81 (run_unittests+0x13a032)
#22 main /home/thomson/devel/kea-premium/src/lib/util/tests/run_unittests.cc:17 (run_unittests+0x53fe7)
Previous write of size 8 at 0x7b1c000000f8 by thread T1:
#0 memcpy <null> (libtsan.so.0+0x340c5)
#1 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) <null> (libstdc++.so.6+0x13e53c)
#2 worker /home/thomson/devel/kea-premium/src/lib/util/tests/watched_thread_unittest.cc:80 (run_unittests+0x132942)
#3 operator() /usr/include/boost/bind/mem_fn_template.hpp:156 (run_unittests+0x131ae2)
#4 invoke /usr/include/boost/function/function_template.hpp:159 (run_unittests+0x131ae2)
#5 boost::function0<void>::operator()() const /usr/include/boost/function/function_template.hpp:768 (libkea-util.so.8+0x8114d)
#6 void std::__invoke_impl<void, boost::function<void ()>>(std::__invoke_other, boost::function<void ()>&&) /usr/include/c++/8/bits/invoke.h:60 (libkea-util.so.8+0x8114d)
#7 std::__invoke_result<boost::function<void ()>>::type std::__invoke<boost::function<void ()>>(boost::function<void ()>&&) /usr/include/c++/8/bits/invoke.h:95 (libkea-util.so.8+0x8114d)
#8 decltype (__invoke((_S_declval<0ul>)())) std::thread::_Invoker<std::tuple<boost::function<void ()> > >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/8/thread:244 (libkea-util.so.8+0x8114d)
#9 std::thread::_Invoker<std::tuple<boost::function<void ()> > >::operator()() /usr/include/c++/8/thread:253 (libkea-util.so.8+0x8114d)
#10 std::thread::_State_impl<std::thread::_Invoker<std::tuple<boost::function<void ()> > > >::_M_run() /usr/include/c++/8/thread:196 (libkea-util.so.8+0x8114d)
#11 <null> <null> (libstdc++.so.6+0xd062f)
As if synchronized via sleep:
#0 usleep <null> (libtsan.so.0+0x518ab)
#1 nap /home/thomson/devel/kea-premium/src/lib/util/tests/watched_thread_unittest.cc:39 (run_unittests+0x132c9b)
#2 TestBody /home/thomson/devel/kea-premium/src/lib/util/tests/watched_thread_unittest.cc:107 (run_unittests+0x132c9b)
#3 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2443 (run_unittests+0x16fc28)
#4 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2479 (run_unittests+0x16fc28)
#5 testing::Test::Run() /usr/src/googletest/googletest/src/gtest.cc:2517 (run_unittests+0x1614ed)
#6 testing::TestInfo::Run() /usr/src/googletest/googletest/src/gtest.cc:2693 (run_unittests+0x161909)
#7 testing::TestCase::Run() /usr/src/googletest/googletest/src/gtest.cc:2813 (run_unittests+0x161ba9)
#8 testing::internal::UnitTestImpl::RunAllTests() /usr/src/googletest/googletest/src/gtest.cc:5179 (run_unittests+0x16221e)
#9 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2443 (run_unittests+0x170344)
#10 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2479 (run_unittests+0x170344)
#11 testing::UnitTest::Run() /usr/src/googletest/googletest/src/gtest.cc:4788 (run_unittests+0x1627c9)
#12 RUN_ALL_TESTS() /usr/src/googletest/googletest/include/gtest/gtest.h:2341 (run_unittests+0x13a032)
#13 isc::util::unittests::run_all() /home/thomson/devel/kea-premium/src/lib/util/unittests/run_all.cc:81 (run_unittests+0x13a032)
#14 main /home/thomson/devel/kea-premium/src/lib/util/tests/run_unittests.cc:17 (run_unittests+0x53fe7)
Location is heap block of size 104 at 0x7b1c000000e0 allocated by main thread:
#0 operator new(unsigned long) <null> (libtsan.so.0+0x783b2)
#1 TestBody /home/thomson/devel/kea-premium/src/lib/util/tests/watched_thread_unittest.cc:101 (run_unittests+0x132a0d)
#2 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2443 (run_unittests+0x16fc28)
#3 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2479 (run_unittests+0x16fc28)
#4 testing::Test::Run() /usr/src/googletest/googletest/src/gtest.cc:2517 (run_unittests+0x1614ed)
#5 testing::TestInfo::Run() /usr/src/googletest/googletest/src/gtest.cc:2693 (run_unittests+0x161909)
#6 testing::TestCase::Run() /usr/src/googletest/googletest/src/gtest.cc:2813 (run_unittests+0x161ba9)
#7 testing::internal::UnitTestImpl::RunAllTests() /usr/src/googletest/googletest/src/gtest.cc:5179 (run_unittests+0x16221e)
#8 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2443 (run_unittests+0x170344)
#9 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2479 (run_unittests+0x170344)
#10 testing::UnitTest::Run() /usr/src/googletest/googletest/src/gtest.cc:4788 (run_unittests+0x1627c9)
#11 RUN_ALL_TESTS() /usr/src/googletest/googletest/include/gtest/gtest.h:2341 (run_unittests+0x13a032)
#12 isc::util::unittests::run_all() /home/thomson/devel/kea-premium/src/lib/util/unittests/run_all.cc:81 (run_unittests+0x13a032)
#13 main /home/thomson/devel/kea-premium/src/lib/util/tests/run_unittests.cc:17 (run_unittests+0x53fe7)
Thread T1 (tid=5988, finished) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x2da8e)
#1 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) <null> (libstdc++.so.6+0xd08c4)
#2 TestBody /home/thomson/devel/kea-premium/src/lib/util/tests/watched_thread_unittest.cc:103 (run_unittests+0x132c12)
#3 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2443 (run_unittests+0x16fc28)
#4 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2479 (run_unittests+0x16fc28)
#5 testing::Test::Run() /usr/src/googletest/googletest/src/gtest.cc:2517 (run_unittests+0x1614ed)
#6 testing::TestInfo::Run() /usr/src/googletest/googletest/src/gtest.cc:2693 (run_unittests+0x161909)
#7 testing::TestCase::Run() /usr/src/googletest/googletest/src/gtest.cc:2813 (run_unittests+0x161ba9)
#8 testing::internal::UnitTestImpl::RunAllTests() /usr/src/googletest/googletest/src/gtest.cc:5179 (run_unittests+0x16221e)
#9 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2443 (run_unittests+0x170344)
#10 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2479 (run_unittests+0x170344)
#11 testing::UnitTest::Run() /usr/src/googletest/googletest/src/gtest.cc:4788 (run_unittests+0x1627c9)
#12 RUN_ALL_TESTS() /usr/src/googletest/googletest/include/gtest/gtest.h:2341 (run_unittests+0x13a032)
#13 isc::util::unittests::run_all() /home/thomson/devel/kea-premium/src/lib/util/unittests/run_all.cc:81 (run_unittests+0x13a032)
#14 main /home/thomson/devel/kea-premium/src/lib/util/tests/run_unittests.cc:17 (run_unittests+0x53fe7)
SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x340c5) in memcpy
==================
==================
WARNING: ThreadSanitizer: data race (pid=5749)
Read of size 8 at 0x7b0800002960 by main thread:
#0 memcpy <null> (libtsan.so.0+0x340c5)
#1 std::char_traits<char>::copy(char*, char const*, unsigned long) /usr/include/c++/8/bits/char_traits.h:352 (libkea-util.so.8+0x80eeb)
#2 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy(char*, char const*, unsigned long) /usr/include/c++/8/bits/basic_string.h:340 (libkea-util.so.8+0x80eeb)
#3 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy(char*, char const*, unsigned long) /usr/include/c++/8/bits/basic_string.h:335 (libkea-util.so.8+0x80eeb)
#4 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy_chars(char*, char*, char*) /usr/include/c++/8/bits/basic_string.h:382 (libkea-util.so.8+0x80eeb)
#5 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) /usr/include/c++/8/bits/basic_string.tcc:225 (libkea-util.so.8+0x80eeb)
#6 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct_aux<char*>(char*, char*, std::__false_type) /usr/include/c++/8/bits/basic_string.h:236 (libkea-util.so.8+0x80eeb)
#7 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*) /usr/include/c++/8/bits/basic_string.h:255 (libkea-util.so.8+0x80eeb)
#8 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /usr/include/c++/8/bits/basic_string.h:440 (libkea-util.so.8+0x80eeb)
#9 isc::util::WatchedThread::getLastError[abi:cxx11]() /home/thomson/devel/kea-premium/src/lib/util/watched_thread.cc:73 (libkea-util.so.8+0x80eeb)
#10 TestBody /home/thomson/devel/kea-premium/src/lib/util/tests/watched_thread_unittest.cc:165 (run_unittests+0x133888)
#11 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2443 (run_unittests+0x16fc28)
#12 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2479 (run_unittests+0x16fc28)
#13 testing::Test::Run() /usr/src/googletest/googletest/src/gtest.cc:2517 (run_unittests+0x1614ed)
#14 testing::TestInfo::Run() /usr/src/googletest/googletest/src/gtest.cc:2693 (run_unittests+0x161909)
#15 testing::TestCase::Run() /usr/src/googletest/googletest/src/gtest.cc:2813 (run_unittests+0x161ba9)
#16 testing::internal::UnitTestImpl::RunAllTests() /usr/src/googletest/googletest/src/gtest.cc:5179 (run_unittests+0x16221e)
#17 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2443 (run_unittests+0x170344)
#18 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2479 (run_unittests+0x170344)
#19 testing::UnitTest::Run() /usr/src/googletest/googletest/src/gtest.cc:4788 (run_unittests+0x1627c9)
#20 RUN_ALL_TESTS() /usr/src/googletest/googletest/include/gtest/gtest.h:2341 (run_unittests+0x13a032)
#21 isc::util::unittests::run_all() /home/thomson/devel/kea-premium/src/lib/util/unittests/run_all.cc:81 (run_unittests+0x13a032)
#22 main /home/thomson/devel/kea-premium/src/lib/util/tests/run_unittests.cc:17 (run_unittests+0x53fe7)
Previous write of size 8 at 0x7b0800002960 by thread T3:
#0 operator new(unsigned long) <null> (libtsan.so.0+0x783b2)
#1 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) <null> (libstdc++.so.6+0x13e556)
#2 worker /home/thomson/devel/kea-premium/src/lib/util/tests/watched_thread_unittest.cc:63 (run_unittests+0x1328d9)
#3 operator() /usr/include/boost/bind/mem_fn_template.hpp:156 (run_unittests+0x131ae2)
#4 invoke /usr/include/boost/function/function_template.hpp:159 (run_unittests+0x131ae2)
#5 boost::function0<void>::operator()() const /usr/include/boost/function/function_template.hpp:768 (libkea-util.so.8+0x8114d)
#6 void std::__invoke_impl<void, boost::function<void ()>>(std::__invoke_other, boost::function<void ()>&&) /usr/include/c++/8/bits/invoke.h:60 (libkea-util.so.8+0x8114d)
#7 std::__invoke_result<boost::function<void ()>>::type std::__invoke<boost::function<void ()>>(boost::function<void ()>&&) /usr/include/c++/8/bits/invoke.h:95 (libkea-util.so.8+0x8114d)
#8 decltype (__invoke((_S_declval<0ul>)())) std::thread::_Invoker<std::tuple<boost::function<void ()> > >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/8/thread:244 (libkea-util.so.8+0x8114d)
#9 std::thread::_Invoker<std::tuple<boost::function<void ()> > >::operator()() /usr/include/c++/8/thread:253 (libkea-util.so.8+0x8114d)
#10 std::thread::_State_impl<std::thread::_Invoker<std::tuple<boost::function<void ()> > > >::_M_run() /usr/include/c++/8/thread:196 (libkea-util.so.8+0x8114d)
#11 <null> <null> (libstdc++.so.6+0xd062f)
As if synchronized via sleep:
#0 usleep <null> (libtsan.so.0+0x518ab)
#1 nap /home/thomson/devel/kea-premium/src/lib/util/tests/watched_thread_unittest.cc:39 (run_unittests+0x133829)
#2 TestBody /home/thomson/devel/kea-premium/src/lib/util/tests/watched_thread_unittest.cc:161 (run_unittests+0x133829)
#3 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2443 (run_unittests+0x16fc28)
#4 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2479 (run_unittests+0x16fc28)
#5 testing::Test::Run() /usr/src/googletest/googletest/src/gtest.cc:2517 (run_unittests+0x1614ed)
#6 testing::TestInfo::Run() /usr/src/googletest/googletest/src/gtest.cc:2693 (run_unittests+0x161909)
#7 testing::TestCase::Run() /usr/src/googletest/googletest/src/gtest.cc:2813 (run_unittests+0x161ba9)
#8 testing::internal::UnitTestImpl::RunAllTests() /usr/src/googletest/googletest/src/gtest.cc:5179 (run_unittests+0x16221e)
#9 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2443 (run_unittests+0x170344)
#10 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2479 (run_unittests+0x170344)
#11 testing::UnitTest::Run() /usr/src/googletest/googletest/src/gtest.cc:4788 (run_unittests+0x1627c9)
#12 RUN_ALL_TESTS() /usr/src/googletest/googletest/include/gtest/gtest.h:2341 (run_unittests+0x13a032)
#13 isc::util::unittests::run_all() /home/thomson/devel/kea-premium/src/lib/util/unittests/run_all.cc:81 (run_unittests+0x13a032)
#14 main /home/thomson/devel/kea-premium/src/lib/util/tests/run_unittests.cc:17 (run_unittests+0x53fe7)
Location is heap block of size 31 at 0x7b0800002960 allocated by thread T3:
#0 operator new(unsigned long) <null> (libtsan.so.0+0x783b2)
#1 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) <null> (libstdc++.so.6+0x13e556)
#2 worker /home/thomson/devel/kea-premium/src/lib/util/tests/watched_thread_unittest.cc:63 (run_unittests+0x1328d9)
#3 operator() /usr/include/boost/bind/mem_fn_template.hpp:156 (run_unittests+0x131ae2)
#4 invoke /usr/include/boost/function/function_template.hpp:159 (run_unittests+0x131ae2)
#5 boost::function0<void>::operator()() const /usr/include/boost/function/function_template.hpp:768 (libkea-util.so.8+0x8114d)
#6 void std::__invoke_impl<void, boost::function<void ()>>(std::__invoke_other, boost::function<void ()>&&) /usr/include/c++/8/bits/invoke.h:60 (libkea-util.so.8+0x8114d)
#7 std::__invoke_result<boost::function<void ()>>::type std::__invoke<boost::function<void ()>>(boost::function<void ()>&&) /usr/include/c++/8/bits/invoke.h:95 (libkea-util.so.8+0x8114d)
#8 decltype (__invoke((_S_declval<0ul>)())) std::thread::_Invoker<std::tuple<boost::function<void ()> > >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/8/thread:244 (libkea-util.so.8+0x8114d)
#9 std::thread::_Invoker<std::tuple<boost::function<void ()> > >::operator()() /usr/include/c++/8/thread:253 (libkea-util.so.8+0x8114d)
#10 std::thread::_State_impl<std::thread::_Invoker<std::tuple<boost::function<void ()> > > >::_M_run() /usr/include/c++/8/thread:196 (libkea-util.so.8+0x8114d)
#11 <null> <null> (libstdc++.so.6+0xd062f)
Thread T3 (tid=5990, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x2da8e)
#1 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) <null> (libstdc++.so.6+0xd08c4)
#2 TestBody /home/thomson/devel/kea-premium/src/lib/util/tests/watched_thread_unittest.cc:152 (run_unittests+0x1336ce)
#3 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2443 (run_unittests+0x16fc28)
#4 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2479 (run_unittests+0x16fc28)
#5 testing::Test::Run() /usr/src/googletest/googletest/src/gtest.cc:2517 (run_unittests+0x1614ed)
#6 testing::TestInfo::Run() /usr/src/googletest/googletest/src/gtest.cc:2693 (run_unittests+0x161909)
#7 testing::TestCase::Run() /usr/src/googletest/googletest/src/gtest.cc:2813 (run_unittests+0x161ba9)
#8 testing::internal::UnitTestImpl::RunAllTests() /usr/src/googletest/googletest/src/gtest.cc:5179 (run_unittests+0x16221e)
#9 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2443 (run_unittests+0x170344)
#10 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /usr/src/googletest/googletest/src/gtest.cc:2479 (run_unittests+0x170344)
#11 testing::UnitTest::Run() /usr/src/googletest/googletest/src/gtest.cc:4788 (run_unittests+0x1627c9)
#12 RUN_ALL_TESTS() /usr/src/googletest/googletest/include/gtest/gtest.h:2341 (run_unittests+0x13a032)
#13 isc::util::unittests::run_all() /home/thomson/devel/kea-premium/src/lib/util/unittests/run_all.cc:81 (run_unittests+0x13a032)
#14 main /home/thomson/devel/kea-premium/src/lib/util/tests/run_unittests.cc:17 (run_unittests+0x53fe7)
SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x340c5) in memcpy
==================
[ OK ] WatchedThreadTest.watchedThreadClassBasics (2988 ms)
[----------] 1 test from WatchedThreadTest (2988 ms total)
[----------] Global test environment tear-down
[==========] 176 tests from 34 test cases ran. (3572 ms total)
[ PASSED ] 176 tests.
YOU HAVE 1 DISABLED TEST
ThreadSanitizer: reported 2 warnings
FAIL: run_unittests
======================================
1 of 1 test failed
Please report to kea-dev@lists.isc.org
======================================
make[6]: *** [Makefile:1300: check-TESTS] Błąd 1
make[6]: Opuszczenie katalogu '/home/thomson/devel/kea-premium/src/lib/util/tests'
make[5]: *** [Makefile:1451: check-am] Błąd 2
make[5]: Opuszczenie katalogu '/home/thomson/devel/kea-premium/src/lib/util/tests'
make[4]: *** [Makefile:1207: check-recursive] Błąd 1
make[4]: Opuszczenie katalogu '/home/thomson/devel/kea-premium/src/lib/util/tests'
make[3]: *** [Makefile:836: check-recursive] Błąd 1
make[3]: Opuszczenie katalogu '/home/thomson/devel/kea-premium/src/lib/util'
make[2]: *** [Makefile:455: check-recursive] Błąd 1
make[2]: Opuszczenie katalogu '/home/thomson/devel/kea-premium/src/lib'
make[1]: *** [Makefile:448: check-recursive] Błąd 1
make[1]: Opuszczenie katalogu '/home/thomson/devel/kea-premium/src'
make: *** [Makefile:619: check-recursive] Błąd 1