Skip to content

Instantly share code, notes, and snippets.

@yiwu-arbug
Created January 19, 2018 19:55
Show Gist options
  • Save yiwu-arbug/027d2448b903648f2f0f40b05258d80f to your computer and use it in GitHub Desktop.
Save yiwu-arbug/027d2448b903648f2f0f40b05258d80f to your computer and use it in GitHub Desktop.
WARNING: ThreadSanitizer: data race (pid=44582)
Read of size 4 at 0x7d0400003218 by main thread:
#0 rocksdb::DBTest_SoftLimit_Test::TestBody() db/db_test.cc:5423 (db_test+0x0000005b55b8)
#1 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3824 (db_test+0x000000c72fcd)
#2 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3860 (db_test+0x000000c72fcd)
#3 testing::Test::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3897 (db_test+0x000000c672d3)
#4 testing::TestInfo::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4072 (db_test+0x000000c67537)
#5 testing::TestCase::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4190 (db_test+0x000000c67671)
#6 testing::internal::UnitTestImpl::RunAllTests() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:6062 (db_test+0x000000c67b44)
#7 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3824 (db_test+0x000000c7362d)
#8 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3860 (db_test+0x000000c7362d)
#9 testing::UnitTest::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:5680 (db_test+0x000000c67f85)
#10 RUN_ALL_TESTS() third-party/gtest-1.7.0/fused-src/gtest/gtest.h:20722 (db_test+0x000000411cc5)
#11 main db/db_test.cc:5697 (db_test+0x000000411cc5)
Previous write of size 4 at 0x7d0400003218 by thread T8:
#0 rocksdb::WriteStallListener::OnStallConditionsChanged(rocksdb::WriteStallInfo const&) db/db_test.cc:5358 (db_test+0x00000061fccd)
#1 rocksdb::SuperVersionContext::Clean() db/job_context.h:63 (db_test+0x000000743248)
#2 rocksdb::JobContext::Clean() db/job_context.h:162 (db_test+0x000000743518)
#3 rocksdb::DBImpl::BackgroundCallFlush() db/db_impl_compaction_flush.cc:1333 (db_test+0x00000075bd54)
#4 rocksdb::DBImpl::BGWorkFlush(void*) db/db_impl_compaction_flush.cc:1179 (db_test+0x00000075c17e)
#5 operator() util/threadpool_imp.cc:441 (db_test+0x000000a4ff3d)
#6 _M_invoke /mnt/gvfs/third-party2/gcc/8219ec1bcedf8ad9da05e121e193364de2cc4f61/5.x/centos6-native/c447969/include/c++/5.4.1/functional:1871 (db_test+0x000000a4ff3d)
#7 std::function<void ()>::operator()() const /mnt/gvfs/third-party2/gcc/8219ec1bcedf8ad9da05e121e193364de2cc4f61/5.x/centos6-native/c447969/include/c++/5.4.1/functional:2267 (db_test+0x00000067f9c3)
#8 rocksdb::ThreadPoolImpl::Impl::BGThread(unsigned long) util/threadpool_imp.cc:240 (db_test+0x000000a514e1)
#9 rocksdb::ThreadPoolImpl::Impl::BGThreadWrapper(void*) util/threadpool_imp.cc:278 (db_test+0x000000a51859)
#10 void* std::_Bind_simple<void* (*(rocksdb::BGThreadMetadata*))(void*)>::_M_invoke<0ul>(std::_Index_tuple<0ul>) /mnt/gvfs/third-party2/gcc/8219ec1bcedf8ad9da05e121e193364de2cc4f61/5.x/centos6-native/c447969/include/c++/5.4.1/functional:1531 (db_test+0x000000a534ff)
#11 std::_Bind_simple<void* (*(rocksdb::BGThreadMetadata*))(void*)>::operator()() /mnt/gvfs/third-party2/gcc/8219ec1bcedf8ad9da05e121e193364de2cc4f61/5.x/centos6-native/c447969/include/c++/5.4.1/functional:1520 (db_test+0x000000a534ff)
#12 std::thread::_Impl<std::_Bind_simple<void* (*(rocksdb::BGThreadMetadata*))(void*)> >::_M_run() /mnt/gvfs/third-party2/gcc/8219ec1bcedf8ad9da05e121e193364de2cc4f61/5.x/centos6-native/c447969/include/c++/5.4.1/thread:115 (db_test+0x000000a534ff)
#13 execute_native_thread_routine <null> (libstdc++.so.6+0x0000000c7170)
Location is heap block of size 16 at 0x7d0400003210 allocated by main thread:
#0 operator new(unsigned long) <null> (libtsan.so.0+0x000000040abd)
#1 rocksdb::DBTest_SoftLimit_Test::TestBody() db/db_test.cc:5382 (db_test+0x0000005b481d)
#2 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3824 (db_test+0x000000c72fcd)
#3 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3860 (db_test+0x000000c72fcd)
#4 testing::Test::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3897 (db_test+0x000000c672d3)
#5 testing::TestInfo::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4072 (db_test+0x000000c67537)
#6 testing::TestCase::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4190 (db_test+0x000000c67671)
#7 testing::internal::UnitTestImpl::RunAllTests() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:6062 (db_test+0x000000c67b44)
#8 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3824 (db_test+0x000000c7362d)
#9 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3860 (db_test+0x000000c7362d)
#10 testing::UnitTest::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:5680 (db_test+0x000000c67f85)
#11 RUN_ALL_TESTS() third-party/gtest-1.7.0/fused-src/gtest/gtest.h:20722 (db_test+0x000000411cc5)
#12 main db/db_test.cc:5697 (db_test+0x000000411cc5)
Thread T8 'rocksdb:bg0' (tid=46151, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x000000027f1a)
#1 std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>, void (*)()) <null> (libstdc++.so.6+0x0000000c72b9)
#2 rocksdb::ThreadPoolImpl::Impl::SetBackgroundThreadsInternal(int, bool) util/threadpool_imp.cc:296 (db_test+0x000000a51e22)
#3 rocksdb::ThreadPoolImpl::IncBackgroundThreadsIfNeeded(int) util/threadpool_imp.cc:425 (db_test+0x000000a51f9c)
#4 IncBackgroundThreadsIfNeeded env/env_posix.cc:795 (db_test+0x0000008dd1f3)
#5 rocksdb::SanitizeOptions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::DBOptions const&) db/db_impl_open.cc:65 (db_test+0x00000077eb0c)
#6 rocksdb::SanitizeOptions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::Options const&) db/db_impl_open.cc:27 (db_test+0x00000077f1c4)
#7 rocksdb::DestroyDB(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::Options const&) db/db_impl.cc:2355 (db_test+0x000000736836)
#8 rocksdb::DBTestBase::~DBTestBase() db/db_test_util.cc:96 (db_test+0x000000669aad)
#9 rocksdb::DBTest::~DBTest() db/db_test.cc:73 (db_test+0x000000626586)
#10 rocksdb::DBTest_DynamicMemtableOptions_Test::~DBTest_DynamicMemtableOptions_Test() db/db_test.cc:3310 (db_test+0x000000626586)
#11 rocksdb::DBTest_DynamicMemtableOptions_Test::~DBTest_DynamicMemtableOptions_Test() db/db_test.cc:3310 (db_test+0x000000626586)
#12 testing::Test::DeleteSelf_() third-party/gtest-1.7.0/fused-src/gtest/gtest.h:18492 (db_test+0x000000c6a624)
#13 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3824 (db_test+0x000000c72fcd)
#14 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3860 (db_test+0x000000c72fcd)
#15 testing::TestInfo::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4078 (db_test+0x000000c674ca)
#16 testing::TestCase::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4190 (db_test+0x000000c67671)
#17 testing::internal::UnitTestImpl::RunAllTests() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:6062 (db_test+0x000000c67b44)
#18 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3824 (db_test+0x000000c7362d)
#19 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3860 (db_test+0x000000c7362d)
#20 testing::UnitTest::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:5680 (db_test+0x000000c67f85)
#21 RUN_ALL_TESTS() third-party/gtest-1.7.0/fused-src/gtest/gtest.h:20722 (db_test+0x000000411cc5)
#22 main db/db_test.cc:5697 (db_test+0x000000411cc5)
SUMMARY: ThreadSanitizer: data race db/db_test.cc:5423 rocksdb::DBTest_SoftLimit_Test::TestBody()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment