Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data race reported between StackTrace::toString and DB::SyncPointCtl::sync #9097

Closed
JaySon-Huang opened this issue May 28, 2024 · 0 comments · Fixed by #9096
Closed

Data race reported between StackTrace::toString and DB::SyncPointCtl::sync #9097

JaySon-Huang opened this issue May 28, 2024 · 0 comments · Fixed by #9096
Labels
severity/moderate type/bug The issue is confirmed as a bug.

Comments

@JaySon-Huang
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

cmake .. -GNinja -DCMAKE_BUILD_TYPE=TSAN -DENABLE_TESTS=ON
ninja gtests_dbms tiflash -j32

./dbms/gtests_dbms --gtest_filter='*GlobalPageIdAllocatorTest.IdRaisedBeforeRaiseLowerBound*'

2. What did you expect to see? (Required)

3. What did you see instead (Required)

==================
WARNING: ThreadSanitizer: data race (pid=111998)
  Read of size 8 at 0x7b1400059ce0 by thread T155:
    #0 strlen /root/llvm-project/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_common_interceptors.inc:387:3 (gtests_dbms+0x2f78eb9)
    #1 std::__1::__constexpr_strlen[abi:ue170006](char const*) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__string/constexpr_c_functions.h:49:10 (gtests_dbms+0x10c4f758)
    #2 std::__1::char_traits<char>::length[abi:ue170006](char const*) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__string/char_traits.h:222:14 (gtests_dbms+0x10c4f758)
    #3 unsigned long std::__1::__char_traits_length_checked[abi:ue170006]<std::__1::char_traits<char>>(std::__1::char_traits<char>::char_type const*) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/string_view:266:7 (gtests_dbms+0x10c4f758)
    #4 std::__1::basic_string_view<char, std::__1::char_traits<char>>::basic_string_view[abi:ue170006](char const*) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/string_view:349:33 (gtests_dbms+0x10c4f758)
    #5 void StackTrace::addr2line<StackTrace::toString() const::$_0>(StackTrace::toString() const::$_0, DB::FmtBuffer&, void*) /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Common/StackTrace.h:63:30 (gtests_dbms+0x10c4f758)
    #6 StackTrace::toString() const /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Common/StackTrace.cpp:38:9 (gtests_dbms+0x10c4f758)
    #7 DB::SyncPointCtl::sync(char const*) /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Common/SyncPoint/Ctl.cpp:86:5 (gtests_dbms+0x10cf7547)
    #8 DB::DM::GlobalPageIdAllocator::raiseTargetByLowerBound(std::__1::atomic<unsigned long>&, unsigned long) /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Storages/DeltaMerge/StoragePool/GlobalPageIdAllocator.cpp:34:9 (gtests_dbms+0xce35b13)
    #9 DB::DM::GlobalPageIdAllocator::raiseLogPageIdLowerBound(unsigned long) /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Storages/DeltaMerge/StoragePool/GlobalPageIdAllocator.h:32:60 (gtests_dbms+0x5f8fb8d)
    #10 DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1::operator()() const /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Storages/DeltaMerge/tests/gtest_global_page_id_allocator.cpp:91:64 (gtests_dbms+0x5f8fb8d)
    #11 decltype(std::declval<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>()()) std::__1::__invoke[abi:ue170006]<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>(DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1&&) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__type
_traits/invoke.h:340:25 (gtests_dbms+0x5f8fb8d)
    #12 void std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>::__execute[abi:ue170006]<>(std::__1::__tuple_indices<>) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:2194:16 (gtests_dbms+0x5f8fb8d)
    #13 std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>::operator()[abi:ue170006]() /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:2187:16 (gtests_dbms+0x5f8fb8d)
    #14 std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>::__execute() /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:1019:9 (gtests_dbms+0x5f8fb8d)
    #15 decltype(*std::declval<std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>*>().*std::declval<void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>::*)()>()()) std::__1::__invoke[abi:ue170006]<void (std::__1::_
_async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>*, void>(void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaise
dBeforeRaiseLowerBound_Test::TestBody()::$_1>>::*&&)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>*&&) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__type_traits/invoke.h:308:25 (gtests_dbms+0x5f8fca1)
    #16 void std::__1::__thread_execute[abi:ue170006]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_Id
RaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>*, 2ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalP
ageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>*>&, std::__1::__tuple_indices<2ul>) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__thread/thread.h:221:5 (gtests_dbms+0x5f8fca1)
    #17 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdA
llocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>*>>(void*) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__thread/thread.h:232:5 (gtests_dbms+0x5f8fca1)

  Previous write of size 8 at 0x7b1400059ce0 by thread T154:
    #0 realloc /root/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:696:5 (gtests_dbms+0x2f6dd25)
    #1 alloc::alloc::realloc::h4c36748a295e330b /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/alloc/src/alloc.rs:132:14 (gtests_dbms+0x10e70e0f)
    #2 alloc::alloc::Global::grow_impl::h4bf59a493760abc8 /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/alloc/src/alloc.rs:209:31 (gtests_dbms+0x10e70e0f)
    #3 _$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$::grow::hf11175f5a5d2aceb /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/alloc/src/alloc.rs:262:18 (gtests_dbms+0x10e70e0f)
    #4 alloc::raw_vec::finish_grow::he17380fb1d400a03 /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/alloc/src/raw_vec.rs:466:13 (gtests_dbms+0x10e70e0f)
    #5 _$LT$findshlibs..linux..SharedLibrary$u20$as$u20$findshlibs..SharedLibrary$GT$::each::hab5c94d173fcfffa /DATA/disk1/ra_common/.cargo/registry/src/github.com-1ecc6299db9ec823/findshlibs-0.10.2/src/linux/mod.rs:351:13 (gtests_dbms+0x1116a314)
    #6 symbolization::object::init_object_cache::h675c93dd14385cbe /DATA/disk1/jaysonhuang/tiflash-master/libs/libsymbolization/src/object.rs:52:5 (gtests_dbms+0x1116a314)
    #7 DB::SyncPointCtl::sync(char const*) /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Common/SyncPoint/Ctl.cpp:86:5 (gtests_dbms+0x10cf7547)
    #8 DB::DM::GlobalPageIdAllocator::raiseTargetByLowerBound(std::__1::atomic<unsigned long>&, unsigned long) /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Storages/DeltaMerge/StoragePool/GlobalPageIdAllocator.cpp:34:9 (gtests_dbms+0xce35b13)
    #9 DB::DM::GlobalPageIdAllocator::raiseLogPageIdLowerBound(unsigned long) /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Storages/DeltaMerge/StoragePool/GlobalPageIdAllocator.h:32:60 (gtests_dbms+0x5f8f7cd)
    #10 DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0::operator()() const /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Storages/DeltaMerge/tests/gtest_global_page_id_allocator.cpp:90:64 (gtests_dbms+0x5f8f7cd)
    #11 decltype(std::declval<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>()()) std::__1::__invoke[abi:ue170006]<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>(DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0&&) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__type
_traits/invoke.h:340:25 (gtests_dbms+0x5f8f7cd)
    #12 void std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>::__execute[abi:ue170006]<>(std::__1::__tuple_indices<>) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:2194:16 (gtests_dbms+0x5f8f7cd)
    #13 std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>::operator()[abi:ue170006]() /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:2187:16 (gtests_dbms+0x5f8f7cd)
    #14 std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>::__execute() /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:1019:9 (gtests_dbms+0x5f8f7cd)
    #15 decltype(*std::declval<std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>*>().*std::declval<void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>::*)()>()()) std::__1::__invoke[abi:ue170006]<void (std::__1::_
_async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>*, void>(void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaise
dBeforeRaiseLowerBound_Test::TestBody()::$_0>>::*&&)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>*&&) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__type_traits/invoke.h:308:25 (gtests_dbms+0x5f8f8e1)
    #16 void std::__1::__thread_execute[abi:ue170006]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_Id
RaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>*, 2ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalP
ageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>*>&, std::__1::__tuple_indices<2ul>) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__thread/thread.h:221:5 (gtests_dbms+0x5f8f8e1)
    #17 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdA
llocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>*>>(void*) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__thread/thread.h:232:5 (gtests_dbms+0x5f8f8e1)

  Location is heap block of size 73 at 0x7b1400059ce0 allocated by thread T154:
    #0 realloc /root/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:696:5 (gtests_dbms+0x2f6dd25)
    #1 alloc::alloc::realloc::h4c36748a295e330b /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/alloc/src/alloc.rs:132:14 (gtests_dbms+0x10e70e0f)
    #2 alloc::alloc::Global::grow_impl::h4bf59a493760abc8 /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/alloc/src/alloc.rs:209:31 (gtests_dbms+0x10e70e0f)
    #3 _$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$::grow::hf11175f5a5d2aceb /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/alloc/src/alloc.rs:262:18 (gtests_dbms+0x10e70e0f)
    #4 alloc::raw_vec::finish_grow::he17380fb1d400a03 /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/alloc/src/raw_vec.rs:466:13 (gtests_dbms+0x10e70e0f)
    #5 _$LT$findshlibs..linux..SharedLibrary$u20$as$u20$findshlibs..SharedLibrary$GT$::each::hab5c94d173fcfffa /DATA/disk1/ra_common/.cargo/registry/src/github.com-1ecc6299db9ec823/findshlibs-0.10.2/src/linux/mod.rs:351:13 (gtests_dbms+0x1116a314)
    #6 symbolization::object::init_object_cache::h675c93dd14385cbe /DATA/disk1/jaysonhuang/tiflash-master/libs/libsymbolization/src/object.rs:52:5 (gtests_dbms+0x1116a314)
    #7 DB::SyncPointCtl::sync(char const*) /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Common/SyncPoint/Ctl.cpp:86:5 (gtests_dbms+0x10cf7547)
    #8 DB::DM::GlobalPageIdAllocator::raiseTargetByLowerBound(std::__1::atomic<unsigned long>&, unsigned long) /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Storages/DeltaMerge/StoragePool/GlobalPageIdAllocator.cpp:34:9 (gtests_dbms+0xce35b13)
    #9 DB::DM::GlobalPageIdAllocator::raiseLogPageIdLowerBound(unsigned long) /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Storages/DeltaMerge/StoragePool/GlobalPageIdAllocator.h:32:60 (gtests_dbms+0x5f8f7cd)
    #10 DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0::operator()() const /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Storages/DeltaMerge/tests/gtest_global_page_id_allocator.cpp:90:64 (gtests_dbms+0x5f8f7cd)
    #11 decltype(std::declval<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>()()) std::__1::__invoke[abi:ue170006]<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>(DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0&&) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__type
_traits/invoke.h:340:25 (gtests_dbms+0x5f8f7cd)
    #12 void std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>::__execute[abi:ue170006]<>(std::__1::__tuple_indices<>) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:2194:16 (gtests_dbms+0x5f8f7cd)
    #13 std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>::operator()[abi:ue170006]() /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:2187:16 (gtests_dbms+0x5f8f7cd)
    #14 std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>::__execute() /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:1019:9 (gtests_dbms+0x5f8f7cd)
    #15 decltype(*std::declval<std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>*>().*std::declval<void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>::*)()>()()) std::__1::__invoke[abi:ue170006]<void (std::__1::_
_async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>*, void>(void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaise
dBeforeRaiseLowerBound_Test::TestBody()::$_0>>::*&&)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>*&&) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__type_traits/invoke.h:308:25 (gtests_dbms+0x5f8f8e1)
    #16 void std::__1::__thread_execute[abi:ue170006]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_Id
RaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>*, 2ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalP
ageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>*>&, std::__1::__tuple_indices<2ul>) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__thread/thread.h:221:5 (gtests_dbms+0x5f8f8e1)
    #17 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdA
llocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>*>>(void*) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__thread/thread.h:232:5 (gtests_dbms+0x5f8f8e1)

  Thread T155 (tid=112160, running) created by main thread at:
    #0 pthread_create /root/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1020:3 (gtests_dbms+0x2f6f4db)
    #1 std::__1::__libcpp_thread_create[abi:ue170006](unsigned long*, void* (*)(void*), void*) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__threading_support:371:10 (gtests_dbms+0x5f8e6b1)
    #2 std::__1::thread::thread<void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>*, void>(void (std::__1::__async_assoc_state<void, std::__1::__async_func
<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>::*&&)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>*&&) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__thread/thread.h:248:16 (gtests_dbms+0x5f8e6b1)
    #3 std::__1::future<void> std::__1::__make_async_assoc_state[abi:ue170006]<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>>(std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_1>&&) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:2163:5 (gtests_dbms+0x5f8e6b
1)
    #4 _ZNSt3__15asyncB8ue170006IZN2DB2DM5tests60GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test8TestBodyEvE3$_1JEEENS_6futureINS_11__invoke_ofIu7__decayIT_EJDpu7__decayIT0_EEE4typeEEENS_6launchEOS8_DpOSA_ /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:2214:16 (gtests_dbms+0x5f8e6b1)
    #5 _ZNSt3__15asyncB8ue170006IZN2DB2DM5tests60GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test8TestBodyEvE3$_1JEEENS_6futureINS_11__invoke_ofIu7__decayIT_EJDpu7__decayIT0_EEE4typeEEEOS8_DpOSA_ /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:2232:12 (gtests_dbms+0x5f8e6b1)
    #6 DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody() /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Storages/DeltaMerge/tests/gtest_global_page_id_allocator.cpp:91:35 (gtests_dbms+0x5f8e6b1)
    #7 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:2443:10 (gtests_dbms+0xd09d999)
    #8 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:2479:14 (gtests_dbms+0xd09d999)
    #9 testing::Test::Run() /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:2517:5 (gtests_dbms+0xd073133)
    #10 testing::TestInfo::Run() /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:2693:11 (gtests_dbms+0xd07494e)
    #11 testing::TestCase::Run() /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:2811:28 (gtests_dbms+0xd075933)
    #12 testing::internal::UnitTestImpl::RunAllTests() /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:5177:43 (gtests_dbms+0xd087d4a)
    #13 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:2443:10 (gtests_dbms+0xd09eead)
    #14 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:2479:14 (gtests_dbms+0xd09eead)
    #15 testing::UnitTest::Run() /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:4786:10 (gtests_dbms+0xd087614)
    #16 RUN_ALL_TESTS() /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/include/gtest/gtest.h:2341:46 (gtests_dbms+0x6899c36)
    #17 main /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/TestUtils/gtests_dbms_main.cpp:116:16 (gtests_dbms+0x6899c36)

  Thread T154 (tid=112159, running) created by main thread at:
    #0 pthread_create /root/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1020:3 (gtests_dbms+0x2f6f4db)
    #1 std::__1::__libcpp_thread_create[abi:ue170006](unsigned long*, void* (*)(void*), void*) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__threading_support:371:10 (gtests_dbms+0x5f8e5a7)
    #2 std::__1::thread::thread<void (std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>*, void>(void (std::__1::__async_assoc_state<void, std::__1::__async_func
<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>::*&&)(), std::__1::__async_assoc_state<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>*&&) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__thread/thread.h:248:16 (gtests_dbms+0x5f8e5a7)
    #3 std::__1::future<void> std::__1::__make_async_assoc_state[abi:ue170006]<void, std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>>(std::__1::__async_func<DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody()::$_0>&&) /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:2163:5 (gtests_dbms+0x5f8e5a
7)
    #4 _ZNSt3__15asyncB8ue170006IZN2DB2DM5tests60GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test8TestBodyEvE3$_0JEEENS_6futureINS_11__invoke_ofIu7__decayIT_EJDpu7__decayIT0_EEE4typeEEENS_6launchEOS8_DpOSA_ /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:2214:16 (gtests_dbms+0x5f8e5a7)
    #5 _ZNSt3__15asyncB8ue170006IZN2DB2DM5tests60GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test8TestBodyEvE3$_0JEEENS_6futureINS_11__invoke_ofIu7__decayIT_EJDpu7__decayIT0_EEE4typeEEEOS8_DpOSA_ /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:2232:12 (gtests_dbms+0x5f8e5a7)
    #6 DB::DM::tests::GlobalPageIdAllocatorTest_IdRaisedBeforeRaiseLowerBound_Test::TestBody() /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Storages/DeltaMerge/tests/gtest_global_page_id_allocator.cpp:90:35 (gtests_dbms+0x5f8e5a7)
    #7 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:2443:10 (gtests_dbms+0xd09d999)
    #8 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:2479:14 (gtests_dbms+0xd09d999)
    #9 testing::Test::Run() /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:2517:5 (gtests_dbms+0xd073133)
    #10 testing::TestInfo::Run() /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:2693:11 (gtests_dbms+0xd07494e)
    #11 testing::TestCase::Run() /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:2811:28 (gtests_dbms+0xd075933)
    #12 testing::internal::UnitTestImpl::RunAllTests() /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:5177:43 (gtests_dbms+0xd087d4a)
    #13 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:2443:10 (gtests_dbms+0xd09eead)
    #14 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:2479:14 (gtests_dbms+0xd09eead)
    #15 testing::UnitTest::Run() /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/src/gtest.cc:4786:10 (gtests_dbms+0xd087614)
    #16 RUN_ALL_TESTS() /DATA/disk1/jaysonhuang/tiflash-master/contrib/googletest/googletest/include/gtest/gtest.h:2341:46 (gtests_dbms+0x6899c36)
    #17 main /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/TestUtils/gtests_dbms_main.cpp:116:16 (gtests_dbms+0x6899c36)

SUMMARY: ThreadSanitizer: data race /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__string/constexpr_c_functions.h:49:10 in std::__1::__constexpr_strlen[abi:ue170006](char const*)
==================

4. What is your TiFlash version? (Required)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant