Skip to content

Instantly share code, notes, and snippets.

@yiwu-arbug
Created September 15, 2017 18:00
Show Gist options
  • Save yiwu-arbug/0fc6dc0de915297a1740aa9610be9373 to your computer and use it in GitHub Desktop.
Save yiwu-arbug/0fc6dc0de915297a1740aa9610be9373 to your computer and use it in GitHub Desktop.
===== Running listener_test
[==========] Running 13 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 13 tests from EventListenerTest
[ RUN ] EventListenerTest.OnSingleDBCompactionTest
[ OK ] EventListenerTest.OnSingleDBCompactionTest (191 ms)
[ RUN ] EventListenerTest.OnSingleDBFlushTest
[ OK ] EventListenerTest.OnSingleDBFlushTest (178 ms)
[ RUN ] EventListenerTest.MultiCF
[ OK ] EventListenerTest.MultiCF (164 ms)
[ RUN ] EventListenerTest.MultiDBMultiListeners
[ OK ] EventListenerTest.MultiDBMultiListeners (479 ms)
[ RUN ] EventListenerTest.DisableBGCompaction
[ OK ] EventListenerTest.DisableBGCompaction (217 ms)
[ RUN ] EventListenerTest.CompactionReasonLevel
[ OK ] EventListenerTest.CompactionReasonLevel (219 ms)
[ RUN ] EventListenerTest.CompactionReasonUniversal
[ OK ] EventListenerTest.CompactionReasonUniversal (520 ms)
[ RUN ] EventListenerTest.CompactionReasonFIFO
[ OK ] EventListenerTest.CompactionReasonFIFO (93 ms)
[ RUN ] EventListenerTest.TableFileCreationListenersTest
[ OK ] EventListenerTest.TableFileCreationListenersTest (2120 ms)
[ RUN ] EventListenerTest.MemTableSealedListenerTest
==================
WARNING: ThreadSanitizer: data race (pid=93468)
Write of size 8 at 0x7d680001ec30 by thread T2 (mutexes: write M49058):
#0 rocksdb::ColumnFamilyData::SetCurrent(rocksdb::Version*) db/column_family.cc:780 (listener_test+0x0000006708be)
#1 rocksdb::VersionSet::AppendVersion(rocksdb::ColumnFamilyData*, rocksdb::Version*) db/version_set.cc:2369 (listener_test+0x0000008246e2)
#2 rocksdb::VersionSet::LogAndApply(rocksdb::ColumnFamilyData*, rocksdb::MutableCFOptions const&, rocksdb::autovector<rocksdb::VersionEdit*, 8ul> const&, rocksdb::InstrumentedMutex*, rocksdb::Directory*, bool, rocksdb::ColumnFamilyOptions const*) db/version_set.cc:2609 (listener_test+0x000000828e2e)
#3 rocksdb::MemTableList::InstallMemtableFlushResults(rocksdb::ColumnFamilyData*, rocksdb::MutableCFOptions const&, rocksdb::autovector<rocksdb::MemTable*, 8ul> const&, rocksdb::VersionSet*, rocksdb::InstrumentedMutex*, unsigned long, rocksdb::autovector<rocksdb::MemTable*, 8ul>*, rocksdb::Directory*, rocksdb::LogBuffer*) db/memtable_list.cc:381 (listener_test+0x0000007c5199)
#4 rocksdb::FlushJob::Run(rocksdb::FileMetaData*) db/flush_job.cc:195 (listener_test+0x000000790f2a)
#5 rocksdb::DBImpl::FlushMemTableToOutputFile(rocksdb::ColumnFamilyData*, rocksdb::MutableCFOptions const&, bool*, rocksdb::JobContext*, rocksdb::LogBuffer*) db/db_impl_compaction_flush.cc:126 (listener_test+0x0000007104c7)
#6 rocksdb::DBImpl::BackgroundFlush(bool*, rocksdb::JobContext*, rocksdb::LogBuffer*) db/db_impl_compaction_flush.cc:1241 (listener_test+0x000000711664)
#7 rocksdb::DBImpl::BackgroundCallFlush() db/db_impl_compaction_flush.cc:1266 (listener_test+0x00000071b195)
#8 rocksdb::DBImpl::BGWorkFlush(void*) db/db_impl_compaction_flush.cc:1151 (listener_test+0x00000071bad3)
#9 operator() util/threadpool_imp.cc:424 (listener_test+0x0000009e4e9d)
#10 _M_invoke /mnt/gvfs/third-party2/gcc/8219ec1bcedf8ad9da05e121e193364de2cc4f61/5.x/centos6-native/c447969/include/c++/5.4.1/functional:1871 (listener_test+0x0000009e4e9d)
#11 std::function<void ()>::operator()() const /mnt/gvfs/third-party2/gcc/8219ec1bcedf8ad9da05e121e193364de2cc4f61/5.x/centos6-native/c447969/include/c++/5.4.1/functional:2267 (listener_test+0x00000062e153)
#12 rocksdb::ThreadPoolImpl::Impl::BGThread(unsigned long) util/threadpool_imp.cc:237 (listener_test+0x0000009e6431)
#13 rocksdb::ThreadPoolImpl::Impl::BGThreadWrapper(void*) util/threadpool_imp.cc:261 (listener_test+0x0000009e676d)
#14 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 (listener_test+0x0000009e83df)
#15 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 (listener_test+0x0000009e83df)
#16 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 (listener_test+0x0000009e83df)
#17 execute_native_thread_routine <null> (libstdc++.so.6+0x0000000c4fe0)
Previous read of size 8 at 0x7d680001ec30 by thread T1:
#0 rocksdb::DBImpl::NotifyOnCompactionCompleted(rocksdb::ColumnFamilyData*, rocksdb::Compaction*, rocksdb::Status const&, rocksdb::CompactionJobStats const&, int) db/db_impl_compaction_flush.cc:674 (listener_test+0x000000716040)
#1 rocksdb::DBImpl::BackgroundCompaction(bool*, rocksdb::JobContext*, rocksdb::LogBuffer*, rocksdb::DBImpl::PrepickedCompaction*) db/db_impl_compaction_flush.cc:1703 (listener_test+0x000000718708)
#2 rocksdb::DBImpl::BackgroundCallCompaction(rocksdb::DBImpl::PrepickedCompaction*, rocksdb::Env::Priority) db/db_impl_compaction_flush.cc:1344 (listener_test+0x00000071bd55)
#3 rocksdb::DBImpl::BGWorkCompaction(void*) db/db_impl_compaction_flush.cc:1163 (listener_test+0x00000071c5dd)
#4 operator() util/threadpool_imp.cc:424 (listener_test+0x0000009e4e9d)
#5 _M_invoke /mnt/gvfs/third-party2/gcc/8219ec1bcedf8ad9da05e121e193364de2cc4f61/5.x/centos6-native/c447969/include/c++/5.4.1/functional:1871 (listener_test+0x0000009e4e9d)
#6 std::function<void ()>::operator()() const /mnt/gvfs/third-party2/gcc/8219ec1bcedf8ad9da05e121e193364de2cc4f61/5.x/centos6-native/c447969/include/c++/5.4.1/functional:2267 (listener_test+0x00000062e153)
#7 rocksdb::ThreadPoolImpl::Impl::BGThread(unsigned long) util/threadpool_imp.cc:237 (listener_test+0x0000009e6431)
#8 rocksdb::ThreadPoolImpl::Impl::BGThreadWrapper(void*) util/threadpool_imp.cc:261 (listener_test+0x0000009e676d)
#9 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 (listener_test+0x0000009e83df)
#10 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 (listener_test+0x0000009e83df)
#11 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 (listener_test+0x0000009e83df)
#12 execute_native_thread_routine <null> (libstdc++.so.6+0x0000000c4fe0)
Location is heap block of size 1392 at 0x7d680001ec00 allocated by main thread:
#0 operator new(unsigned long) <null> (libtsan.so.0+0x00000004097d)
#1 rocksdb::ColumnFamilySet::CreateColumnFamily(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, rocksdb::Version*, rocksdb::ColumnFamilyOptions const&) db/column_family.cc:1056 (listener_test+0x00000067ed49)
#2 rocksdb::VersionSet::CreateColumnFamily(rocksdb::ColumnFamilyOptions const&, rocksdb::VersionEdit*) db/version_set.cc:3766 (listener_test+0x000000825723)
#3 rocksdb::VersionSet::Recover(std::vector<rocksdb::ColumnFamilyDescriptor, std::allocator<rocksdb::ColumnFamilyDescriptor> > const&, bool) db/version_set.cc:2760 (listener_test+0x00000082d40c)
#4 rocksdb::DBImpl::Recover(std::vector<rocksdb::ColumnFamilyDescriptor, std::allocator<rocksdb::ColumnFamilyDescriptor> > const&, bool, bool, bool) db/db_impl_open.cc:350 (listener_test+0x00000073a0bf)
#5 rocksdb::DB::Open(rocksdb::DBOptions const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<rocksdb::ColumnFamilyDescriptor, std::allocator<rocksdb::ColumnFamilyDescriptor> > const&, std::vector<rocksdb::ColumnFamilyHandle*, std::allocator<rocksdb::ColumnFamilyHandle*> >*, rocksdb::DB**) db/db_impl_open.cc:974 (listener_test+0x00000073da00)
#6 rocksdb::DB::Open(rocksdb::Options const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::DB**) db/db_impl_open.cc:919 (listener_test+0x000000740ce3)
#7 rocksdb::DBTestBase::TryReopen(rocksdb::Options const&) db/db_test_util.cc:597 (listener_test+0x000000618c91)
#8 rocksdb::DBTestBase::DestroyAndReopen(rocksdb::Options const&) db/db_test_util.cc:575 (listener_test+0x000000618e6f)
#9 rocksdb::EventListenerTest_MemTableSealedListenerTest_Test::TestBody() db/listener_test.cc:755 (listener_test+0x0000005dc53c)
#10 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 (listener_test+0x000000bf068d)
#11 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 (listener_test+0x000000bf068d)
#12 testing::Test::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3897 (listener_test+0x000000be4853)
#13 testing::TestInfo::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4072 (listener_test+0x000000be4ab7)
#14 testing::TestCase::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4190 (listener_test+0x000000be4bf1)
#15 testing::internal::UnitTestImpl::RunAllTests() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:6062 (listener_test+0x000000be50c4)
#16 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 (listener_test+0x000000bf0ced)
#17 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 (listener_test+0x000000bf0ced)
#18 testing::UnitTest::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:5680 (listener_test+0x000000be5505)
#19 RUN_ALL_TESTS() third-party/gtest-1.7.0/fused-src/gtest/gtest.h:20722 (listener_test+0x000000410350)
#20 main db/listener_test.cc:894 (listener_test+0x000000410350)
Mutex M49058 (0x7d7c0000f2b8) created at:
#0 pthread_mutex_init <null> (libtsan.so.0+0x000000042308)
#1 rocksdb::port::Mutex::Mutex(bool) port/port_posix.cc:53 (listener_test+0x0000009095ae)
#2 rocksdb::InstrumentedMutex::InstrumentedMutex(rocksdb::Statistics*, rocksdb::Env*, int, bool) monitoring/instrumented_mutex.h:30 (listener_test+0x0000006ecc9a)
#3 rocksdb::DBImpl::DBImpl(rocksdb::DBOptions const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) db/db_impl.cc:194 (listener_test+0x0000006ecc9a)
#4 rocksdb::DB::Open(rocksdb::DBOptions const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<rocksdb::ColumnFamilyDescriptor, std::allocator<rocksdb::ColumnFamilyDescriptor> > const&, std::vector<rocksdb::ColumnFamilyHandle*, std::allocator<rocksdb::ColumnFamilyHandle*> >*, rocksdb::DB**) db/db_impl_open.cc:951 (listener_test+0x00000073cc65)
#5 rocksdb::DB::Open(rocksdb::Options const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::DB**) db/db_impl_open.cc:919 (listener_test+0x000000740ce3)
#6 rocksdb::DBTestBase::TryReopen(rocksdb::Options const&) db/db_test_util.cc:597 (listener_test+0x000000618c91)
#7 rocksdb::DBTestBase::DestroyAndReopen(rocksdb::Options const&) db/db_test_util.cc:575 (listener_test+0x000000618e6f)
#8 rocksdb::EventListenerTest_MemTableSealedListenerTest_Test::TestBody() db/listener_test.cc:755 (listener_test+0x0000005dc53c)
#9 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 (listener_test+0x000000bf068d)
#10 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 (listener_test+0x000000bf068d)
#11 testing::Test::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3897 (listener_test+0x000000be4853)
#12 testing::TestInfo::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4072 (listener_test+0x000000be4ab7)
#13 testing::TestCase::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4190 (listener_test+0x000000be4bf1)
#14 testing::internal::UnitTestImpl::RunAllTests() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:6062 (listener_test+0x000000be50c4)
#15 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 (listener_test+0x000000bf0ced)
#16 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 (listener_test+0x000000bf0ced)
#17 testing::UnitTest::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:5680 (listener_test+0x000000be5505)
#18 RUN_ALL_TESTS() third-party/gtest-1.7.0/fused-src/gtest/gtest.h:20722 (listener_test+0x000000410350)
#19 main db/listener_test.cc:894 (listener_test+0x000000410350)
Thread T2 'rocksdb:bg0' (tid=93471, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x000000027dfa)
#1 std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>, void (*)()) <null> (libstdc++.so.6+0x0000000c5129)
#2 rocksdb::ThreadPoolImpl::Impl::SetBackgroundThreadsInternal(int, bool) util/threadpool_imp.cc:279 (listener_test+0x0000009e6d02)
#3 rocksdb::ThreadPoolImpl::SetBackgroundThreads(int) util/threadpool_imp.cc:388 (listener_test+0x0000009e6dcf)
#4 SetBackgroundThreads env/env_posix.cc:765 (listener_test+0x000000885c11)
#5 rocksdb::EnvWrapper::SetBackgroundThreads(int, rocksdb::Env::Priority) include/rocksdb/env.h:1029 (listener_test+0x00000061b81b)
#6 rocksdb::DBTestBase::DBTestBase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) db/db_test_util.cc:65 (listener_test+0x00000061b81b)
#7 rocksdb::EventListenerTest::EventListenerTest() db/listener_test.cc:43 (listener_test+0x00000060077f)
#8 rocksdb::EventListenerTest_OnSingleDBCompactionTest_Test::EventListenerTest_OnSingleDBCompactionTest_Test() db/listener_test.cc:107 (listener_test+0x00000060077f)
#9 testing::internal::TestFactoryImpl<rocksdb::EventListenerTest_OnSingleDBCompactionTest_Test>::CreateTest() third-party/gtest-1.7.0/fused-src/gtest/gtest.h:7991 (listener_test+0x00000060077f)
#10 testing::Test* testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing::internal::TestFactoryBase::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3824 (listener_test+0x000000bf08ad)
#11 testing::Test* testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing::internal::TestFactoryBase::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3860 (listener_test+0x000000bf08ad)
#12 testing::TestInfo::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4065 (listener_test+0x000000be49e2)
#13 testing::TestCase::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4190 (listener_test+0x000000be4bf1)
#14 testing::internal::UnitTestImpl::RunAllTests() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:6062 (listener_test+0x000000be50c4)
#15 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 (listener_test+0x000000bf0ced)
#16 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 (listener_test+0x000000bf0ced)
#17 testing::UnitTest::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:5680 (listener_test+0x000000be5505)
#18 RUN_ALL_TESTS() third-party/gtest-1.7.0/fused-src/gtest/gtest.h:20722 (listener_test+0x000000410350)
#19 main db/listener_test.cc:894 (listener_test+0x000000410350)
Thread T1 'rocksdb:bg0' (tid=93470, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x000000027dfa)
#1 std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>, void (*)()) <null> (libstdc++.so.6+0x0000000c5129)
#2 rocksdb::ThreadPoolImpl::Impl::SetBackgroundThreadsInternal(int, bool) util/threadpool_imp.cc:279 (listener_test+0x0000009e6d02)
#3 rocksdb::ThreadPoolImpl::SetBackgroundThreads(int) util/threadpool_imp.cc:388 (listener_test+0x0000009e6dcf)
#4 SetBackgroundThreads env/env_posix.cc:765 (listener_test+0x000000885c11)
#5 rocksdb::EnvWrapper::SetBackgroundThreads(int, rocksdb::Env::Priority) include/rocksdb/env.h:1029 (listener_test+0x00000061b7a7)
#6 rocksdb::DBTestBase::DBTestBase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) db/db_test_util.cc:64 (listener_test+0x00000061b7a7)
#7 rocksdb::EventListenerTest::EventListenerTest() db/listener_test.cc:43 (listener_test+0x00000060077f)
#8 rocksdb::EventListenerTest_OnSingleDBCompactionTest_Test::EventListenerTest_OnSingleDBCompactionTest_Test() db/listener_test.cc:107 (listener_test+0x00000060077f)
#9 testing::internal::TestFactoryImpl<rocksdb::EventListenerTest_OnSingleDBCompactionTest_Test>::CreateTest() third-party/gtest-1.7.0/fused-src/gtest/gtest.h:7991 (listener_test+0x00000060077f)
#10 testing::Test* testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing::internal::TestFactoryBase::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3824 (listener_test+0x000000bf08ad)
#11 testing::Test* testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing::internal::TestFactoryBase::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3860 (listener_test+0x000000bf08ad)
#12 testing::TestInfo::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4065 (listener_test+0x000000be49e2)
#13 testing::TestCase::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4190 (listener_test+0x000000be4bf1)
#14 testing::internal::UnitTestImpl::RunAllTests() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:6062 (listener_test+0x000000be50c4)
#15 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 (listener_test+0x000000bf0ced)
#16 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 (listener_test+0x000000bf0ced)
#17 testing::UnitTest::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:5680 (listener_test+0x000000be5505)
#18 RUN_ALL_TESTS() third-party/gtest-1.7.0/fused-src/gtest/gtest.h:20722 (listener_test+0x000000410350)
#19 main db/listener_test.cc:894 (listener_test+0x000000410350)
SUMMARY: ThreadSanitizer: data race db/column_family.cc:780 rocksdb::ColumnFamilyData::SetCurrent(rocksdb::Version*)
==================
==================
WARNING: ThreadSanitizer: data race (pid=93468)
Write of size 8 at 0x7d7800017408 by thread T2 (mutexes: write M49058):
#0 operator delete(void*) <null> (libtsan.so.0+0x000000027829)
#1 rocksdb::Version::Unref() db/version_set.cc:1702 (listener_test+0x000000824604)
#2 rocksdb::SuperVersion::Cleanup() db/column_family.cc:310 (listener_test+0x0000006739a8)
#3 rocksdb::ColumnFamilyData::InstallSuperVersion(rocksdb::SuperVersion*, rocksdb::InstrumentedMutex*, rocksdb::MutableCFOptions const&) db/column_family.cc:940 (listener_test+0x00000067448a)
#4 rocksdb::DBImpl::InstallSuperVersionAndScheduleWork(rocksdb::ColumnFamilyData*, rocksdb::SuperVersion*, rocksdb::MutableCFOptions const&) db/db_impl_compaction_flush.cc:1896 (listener_test+0x000000709b64)
#5 rocksdb::DBImpl::InstallSuperVersionAndScheduleWorkWrapper(rocksdb::ColumnFamilyData*, rocksdb::JobContext*, rocksdb::MutableCFOptions const&) db/db_impl_compaction_flush.cc:1876 (listener_test+0x000000709f16)
#6 rocksdb::DBImpl::FlushMemTableToOutputFile(rocksdb::ColumnFamilyData*, rocksdb::MutableCFOptions const&, bool*, rocksdb::JobContext*, rocksdb::LogBuffer*) db/db_impl_compaction_flush.cc:133 (listener_test+0x000000710ab0)
#7 rocksdb::DBImpl::BackgroundFlush(bool*, rocksdb::JobContext*, rocksdb::LogBuffer*) db/db_impl_compaction_flush.cc:1241 (listener_test+0x000000711664)
#8 rocksdb::DBImpl::BackgroundCallFlush() db/db_impl_compaction_flush.cc:1266 (listener_test+0x00000071b195)
#9 rocksdb::DBImpl::BGWorkFlush(void*) db/db_impl_compaction_flush.cc:1151 (listener_test+0x00000071bad3)
#10 operator() util/threadpool_imp.cc:424 (listener_test+0x0000009e4e9d)
#11 _M_invoke /mnt/gvfs/third-party2/gcc/8219ec1bcedf8ad9da05e121e193364de2cc4f61/5.x/centos6-native/c447969/include/c++/5.4.1/functional:1871 (listener_test+0x0000009e4e9d)
#12 std::function<void ()>::operator()() const /mnt/gvfs/third-party2/gcc/8219ec1bcedf8ad9da05e121e193364de2cc4f61/5.x/centos6-native/c447969/include/c++/5.4.1/functional:2267 (listener_test+0x00000062e153)
#13 rocksdb::ThreadPoolImpl::Impl::BGThread(unsigned long) util/threadpool_imp.cc:237 (listener_test+0x0000009e6431)
#14 rocksdb::ThreadPoolImpl::Impl::BGThreadWrapper(void*) util/threadpool_imp.cc:261 (listener_test+0x0000009e676d)
#15 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 (listener_test+0x0000009e83df)
#16 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 (listener_test+0x0000009e83df)
#17 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 (listener_test+0x0000009e83df)
#18 execute_native_thread_routine <null> (libstdc++.so.6+0x0000000c4fe0)
Previous read of size 8 at 0x7d7800017408 by thread T1:
#0 rocksdb::Version::GetTableProperties(std::shared_ptr<rocksdb::TableProperties const>*, rocksdb::FileMetaData const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*) const db/version_set.cc:576 (listener_test+0x000000814c49)
#1 rocksdb::DBImpl::NotifyOnCompactionCompleted(rocksdb::ColumnFamilyData*, rocksdb::Compaction*, rocksdb::Status const&, rocksdb::CompactionJobStats const&, int) db/db_impl_compaction_flush.cc:675 (listener_test+0x000000716064)
#2 rocksdb::DBImpl::BackgroundCompaction(bool*, rocksdb::JobContext*, rocksdb::LogBuffer*, rocksdb::DBImpl::PrepickedCompaction*) db/db_impl_compaction_flush.cc:1703 (listener_test+0x000000718708)
#3 rocksdb::DBImpl::BackgroundCallCompaction(rocksdb::DBImpl::PrepickedCompaction*, rocksdb::Env::Priority) db/db_impl_compaction_flush.cc:1344 (listener_test+0x00000071bd55)
#4 rocksdb::DBImpl::BGWorkCompaction(void*) db/db_impl_compaction_flush.cc:1163 (listener_test+0x00000071c5dd)
#5 operator() util/threadpool_imp.cc:424 (listener_test+0x0000009e4e9d)
#6 _M_invoke /mnt/gvfs/third-party2/gcc/8219ec1bcedf8ad9da05e121e193364de2cc4f61/5.x/centos6-native/c447969/include/c++/5.4.1/functional:1871 (listener_test+0x0000009e4e9d)
#7 std::function<void ()>::operator()() const /mnt/gvfs/third-party2/gcc/8219ec1bcedf8ad9da05e121e193364de2cc4f61/5.x/centos6-native/c447969/include/c++/5.4.1/functional:2267 (listener_test+0x00000062e153)
#8 rocksdb::ThreadPoolImpl::Impl::BGThread(unsigned long) util/threadpool_imp.cc:237 (listener_test+0x0000009e6431)
#9 rocksdb::ThreadPoolImpl::Impl::BGThreadWrapper(void*) util/threadpool_imp.cc:261 (listener_test+0x0000009e676d)
#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 (listener_test+0x0000009e83df)
#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 (listener_test+0x0000009e83df)
#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 (listener_test+0x0000009e83df)
#13 execute_native_thread_routine <null> (libstdc++.so.6+0x0000000c4fe0)
Mutex M49058 (0x7d7c0000f2b8) created at:
#0 pthread_mutex_init <null> (libtsan.so.0+0x000000042308)
#1 rocksdb::port::Mutex::Mutex(bool) port/port_posix.cc:53 (listener_test+0x0000009095ae)
#2 rocksdb::InstrumentedMutex::InstrumentedMutex(rocksdb::Statistics*, rocksdb::Env*, int, bool) monitoring/instrumented_mutex.h:30 (listener_test+0x0000006ecc9a)
#3 rocksdb::DBImpl::DBImpl(rocksdb::DBOptions const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) db/db_impl.cc:194 (listener_test+0x0000006ecc9a)
#4 rocksdb::DB::Open(rocksdb::DBOptions const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<rocksdb::ColumnFamilyDescriptor, std::allocator<rocksdb::ColumnFamilyDescriptor> > const&, std::vector<rocksdb::ColumnFamilyHandle*, std::allocator<rocksdb::ColumnFamilyHandle*> >*, rocksdb::DB**) db/db_impl_open.cc:951 (listener_test+0x00000073cc65)
#5 rocksdb::DB::Open(rocksdb::Options const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::DB**) db/db_impl_open.cc:919 (listener_test+0x000000740ce3)
#6 rocksdb::DBTestBase::TryReopen(rocksdb::Options const&) db/db_test_util.cc:597 (listener_test+0x000000618c91)
#7 rocksdb::DBTestBase::DestroyAndReopen(rocksdb::Options const&) db/db_test_util.cc:575 (listener_test+0x000000618e6f)
#8 rocksdb::EventListenerTest_MemTableSealedListenerTest_Test::TestBody() db/listener_test.cc:755 (listener_test+0x0000005dc53c)
#9 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 (listener_test+0x000000bf068d)
#10 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 (listener_test+0x000000bf068d)
#11 testing::Test::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3897 (listener_test+0x000000be4853)
#12 testing::TestInfo::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4072 (listener_test+0x000000be4ab7)
#13 testing::TestCase::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4190 (listener_test+0x000000be4bf1)
#14 testing::internal::UnitTestImpl::RunAllTests() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:6062 (listener_test+0x000000be50c4)
#15 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 (listener_test+0x000000bf0ced)
#16 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 (listener_test+0x000000bf0ced)
#17 testing::UnitTest::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:5680 (listener_test+0x000000be5505)
#18 RUN_ALL_TESTS() third-party/gtest-1.7.0/fused-src/gtest/gtest.h:20722 (listener_test+0x000000410350)
#19 main db/listener_test.cc:894 (listener_test+0x000000410350)
Thread T2 'rocksdb:bg0' (tid=93471, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x000000027dfa)
#1 std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>, void (*)()) <null> (libstdc++.so.6+0x0000000c5129)
#2 rocksdb::ThreadPoolImpl::Impl::SetBackgroundThreadsInternal(int, bool) util/threadpool_imp.cc:279 (listener_test+0x0000009e6d02)
#3 rocksdb::ThreadPoolImpl::SetBackgroundThreads(int) util/threadpool_imp.cc:388 (listener_test+0x0000009e6dcf)
#4 SetBackgroundThreads env/env_posix.cc:765 (listener_test+0x000000885c11)
#5 rocksdb::EnvWrapper::SetBackgroundThreads(int, rocksdb::Env::Priority) include/rocksdb/env.h:1029 (listener_test+0x00000061b81b)
#6 rocksdb::DBTestBase::DBTestBase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) db/db_test_util.cc:65 (listener_test+0x00000061b81b)
#7 rocksdb::EventListenerTest::EventListenerTest() db/listener_test.cc:43 (listener_test+0x00000060077f)
#8 rocksdb::EventListenerTest_OnSingleDBCompactionTest_Test::EventListenerTest_OnSingleDBCompactionTest_Test() db/listener_test.cc:107 (listener_test+0x00000060077f)
#9 testing::internal::TestFactoryImpl<rocksdb::EventListenerTest_OnSingleDBCompactionTest_Test>::CreateTest() third-party/gtest-1.7.0/fused-src/gtest/gtest.h:7991 (listener_test+0x00000060077f)
#10 testing::Test* testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing::internal::TestFactoryBase::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3824 (listener_test+0x000000bf08ad)
#11 testing::Test* testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing::internal::TestFactoryBase::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3860 (listener_test+0x000000bf08ad)
#12 testing::TestInfo::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4065 (listener_test+0x000000be49e2)
#13 testing::TestCase::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4190 (listener_test+0x000000be4bf1)
#14 testing::internal::UnitTestImpl::RunAllTests() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:6062 (listener_test+0x000000be50c4)
#15 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 (listener_test+0x000000bf0ced)
#16 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 (listener_test+0x000000bf0ced)
#17 testing::UnitTest::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:5680 (listener_test+0x000000be5505)
#18 RUN_ALL_TESTS() third-party/gtest-1.7.0/fused-src/gtest/gtest.h:20722 (listener_test+0x000000410350)
#19 main db/listener_test.cc:894 (listener_test+0x000000410350)
Thread T1 'rocksdb:bg0' (tid=93470, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x000000027dfa)
#1 std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>, void (*)()) <null> (libstdc++.so.6+0x0000000c5129)
#2 rocksdb::ThreadPoolImpl::Impl::SetBackgroundThreadsInternal(int, bool) util/threadpool_imp.cc:279 (listener_test+0x0000009e6d02)
#3 rocksdb::ThreadPoolImpl::SetBackgroundThreads(int) util/threadpool_imp.cc:388 (listener_test+0x0000009e6dcf)
#4 SetBackgroundThreads env/env_posix.cc:765 (listener_test+0x000000885c11)
#5 rocksdb::EnvWrapper::SetBackgroundThreads(int, rocksdb::Env::Priority) include/rocksdb/env.h:1029 (listener_test+0x00000061b7a7)
#6 rocksdb::DBTestBase::DBTestBase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) db/db_test_util.cc:64 (listener_test+0x00000061b7a7)
#7 rocksdb::EventListenerTest::EventListenerTest() db/listener_test.cc:43 (listener_test+0x00000060077f)
#8 rocksdb::EventListenerTest_OnSingleDBCompactionTest_Test::EventListenerTest_OnSingleDBCompactionTest_Test() db/listener_test.cc:107 (listener_test+0x00000060077f)
#9 testing::internal::TestFactoryImpl<rocksdb::EventListenerTest_OnSingleDBCompactionTest_Test>::CreateTest() third-party/gtest-1.7.0/fused-src/gtest/gtest.h:7991 (listener_test+0x00000060077f)
#10 testing::Test* testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing::internal::TestFactoryBase::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3824 (listener_test+0x000000bf08ad)
#11 testing::Test* testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing::internal::TestFactoryBase::*)(), char const*) third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3860 (listener_test+0x000000bf08ad)
#12 testing::TestInfo::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4065 (listener_test+0x000000be49e2)
#13 testing::TestCase::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:4190 (listener_test+0x000000be4bf1)
#14 testing::internal::UnitTestImpl::RunAllTests() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:6062 (listener_test+0x000000be50c4)
#15 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 (listener_test+0x000000bf0ced)
#16 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 (listener_test+0x000000bf0ced)
#17 testing::UnitTest::Run() third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:5680 (listener_test+0x000000be5505)
#18 RUN_ALL_TESTS() third-party/gtest-1.7.0/fused-src/gtest/gtest.h:20722 (listener_test+0x000000410350)
#19 main db/listener_test.cc:894 (listener_test+0x000000410350)
SUMMARY: ThreadSanitizer: data race ??:0 operator delete(void*)
==================
[ OK ] EventListenerTest.MemTableSealedListenerTest (2312 ms)
[ RUN ] EventListenerTest.ColumnFamilyHandleDeletionStartedListenerTest
[ OK ] EventListenerTest.ColumnFamilyHandleDeletionStartedListenerTest (58 ms)
[ RUN ] EventListenerTest.BackgroundErrorListenerFailedFlushTest
[ OK ] EventListenerTest.BackgroundErrorListenerFailedFlushTest (1023 ms)
[ RUN ] EventListenerTest.BackgroundErrorListenerFailedCompactionTest
[ OK ] EventListenerTest.BackgroundErrorListenerFailedCompactionTest (1064 ms)
[----------] 13 tests from EventListenerTest (8638 ms total)
[----------] Global test environment tear-down
[==========] 13 tests from 1 test case ran. (8638 ms total)
[ PASSED ] 13 tests.
ThreadSanitizer: reported 2 warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment