Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Testcase for listener snapshot #508

Conversation

bright-starry-sky
Copy link
Contributor

in progress

@bright-starry-sky
Copy link
Contributor Author

Ready, please wait the PR #482 .

@bright-starry-sky bright-starry-sky added the ready-for-testing PR: ready for the CI test label Jul 2, 2021
@bright-starry-sky
Copy link
Contributor Author

Test case failed , It has nothing to do with this PR, let me analyze it later.


[----------] 9 tests from NebulaStoreTest (77729 ms total)

[----------] Global test environment tear-down
[==========] 9 tests from 1 test case ran. (77730 ms total)
[  PASSED  ] 9 tests.

=================================================================
==8687==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x11ba067 in operator new(unsigned long) /usr/src/toolset-build/source/llvm-9.0.0/projects/compiler-rt/lib/asan/asan_new_delete.cc:99:3
    #1 0x1468790 in __gnu_cxx::new_allocator<std::_Rb_tree_node<int> >::allocate(unsigned long, void const*) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/ext/new_allocator.h:114:27
    #2 0x1468790 in std::allocator_traits<std::allocator<std::_Rb_tree_node<int> > >::allocate(std::allocator<std::_Rb_tree_node<int> >&, unsigned long) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/alloc_traits.h:444:20
    #3 0x1468790 in std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_get_node() /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/stl_tree.h:580:16
    #4 0x1468790 in std::_Rb_tree_node<int>* std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_create_node<int&>(int&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/stl_tree.h:630:23
    #5 0x1468790 in std::pair<std::_Rb_tree_iterator<int>, bool> std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_emplace_unique<int&>(int&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/stl_tree.h:2408:19
    #6 0x146147d in std::pair<std::_Rb_tree_const_iterator<int>, bool> std::set<int, std::less<int>, std::allocator<int> >::emplace<int&>(int&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/stl_set.h:463:16
    #7 0x146147d in nebula::kvstore::DiskManager::addPartToPath(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /__w/nebula-storage/nebula-storage/src/kvstore/DiskManager.cpp:79:48
    #8 0x12c315c in nebula::kvstore::NebulaStore::newPart(int, int, nebula::kvstore::KVEngine*, bool, std::vector<nebula::HostAddr, std::allocator<nebula::HostAddr> > const&) /__w/nebula-storage/nebula-storage/src/kvstore/NebulaStore.cpp:380:15
    #9 0x12edec0 in nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1::operator()() /__w/nebula-storage/nebula-storage/src/kvstore/NebulaStore.cpp:147:37
    #10 0x12edec0 in void std::__invoke_impl<void, nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&>(std::__invoke_other, nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/invoke.h:60:14
    #11 0x12edec0 in std::__invoke_result<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&>::type std::__invoke<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&>(nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/invoke.h:95:14
    #12 0x12edec0 in void std::_Bind<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::__call<void>(std::tuple<>&&, std::_Index_tuple<>) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/functional:400:11
    #13 0x12edec0 in void std::_Bind<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::operator()<void>() /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/functional:482:17
    #14 0x12edec0 in std::_Function_handler<void (), std::_Bind<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()> >::_M_invoke(std::_Any_data const&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:300:2
    #15 0x12ef162 in std::function<void ()>::operator()() const /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:690:14
    #16 0x12ef162 in std::enable_if<std::is_void<std::result_of<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::type>::value, folly::SemiFuture<folly::Unit> >::type nebula::thread::GenericWorker::addTask<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1>(nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&&)::'lambda'()::operator()() const src/common/thread/GenericWorker.h:191:17
    #17 0x12ef162 in std::_Function_handler<void (), std::enable_if<std::is_void<std::result_of<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::type>::value, folly::SemiFuture<folly::Unit> >::type nebula::thread::GenericWorker::addTask<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1>(nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&&)::'lambda'()>::_M_invoke(std::_Any_data const&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:300:2
    #18 0x2ee3850 in std::function<void ()>::operator()() const /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:690:14
    #19 0x2ee3850 in nebula::thread::GenericWorker::onNotify() src/common/thread/GenericWorker.cpp:114:13
    #20 0x2ee4c55 in nebula::thread::GenericWorker::start(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::$_0::operator()(int, short, void*) const src/common/thread/GenericWorker.cpp:54:48
    #21 0x2ee4c55 in nebula::thread::GenericWorker::start(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::$_0::__invoke(int, short, void*) src/common/thread/GenericWorker.cpp:50:15
    #22 0x3904ca2  (/__w/nebula-storage/nebula-storage/build/bin/test/nebula_store_test+0x3904ca2)
    #23 0x3905376 in event_base_loop (/__w/nebula-storage/nebula-storage/build/bin/test/nebula_store_test+0x3905376)
    #24 0x2ee5f8f in void std::__invoke_impl<void, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::_Bind<void (nebula::thread::GenericWorker::* (nebula::thread::GenericWorker*))()> >(std::__invoke_other, void (*&&)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::_Bind<void (nebula::thread::GenericWorker::* (nebula::thread::GenericWorker*))()>&&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/invoke.h:60:14
    #25 0x3ccc89f in execute_native_thread_routine (/__w/nebula-storage/nebula-storage/build/bin/test/nebula_store_test+0x3ccc89f)

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x11ba067 in operator new(unsigned long) /usr/src/toolset-build/source/llvm-9.0.0/projects/compiler-rt/lib/asan/asan_new_delete.cc:99:3
    #1 0x146118a in __gnu_cxx::new_allocator<std::__detail::_Hash_node<std::pair<int const, unsigned long>, false> >::allocate(unsigned long, void const*) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/ext/new_allocator.h:114:27
    #2 0x146118a in std::allocator_traits<std::allocator<std::__detail::_Hash_node<std::pair<int const, unsigned long>, false> > >::allocate(std::allocator<std::__detail::_Hash_node<std::pair<int const, unsigned long>, false> >&, unsigned long) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/alloc_traits.h:444:20
    #3 0x146118a in std::__detail::_Hash_node<std::pair<int const, unsigned long>, false>* std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<int const, unsigned long>, false> > >::_M_allocate_node<std::piecewise_construct_t const&, std::tuple<int const&>, std::tuple<> >(std::piecewise_construct_t const&, std::tuple<int const&>&&, std::tuple<>&&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/hashtable_policy.h:2081:16
    #4 0x146118a in std::__detail::_Map_base<int, std::pair<int const, unsigned long>, std::allocator<std::pair<int const, unsigned long> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](int const&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/hashtable_policy.h:701:15
    #5 0x146118a in std::unordered_map<int, unsigned long, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, unsigned long> > >::operator[](int const&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/unordered_map.h:985:16
    #6 0x146118a in nebula::kvstore::DiskManager::addPartToPath(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /__w/nebula-storage/nebula-storage/src/kvstore/DiskManager.cpp:78:9
    #7 0x12c315c in nebula::kvstore::NebulaStore::newPart(int, int, nebula::kvstore::KVEngine*, bool, std::vector<nebula::HostAddr, std::allocator<nebula::HostAddr> > const&) /__w/nebula-storage/nebula-storage/src/kvstore/NebulaStore.cpp:380:15
    #8 0x12edec0 in nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1::operator()() /__w/nebula-storage/nebula-storage/src/kvstore/NebulaStore.cpp:147:37
    #9 0x12edec0 in void std::__invoke_impl<void, nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&>(std::__invoke_other, nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/invoke.h:60:14
    #10 0x12edec0 in std::__invoke_result<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&>::type std::__invoke<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&>(nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/invoke.h:95:14
    #11 0x12edec0 in void std::_Bind<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::__call<void>(std::tuple<>&&, std::_Index_tuple<>) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/functional:400:11
    #12 0x12edec0 in void std::_Bind<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::operator()<void>() /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/functional:482:17
    #13 0x12edec0 in std::_Function_handler<void (), std::_Bind<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()> >::_M_invoke(std::_Any_data const&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:300:2
    #14 0x12ef162 in std::function<void ()>::operator()() const /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:690:14
    #15 0x12ef162 in std::enable_if<std::is_void<std::result_of<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::type>::value, folly::SemiFuture<folly::Unit> >::type nebula::thread::GenericWorker::addTask<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1>(nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&&)::'lambda'()::operator()() const src/common/thread/GenericWorker.h:191:17
    #16 0x12ef162 in std::_Function_handler<void (), std::enable_if<std::is_void<std::result_of<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::type>::value, folly::SemiFuture<folly::Unit> >::type nebula::thread::GenericWorker::addTask<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1>(nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&&)::'lambda'()>::_M_invoke(std::_Any_data const&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:300:2
    #17 0x2ee3850 in std::function<void ()>::operator()() const /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:690:14
    #18 0x2ee3850 in nebula::thread::GenericWorker::onNotify() src/common/thread/GenericWorker.cpp:114:13
    #19 0x2ee4c55 in nebula::thread::GenericWorker::start(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::$_0::operator()(int, short, void*) const src/common/thread/GenericWorker.cpp:54:48
    #20 0x2ee4c55 in nebula::thread::GenericWorker::start(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::$_0::__invoke(int, short, void*) src/common/thread/GenericWorker.cpp:50:15
    #21 0x3904ca2  (/__w/nebula-storage/nebula-storage/build/bin/test/nebula_store_test+0x3904ca2)
    #22 0x3905376 in event_base_loop (/__w/nebula-storage/nebula-storage/build/bin/test/nebula_store_test+0x3905376)
    #23 0x2ee5f8f in void std::__invoke_impl<void, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::_Bind<void (nebula::thread::GenericWorker::* (nebula::thread::GenericWorker*))()> >(std::__invoke_other, void (*&&)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::_Bind<void (nebula::thread::GenericWorker::* (nebula::thread::GenericWorker*))()>&&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/invoke.h:60:14
    #24 0x3ccc89f in execute_native_thread_routine (/__w/nebula-storage/nebula-storage/build/bin/test/nebula_store_test+0x3ccc89f)

SUMMARY: AddressSanitizer: 64 byte(s) leaked in 2 allocation(s).

74/76 Test #73: kv_client_test ...................   Passed   11.93 sec
75/76 Test #74: index_ttl_test ...................   Passed   25.37 sec

Copy link
Contributor

@critical27 critical27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job

@critical27
Copy link
Contributor

Failed case is so weird...

@bright-starry-sky
Copy link
Contributor Author

Failed case is so weird...

It only happened once,it has never been seen again. I guess there must be a problem that needs to be further checked through the code. look at it later.

@critical27
Copy link
Contributor

Failed case is so weird...

It only happened once,it has never been seen again. I guess there must be a problem that needs to be further checked through the code. look at it later.

I reproduced it for once in ctest -j30 in local env. Maybe is related I replace with std::filesystem with boost::filesystem.

@bright-starry-sky
Copy link
Contributor Author

Test case failed , It has nothing to do with this PR, let me analyze it later.


[----------] 9 tests from NebulaStoreTest (77729 ms total)

[----------] Global test environment tear-down
[==========] 9 tests from 1 test case ran. (77730 ms total)
[  PASSED  ] 9 tests.

=================================================================
==8687==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x11ba067 in operator new(unsigned long) /usr/src/toolset-build/source/llvm-9.0.0/projects/compiler-rt/lib/asan/asan_new_delete.cc:99:3
    #1 0x1468790 in __gnu_cxx::new_allocator<std::_Rb_tree_node<int> >::allocate(unsigned long, void const*) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/ext/new_allocator.h:114:27
    #2 0x1468790 in std::allocator_traits<std::allocator<std::_Rb_tree_node<int> > >::allocate(std::allocator<std::_Rb_tree_node<int> >&, unsigned long) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/alloc_traits.h:444:20
    #3 0x1468790 in std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_get_node() /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/stl_tree.h:580:16
    #4 0x1468790 in std::_Rb_tree_node<int>* std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_create_node<int&>(int&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/stl_tree.h:630:23
    #5 0x1468790 in std::pair<std::_Rb_tree_iterator<int>, bool> std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_emplace_unique<int&>(int&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/stl_tree.h:2408:19
    #6 0x146147d in std::pair<std::_Rb_tree_const_iterator<int>, bool> std::set<int, std::less<int>, std::allocator<int> >::emplace<int&>(int&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/stl_set.h:463:16
    #7 0x146147d in nebula::kvstore::DiskManager::addPartToPath(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /__w/nebula-storage/nebula-storage/src/kvstore/DiskManager.cpp:79:48
    #8 0x12c315c in nebula::kvstore::NebulaStore::newPart(int, int, nebula::kvstore::KVEngine*, bool, std::vector<nebula::HostAddr, std::allocator<nebula::HostAddr> > const&) /__w/nebula-storage/nebula-storage/src/kvstore/NebulaStore.cpp:380:15
    #9 0x12edec0 in nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1::operator()() /__w/nebula-storage/nebula-storage/src/kvstore/NebulaStore.cpp:147:37
    #10 0x12edec0 in void std::__invoke_impl<void, nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&>(std::__invoke_other, nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/invoke.h:60:14
    #11 0x12edec0 in std::__invoke_result<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&>::type std::__invoke<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&>(nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/invoke.h:95:14
    #12 0x12edec0 in void std::_Bind<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::__call<void>(std::tuple<>&&, std::_Index_tuple<>) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/functional:400:11
    #13 0x12edec0 in void std::_Bind<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::operator()<void>() /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/functional:482:17
    #14 0x12edec0 in std::_Function_handler<void (), std::_Bind<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()> >::_M_invoke(std::_Any_data const&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:300:2
    #15 0x12ef162 in std::function<void ()>::operator()() const /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:690:14
    #16 0x12ef162 in std::enable_if<std::is_void<std::result_of<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::type>::value, folly::SemiFuture<folly::Unit> >::type nebula::thread::GenericWorker::addTask<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1>(nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&&)::'lambda'()::operator()() const src/common/thread/GenericWorker.h:191:17
    #17 0x12ef162 in std::_Function_handler<void (), std::enable_if<std::is_void<std::result_of<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::type>::value, folly::SemiFuture<folly::Unit> >::type nebula::thread::GenericWorker::addTask<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1>(nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&&)::'lambda'()>::_M_invoke(std::_Any_data const&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:300:2
    #18 0x2ee3850 in std::function<void ()>::operator()() const /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:690:14
    #19 0x2ee3850 in nebula::thread::GenericWorker::onNotify() src/common/thread/GenericWorker.cpp:114:13
    #20 0x2ee4c55 in nebula::thread::GenericWorker::start(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::$_0::operator()(int, short, void*) const src/common/thread/GenericWorker.cpp:54:48
    #21 0x2ee4c55 in nebula::thread::GenericWorker::start(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::$_0::__invoke(int, short, void*) src/common/thread/GenericWorker.cpp:50:15
    #22 0x3904ca2  (/__w/nebula-storage/nebula-storage/build/bin/test/nebula_store_test+0x3904ca2)
    #23 0x3905376 in event_base_loop (/__w/nebula-storage/nebula-storage/build/bin/test/nebula_store_test+0x3905376)
    #24 0x2ee5f8f in void std::__invoke_impl<void, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::_Bind<void (nebula::thread::GenericWorker::* (nebula::thread::GenericWorker*))()> >(std::__invoke_other, void (*&&)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::_Bind<void (nebula::thread::GenericWorker::* (nebula::thread::GenericWorker*))()>&&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/invoke.h:60:14
    #25 0x3ccc89f in execute_native_thread_routine (/__w/nebula-storage/nebula-storage/build/bin/test/nebula_store_test+0x3ccc89f)

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x11ba067 in operator new(unsigned long) /usr/src/toolset-build/source/llvm-9.0.0/projects/compiler-rt/lib/asan/asan_new_delete.cc:99:3
    #1 0x146118a in __gnu_cxx::new_allocator<std::__detail::_Hash_node<std::pair<int const, unsigned long>, false> >::allocate(unsigned long, void const*) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/ext/new_allocator.h:114:27
    #2 0x146118a in std::allocator_traits<std::allocator<std::__detail::_Hash_node<std::pair<int const, unsigned long>, false> > >::allocate(std::allocator<std::__detail::_Hash_node<std::pair<int const, unsigned long>, false> >&, unsigned long) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/alloc_traits.h:444:20
    #3 0x146118a in std::__detail::_Hash_node<std::pair<int const, unsigned long>, false>* std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<int const, unsigned long>, false> > >::_M_allocate_node<std::piecewise_construct_t const&, std::tuple<int const&>, std::tuple<> >(std::piecewise_construct_t const&, std::tuple<int const&>&&, std::tuple<>&&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/hashtable_policy.h:2081:16
    #4 0x146118a in std::__detail::_Map_base<int, std::pair<int const, unsigned long>, std::allocator<std::pair<int const, unsigned long> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](int const&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/hashtable_policy.h:701:15
    #5 0x146118a in std::unordered_map<int, unsigned long, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, unsigned long> > >::operator[](int const&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/unordered_map.h:985:16
    #6 0x146118a in nebula::kvstore::DiskManager::addPartToPath(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /__w/nebula-storage/nebula-storage/src/kvstore/DiskManager.cpp:78:9
    #7 0x12c315c in nebula::kvstore::NebulaStore::newPart(int, int, nebula::kvstore::KVEngine*, bool, std::vector<nebula::HostAddr, std::allocator<nebula::HostAddr> > const&) /__w/nebula-storage/nebula-storage/src/kvstore/NebulaStore.cpp:380:15
    #8 0x12edec0 in nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1::operator()() /__w/nebula-storage/nebula-storage/src/kvstore/NebulaStore.cpp:147:37
    #9 0x12edec0 in void std::__invoke_impl<void, nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&>(std::__invoke_other, nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/invoke.h:60:14
    #10 0x12edec0 in std::__invoke_result<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&>::type std::__invoke<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&>(nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/invoke.h:95:14
    #11 0x12edec0 in void std::_Bind<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::__call<void>(std::tuple<>&&, std::_Index_tuple<>) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/functional:400:11
    #12 0x12edec0 in void std::_Bind<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::operator()<void>() /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/functional:482:17
    #13 0x12edec0 in std::_Function_handler<void (), std::_Bind<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()> >::_M_invoke(std::_Any_data const&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:300:2
    #14 0x12ef162 in std::function<void ()>::operator()() const /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:690:14
    #15 0x12ef162 in std::enable_if<std::is_void<std::result_of<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::type>::value, folly::SemiFuture<folly::Unit> >::type nebula::thread::GenericWorker::addTask<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1>(nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&&)::'lambda'()::operator()() const src/common/thread/GenericWorker.h:191:17
    #16 0x12ef162 in std::_Function_handler<void (), std::enable_if<std::is_void<std::result_of<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1 ()>::type>::value, folly::SemiFuture<folly::Unit> >::type nebula::thread::GenericWorker::addTask<nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1>(nebula::kvstore::NebulaStore::loadPartFromDataPath()::$_1&&)::'lambda'()>::_M_invoke(std::_Any_data const&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:300:2
    #17 0x2ee3850 in std::function<void ()>::operator()() const /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:690:14
    #18 0x2ee3850 in nebula::thread::GenericWorker::onNotify() src/common/thread/GenericWorker.cpp:114:13
    #19 0x2ee4c55 in nebula::thread::GenericWorker::start(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::$_0::operator()(int, short, void*) const src/common/thread/GenericWorker.cpp:54:48
    #20 0x2ee4c55 in nebula::thread::GenericWorker::start(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::$_0::__invoke(int, short, void*) src/common/thread/GenericWorker.cpp:50:15
    #21 0x3904ca2  (/__w/nebula-storage/nebula-storage/build/bin/test/nebula_store_test+0x3904ca2)
    #22 0x3905376 in event_base_loop (/__w/nebula-storage/nebula-storage/build/bin/test/nebula_store_test+0x3905376)
    #23 0x2ee5f8f in void std::__invoke_impl<void, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::_Bind<void (nebula::thread::GenericWorker::* (nebula::thread::GenericWorker*))()> >(std::__invoke_other, void (*&&)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::_Bind<void (nebula::thread::GenericWorker::* (nebula::thread::GenericWorker*))()>&&) /opt/vesoft/toolset/clang/9.0.0/lib/gcc/x86_64-vesoft-linux/9.2.0/../../../../include/c++/9.2.0/bits/invoke.h:60:14
    #24 0x3ccc89f in execute_native_thread_routine (/__w/nebula-storage/nebula-storage/build/bin/test/nebula_store_test+0x3ccc89f)

SUMMARY: AddressSanitizer: 64 byte(s) leaked in 2 allocation(s).

74/76 Test #73: kv_client_test ...................   Passed   11.93 sec
75/76 Test #74: index_ttl_test ...................   Passed   25.37 sec

fixed via #512

Copy link
Contributor

@panda-sheep panda-sheep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

@bright-starry-sky bright-starry-sky merged commit 977a9cb into vesoft-inc:master Jul 6, 2021
@bright-starry-sky bright-starry-sky deleted the testcase_for_listener_snapshot branch July 6, 2021 08:12
@critical27 critical27 requested a review from a team July 6, 2021 10:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants