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

ThreadSanitizer in some UT #5302

Closed
hehechen opened this issue Jul 6, 2022 · 2 comments · Fixed by #5380 or #5621
Closed

ThreadSanitizer in some UT #5302

hehechen opened this issue Jul 6, 2022 · 2 comments · Fixed by #5380 or #5621
Assignees
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@hehechen
Copy link
Contributor

hehechen commented Jul 6, 2022

DynamicThreadPoolTest.testAutoExpanding
DynamicThreadPoolTest.testDynamicShrink
DynamicThreadPoolTest.testTaskDestruct
ExecutorTestRunner.JoinWithTableScan
ExecutorProjectionTestRunner.Projection
ExecutorTopNTestRunner.TopN
ExecutorTestRunner.JoinWithExchangeReceiver
ExecutorTopNTestRunner.TopNFunction
ExecutorTestRunner.JoinWithTableScanAndReceiver
ExecutorProjectionTestRunner.ProjectionFunction

https://ci.pingcap.net/blue/organizations/jenkins/tiflash-sanitizer-daily/detail/tiflash-sanitizer-daily/354/pipeline/

@hehechen hehechen added the type/enhancement The issue or PR belongs to an enhancement. label Jul 6, 2022
@ywqzzy ywqzzy self-assigned this Jul 7, 2022
@hehechen
Copy link
Contributor Author

hehechen commented Jul 7, 2022

==================
WARNING: ThreadSanitizer: data race (pid=19778)
  Write of size 8 at 0x7b640012fd58 by thread T32:
    #0 Stopwatch::start() /data1/chentongli/tics_new/tics/dbms/src/Common/Stopwatch.h:59:18 (gtests_dbms+0xab965e0)
    #1 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:56:30 (gtests_dbms+0xab965e0)
    #2 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #3 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::loop(unsigned long) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:291:37 (gtests_dbms+0xbeaaa1c)
    #4 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::thread(unsigned long) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:229:13 (gtests_dbms+0xbeaa380)
    #5 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()::operator()() const /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:129:81 (gtests_dbms+0xbea9de4)
    #6 decltype(static_cast<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(fp)()) std::__1::__invoke<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xbea9de4)
    #7 void std::__1::__invoke_void_return_wrapper<void, true>::__call<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/invoke.h:61:9 (gtests_dbms+0xbea9de4)
    #8 std::__1::__function::__alloc_func<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'(), std::__1::allocator<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()>, void ()>::operator()() /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:171:16 (gtests_dbms+0xbea9de4)
    #9 std::__1::__function::__func<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'(), std::__1::allocator<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()>, void ()>::operator()() /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:345:12 (gtests_dbms+0xbea9de4)
    #10 std::__1::__function::__value_func<void ()>::operator()() const /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:498:16 (gtests_dbms+0xd7cad5d)
    #11 std::__1::function<void ()>::operator()() const /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:1175:12 (gtests_dbms+0xd7cad5d)
    #12 decltype(static_cast<std::__1::function<void ()> const&>(fp)()) std::__1::__invoke<std::__1::function<void ()> const&>(std::__1::function<void ()> const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xd7cad5d)
    #13 std::__1::invoke_result<std::__1::function<void ()> const&>::type std::__1::invoke<std::__1::function<void ()> const&>(std::__1::function<void ()> const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/invoke.h:93:12 (gtests_dbms+0xd7cad5d)
    #14 auto std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)::operator()<>(auto&&...) const /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadFactory.h:47:20 (gtests_dbms+0xd7cad5d)
    #15 decltype(static_cast<std::__1::function<void ()>>(fp)()) std::__1::__invoke<std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>(std::__1::function<void ()>&&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xd7ca9e7)
    #16 void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>(std::__1::tuple<std::__1::function<void ()>, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>&, std::__1::__tuple_indices<>) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:280:5 (gtests_dbms+0xd7ca9e7)
    #17 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)> >(void*) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:291:5 (gtests_dbms+0xd7ca9e7)

  Previous write of size 8 at 0x7b640012fd58 by thread T31:
    #0 Stopwatch::start() /data1/chentongli/tics_new/tics/dbms/src/Common/Stopwatch.h:59:18 (gtests_dbms+0xab965e0)
    #1 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:56:30 (gtests_dbms+0xab965e0)
    #2 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #3 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::loop(unsigned long) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:291:37 (gtests_dbms+0xbeaaa1c)
    #4 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::thread(unsigned long) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:229:13 (gtests_dbms+0xbeaa380)
    #5 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()::operator()() const /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:129:81 (gtests_dbms+0xbea9de4)
    #6 decltype(static_cast<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(fp)()) std::__1::__invoke<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xbea9de4)
    #7 void std::__1::__invoke_void_return_wrapper<void, true>::__call<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/invoke.h:61:9 (gtests_dbms+0xbea9de4)
    #8 std::__1::__function::__alloc_func<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'(), std::__1::allocator<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()>, void ()>::operator()() /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:171:16 (gtests_dbms+0xbea9de4)
    #9 std::__1::__function::__func<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'(), std::__1::allocator<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()>, void ()>::operator()() /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:345:12 (gtests_dbms+0xbea9de4)
    #10 std::__1::__function::__value_func<void ()>::operator()() const /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:498:16 (gtests_dbms+0xd7cad5d)
    #11 std::__1::function<void ()>::operator()() const /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:1175:12 (gtests_dbms+0xd7cad5d)
    #12 decltype(static_cast<std::__1::function<void ()> const&>(fp)()) std::__1::__invoke<std::__1::function<void ()> const&>(std::__1::function<void ()> const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xd7cad5d)
    #13 std::__1::invoke_result<std::__1::function<void ()> const&>::type std::__1::invoke<std::__1::function<void ()> const&>(std::__1::function<void ()> const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/invoke.h:93:12 (gtests_dbms+0xd7cad5d)
    #14 auto std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)::operator()<>(auto&&...) const /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadFactory.h:47:20 (gtests_dbms+0xd7cad5d)
    #15 decltype(static_cast<std::__1::function<void ()>>(fp)()) std::__1::__invoke<std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>(std::__1::function<void ()>&&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xd7ca9e7)
    #16 void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>(std::__1::tuple<std::__1::function<void ()>, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>&, std::__1::__tuple_indices<>) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:280:5 (gtests_dbms+0xd7ca9e7)
    #17 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)> >(void*) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:291:5 (gtests_dbms+0xd7ca9e7)

  Location is heap block of size 1056 at 0x7b640012fc00 allocated by main thread:
    #0 operator new(unsigned long) /root/llvm-project/compiler-rt/lib/tsan/rtl/tsan_new_delete.cpp:64:3 (gtests_dbms+0x2522328)
    #1 void* std::__1::__libcpp_operator_new<unsigned long>(unsigned long) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/new:235:10 (gtests_dbms+0xca16682)
    #2 std::__1::__libcpp_allocate(unsigned long, unsigned long) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/new:261:10 (gtests_dbms+0xca16682)
    #3 std::__1::allocator<std::__1::__shared_ptr_emplace<DB::SharedQueryBlockInputStream, std::__1::allocator<DB::SharedQueryBlockInputStream> > >::allocate(unsigned long) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__memory/allocator.h:108:38 (gtests_dbms+0xca16682)
    #4 std::__1::allocator_traits<std::__1::allocator<std::__1::__shared_ptr_emplace<DB::SharedQueryBlockInputStream, std::__1::allocator<DB::SharedQueryBlockInputStream> > > >::allocate(std::__1::allocator<std::__1::__shared_ptr_emplace<DB::SharedQueryBlockInputStream, std::__1::allocator<DB::SharedQueryBlockInputStream> > >&, unsigned long) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__memory/allocator_traits.h:262:20 (gtests_dbms+0xca16682)
    #5 std::__1::__allocation_guard<std::__1::allocator<std::__1::__shared_ptr_emplace<DB::SharedQueryBlockInputStream, std::__1::allocator<DB::SharedQueryBlockInputStream> > > >::__allocation_guard<std::__1::allocator<DB::SharedQueryBlockInputStream> >(std::__1::allocator<DB::SharedQueryBlockInputStream>, unsigned long) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__memory/allocation_guard.h:57:18 (gtests_dbms+0xca16682)
    #6 std::__1::shared_ptr<DB::SharedQueryBlockInputStream> std::__1::allocate_shared<DB::SharedQueryBlockInputStream, std::__1::allocator<DB::SharedQueryBlockInputStream>, unsigned long, std::__1::shared_ptr<DB::IBlockInputStream>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void>(std::__1::allocator<DB::SharedQueryBlockInputStream> const&, unsigned long&&, std::__1::shared_ptr<DB::IBlockInputStream>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__memory/shared_ptr.h:1105:48 (gtests_dbms+0xca16682)
    #7 std::__1::shared_ptr<DB::SharedQueryBlockInputStream> std::__1::make_shared<DB::SharedQueryBlockInputStream, unsigned long, std::__1::shared_ptr<DB::IBlockInputStream>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void>(unsigned long&&, std::__1::shared_ptr<DB::IBlockInputStream>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__memory/shared_ptr.h:1115:12 (gtests_dbms+0xca16682)
    #8 DB::restoreConcurrency(DB::DAGPipeline&, unsigned long, std::__1::shared_ptr<DB::Logger> const&) /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/InterpreterUtils.cpp:36:15 (gtests_dbms+0xca16682)
    #9 DB::DAGQueryBlockInterpreter::restorePipelineConcurrency(DB::DAGPipeline&) /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/DAGQueryBlockInterpreter.cpp:771:9 (gtests_dbms+0xc9aa146)
    #10 DB::DAGQueryBlockInterpreter::executeImpl(DB::DAGPipeline&) /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/DAGQueryBlockInterpreter.cpp:699:5 (gtests_dbms+0xc9aa146)
    #11 DB::DAGQueryBlockInterpreter::execute() /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/DAGQueryBlockInterpreter.cpp:777:5 (gtests_dbms+0xc9abded)
    #12 DB::InterpreterDAG::executeQueryBlock(DB::DAGQueryBlock&) /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/InterpreterDAG.cpp:62:36 (gtests_dbms+0xc99b4b8)
    #13 DB::InterpreterDAG::execute() /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/InterpreterDAG.cpp:67:33 (gtests_dbms+0xc99b6c9)
    #14 DB::(anonymous namespace)::executeQueryImpl(DB::IQuerySource&, DB::Context&, bool, DB::QueryProcessingStage::Enum) /data1/chentongli/tics_new/tics/dbms/src/Interpreters/executeQuery.cpp:235:28 (gtests_dbms+0xc264298)
    #15 DB::executeQuery(DB::DAGQuerySource&, DB::Context&, bool, DB::QueryProcessingStage::Enum) /data1/chentongli/tics_new/tics/dbms/src/Interpreters/executeQuery.cpp:433:38 (gtests_dbms+0xc2660ea)
    #16 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > > > >&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:129:15 (gtests_dbms+0x40ab717)
    #17 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:134:5 (gtests_dbms+0x40ac747)
    #18 DB::tests::ExecutorTestRunner_JoinWithTableScan_Test::TestBody() /data1/chentongli/tics_new/tics/dbms/src/Flash/tests/gtest_executor.cpp:109:9 (gtests_dbms+0x271367e)
    #19 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a160e5)
    #20 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a160e5)
    #21 testing::Test::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2473:5 (gtests_dbms+0x99f5e05)
    #22 testing::TestInfo::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2655:11 (gtests_dbms+0x99f75d1)
    #23 testing::TestCase::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2773:28 (gtests_dbms+0x99f828d)
    #24 testing::internal::UnitTestImpl::RunAllTests() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4673:43 (gtests_dbms+0x9a03610)
    #25 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a171a5)
    #26 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a171a5)
    #27 testing::UnitTest::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4281:10 (gtests_dbms+0x9a02a93)
    #28 RUN_ALL_TESTS() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/include/gtest/gtest.h:2237:46 (gtests_dbms+0x3ffae87)
    #29 main /data1/chentongli/tics_new/tics/dbms/src/TestUtils/gtests_dbms_main.cpp:36:16 (gtests_dbms+0x3ffae87)

  Thread T32 'ParallelUnion' (tid=19831, running) created by main thread at:
    #0 pthread_create /root/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:977:3 (gtests_dbms+0x24ad74d)
    #1 std::__1::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__threading_support:514:10 (gtests_dbms+0xd7ca834)
    #2 std::__1::thread::thread<std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)&, void>(std::__1::function<void ()>&&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:307:16 (gtests_dbms+0xd7ca834)
    #3 std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&) /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadFactory.h:49:16 (gtests_dbms+0xd7ca5f3)
    #4 DB::(anonymous namespace)::RawThreadManager::schedule(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>) /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadManager.cpp:78:18 (gtests_dbms+0xd7c8b1a)
    #5 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:129:29 (gtests_dbms+0xbea9ac0)
    #6 DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::readImpl() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/UnionBlockInputStream.h:228:23 (gtests_dbms+0xbea5f66)
    #7 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:75:19 (gtests_dbms+0xab96ac8)
    #8 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #9 DB::CreatingSetsBlockInputStream::readImpl() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/CreatingSetsBlockInputStream.cpp:93:29 (gtests_dbms+0xc078ff3)
    #10 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:75:19 (gtests_dbms+0xab96ac8)
    #11 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #12 DB::tests::(anonymous namespace)::readBlock(std::__1::shared_ptr<DB::IBlockInputStream>, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:112:33 (gtests_dbms+0x40ab7cb)
    #13 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > > > >&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:129:5 (gtests_dbms+0x40ab7cb)
    #14 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:134:5 (gtests_dbms+0x40ac747)
    #15 DB::tests::ExecutorTestRunner_JoinWithTableScan_Test::TestBody() /data1/chentongli/tics_new/tics/dbms/src/Flash/tests/gtest_executor.cpp:109:9 (gtests_dbms+0x271367e)
    #16 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a160e5)
    #17 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a160e5)
    #18 testing::Test::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2473:5 (gtests_dbms+0x99f5e05)
    #19 testing::TestInfo::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2655:11 (gtests_dbms+0x99f75d1)
    #20 testing::TestCase::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2773:28 (gtests_dbms+0x99f828d)
    #21 testing::internal::UnitTestImpl::RunAllTests() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4673:43 (gtests_dbms+0x9a03610)
    #22 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a171a5)
    #23 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a171a5)
    #24 testing::UnitTest::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4281:10 (gtests_dbms+0x9a02a93)
    #25 RUN_ALL_TESTS() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/include/gtest/gtest.h:2237:46 (gtests_dbms+0x3ffae87)
    #26 main /data1/chentongli/tics_new/tics/dbms/src/TestUtils/gtests_dbms_main.cpp:36:16 (gtests_dbms+0x3ffae87)

  Thread T31 'ParallelUnion' (tid=19830, running) created by main thread at:
    #0 pthread_create /root/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:977:3 (gtests_dbms+0x24ad74d)
    #1 std::__1::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__threading_support:514:10 (gtests_dbms+0xd7ca834)
    #2 std::__1::thread::thread<std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)&, void>(std::__1::function<void ()>&&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:307:16 (gtests_dbms+0xd7ca834)
    #3 std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&) /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadFactory.h:49:16 (gtests_dbms+0xd7ca5f3)
    #4 DB::(anonymous namespace)::RawThreadManager::schedule(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>) /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadManager.cpp:78:18 (gtests_dbms+0xd7c8b1a)
    #5 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:129:29 (gtests_dbms+0xbea9ac0)
    #6 DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::readImpl() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/UnionBlockInputStream.h:228:23 (gtests_dbms+0xbea5f66)
    #7 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:75:19 (gtests_dbms+0xab96ac8)
    #8 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #9 DB::CreatingSetsBlockInputStream::readImpl() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/CreatingSetsBlockInputStream.cpp:93:29 (gtests_dbms+0xc078ff3)
    #10 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:75:19 (gtests_dbms+0xab96ac8)
    #11 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #12 DB::tests::(anonymous namespace)::readBlock(std::__1::shared_ptr<DB::IBlockInputStream>, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:112:33 (gtests_dbms+0x40ab7cb)
    #13 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > > > >&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:129:5 (gtests_dbms+0x40ab7cb)
    #14 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:134:5 (gtests_dbms+0x40ac747)
    #15 DB::tests::ExecutorTestRunner_JoinWithTableScan_Test::TestBody() /data1/chentongli/tics_new/tics/dbms/src/Flash/tests/gtest_executor.cpp:109:9 (gtests_dbms+0x271367e)
    #16 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a160e5)
    #17 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a160e5)
    #18 testing::Test::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2473:5 (gtests_dbms+0x99f5e05)
    #19 testing::TestInfo::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2655:11 (gtests_dbms+0x99f75d1)
    #20 testing::TestCase::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2773:28 (gtests_dbms+0x99f828d)
    #21 testing::internal::UnitTestImpl::RunAllTests() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4673:43 (gtests_dbms+0x9a03610)
    #22 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a171a5)
    #23 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a171a5)
    #24 testing::UnitTest::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4281:10 (gtests_dbms+0x9a02a93)
    #25 RUN_ALL_TESTS() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/include/gtest/gtest.h:2237:46 (gtests_dbms+0x3ffae87)
    #26 main /data1/chentongli/tics_new/tics/dbms/src/TestUtils/gtests_dbms_main.cpp:36:16 (gtests_dbms+0x3ffae87)

SUMMARY: ThreadSanitizer: data race /data1/chentongli/tics_new/tics/dbms/src/Common/Stopwatch.h:59:18 in Stopwatch::start()
==================
==================
WARNING: ThreadSanitizer: data race (pid=19778)
  Write of size 8 at 0x7b640012fd68 by thread T32:
    #0 Stopwatch::start() /data1/chentongli/tics_new/tics/dbms/src/Common/Stopwatch.h:60:17 (gtests_dbms+0xab965f5)
    #1 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:56:30 (gtests_dbms+0xab965f5)
    #2 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #3 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::loop(unsigned long) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:291:37 (gtests_dbms+0xbeaaa1c)
    #4 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::thread(unsigned long) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:229:13 (gtests_dbms+0xbeaa380)
    #5 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()::operator()() const /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:129:81 (gtests_dbms+0xbea9de4)
    #6 decltype(static_cast<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(fp)()) std::__1::__invoke<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xbea9de4)
    #7 void std::__1::__invoke_void_return_wrapper<void, true>::__call<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/invoke.h:61:9 (gtests_dbms+0xbea9de4)
    #8 std::__1::__function::__alloc_func<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'(), std::__1::allocator<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()>, void ()>::operator()() /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:171:16 (gtests_dbms+0xbea9de4)
    #9 std::__1::__function::__func<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'(), std::__1::allocator<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()>, void ()>::operator()() /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:345:12 (gtests_dbms+0xbea9de4)
    #10 std::__1::__function::__value_func<void ()>::operator()() const /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:498:16 (gtests_dbms+0xd7cad5d)
    #11 std::__1::function<void ()>::operator()() const /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:1175:12 (gtests_dbms+0xd7cad5d)
    #12 decltype(static_cast<std::__1::function<void ()> const&>(fp)()) std::__1::__invoke<std::__1::function<void ()> const&>(std::__1::function<void ()> const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xd7cad5d)
    #13 std::__1::invoke_result<std::__1::function<void ()> const&>::type std::__1::invoke<std::__1::function<void ()> const&>(std::__1::function<void ()> const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/invoke.h:93:12 (gtests_dbms+0xd7cad5d)
    #14 auto std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)::operator()<>(auto&&...) const /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadFactory.h:47:20 (gtests_dbms+0xd7cad5d)
    #15 decltype(static_cast<std::__1::function<void ()>>(fp)()) std::__1::__invoke<std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>(std::__1::function<void ()>&&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xd7ca9e7)
    #16 void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>(std::__1::tuple<std::__1::function<void ()>, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>&, std::__1::__tuple_indices<>) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:280:5 (gtests_dbms+0xd7ca9e7)
    #17 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)> >(void*) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:291:5 (gtests_dbms+0xd7ca9e7)

  Previous write of size 8 at 0x7b640012fd68 by thread T31:
    #0 Stopwatch::start() /data1/chentongli/tics_new/tics/dbms/src/Common/Stopwatch.h:60:17 (gtests_dbms+0xab965f5)
    #1 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:56:30 (gtests_dbms+0xab965f5)
    #2 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #3 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::loop(unsigned long) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:291:37 (gtests_dbms+0xbeaaa1c)
    #4 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::thread(unsigned long) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:229:13 (gtests_dbms+0xbeaa380)
    #5 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()::operator()() const /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:129:81 (gtests_dbms+0xbea9de4)
    #6 decltype(static_cast<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(fp)()) std::__1::__invoke<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xbea9de4)
    #7 void std::__1::__invoke_void_return_wrapper<void, true>::__call<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/invoke.h:61:9 (gtests_dbms+0xbea9de4)
    #8 std::__1::__function::__alloc_func<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'(), std::__1::allocator<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()>, void ()>::operator()() /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:171:16 (gtests_dbms+0xbea9de4)
    #9 std::__1::__function::__func<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'(), std::__1::allocator<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()>, void ()>::operator()() /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:345:12 (gtests_dbms+0xbea9de4)
    #10 std::__1::__function::__value_func<void ()>::operator()() const /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:498:16 (gtests_dbms+0xd7cad5d)
    #11 std::__1::function<void ()>::operator()() const /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:1175:12 (gtests_dbms+0xd7cad5d)
    #12 decltype(static_cast<std::__1::function<void ()> const&>(fp)()) std::__1::__invoke<std::__1::function<void ()> const&>(std::__1::function<void ()> const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xd7cad5d)
    #13 std::__1::invoke_result<std::__1::function<void ()> const&>::type std::__1::invoke<std::__1::function<void ()> const&>(std::__1::function<void ()> const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/invoke.h:93:12 (gtests_dbms+0xd7cad5d)
    #14 auto std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)::operator()<>(auto&&...) const /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadFactory.h:47:20 (gtests_dbms+0xd7cad5d)
    #15 decltype(static_cast<std::__1::function<void ()>>(fp)()) std::__1::__invoke<std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>(std::__1::function<void ()>&&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xd7ca9e7)
    #16 void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>(std::__1::tuple<std::__1::function<void ()>, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>&, std::__1::__tuple_indices<>) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:280:5 (gtests_dbms+0xd7ca9e7)
    #17 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)> >(void*) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:291:5 (gtests_dbms+0xd7ca9e7)

  Location is heap block of size 1056 at 0x7b640012fc00 allocated by main thread:
    #0 operator new(unsigned long) /root/llvm-project/compiler-rt/lib/tsan/rtl/tsan_new_delete.cpp:64:3 (gtests_dbms+0x2522328)
    #1 void* std::__1::__libcpp_operator_new<unsigned long>(unsigned long) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/new:235:10 (gtests_dbms+0xca16682)
    #2 std::__1::__libcpp_allocate(unsigned long, unsigned long) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/new:261:10 (gtests_dbms+0xca16682)
    #3 std::__1::allocator<std::__1::__shared_ptr_emplace<DB::SharedQueryBlockInputStream, std::__1::allocator<DB::SharedQueryBlockInputStream> > >::allocate(unsigned long) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__memory/allocator.h:108:38 (gtests_dbms+0xca16682)
    #4 std::__1::allocator_traits<std::__1::allocator<std::__1::__shared_ptr_emplace<DB::SharedQueryBlockInputStream, std::__1::allocator<DB::SharedQueryBlockInputStream> > > >::allocate(std::__1::allocator<std::__1::__shared_ptr_emplace<DB::SharedQueryBlockInputStream, std::__1::allocator<DB::SharedQueryBlockInputStream> > >&, unsigned long) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__memory/allocator_traits.h:262:20 (gtests_dbms+0xca16682)
    #5 std::__1::__allocation_guard<std::__1::allocator<std::__1::__shared_ptr_emplace<DB::SharedQueryBlockInputStream, std::__1::allocator<DB::SharedQueryBlockInputStream> > > >::__allocation_guard<std::__1::allocator<DB::SharedQueryBlockInputStream> >(std::__1::allocator<DB::SharedQueryBlockInputStream>, unsigned long) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__memory/allocation_guard.h:57:18 (gtests_dbms+0xca16682)
    #6 std::__1::shared_ptr<DB::SharedQueryBlockInputStream> std::__1::allocate_shared<DB::SharedQueryBlockInputStream, std::__1::allocator<DB::SharedQueryBlockInputStream>, unsigned long, std::__1::shared_ptr<DB::IBlockInputStream>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void>(std::__1::allocator<DB::SharedQueryBlockInputStream> const&, unsigned long&&, std::__1::shared_ptr<DB::IBlockInputStream>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__memory/shared_ptr.h:1105:48 (gtests_dbms+0xca16682)
    #7 std::__1::shared_ptr<DB::SharedQueryBlockInputStream> std::__1::make_shared<DB::SharedQueryBlockInputStream, unsigned long, std::__1::shared_ptr<DB::IBlockInputStream>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void>(unsigned long&&, std::__1::shared_ptr<DB::IBlockInputStream>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__memory/shared_ptr.h:1115:12 (gtests_dbms+0xca16682)
    #8 DB::restoreConcurrency(DB::DAGPipeline&, unsigned long, std::__1::shared_ptr<DB::Logger> const&) /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/InterpreterUtils.cpp:36:15 (gtests_dbms+0xca16682)
    #9 DB::DAGQueryBlockInterpreter::restorePipelineConcurrency(DB::DAGPipeline&) /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/DAGQueryBlockInterpreter.cpp:771:9 (gtests_dbms+0xc9aa146)
    #10 DB::DAGQueryBlockInterpreter::executeImpl(DB::DAGPipeline&) /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/DAGQueryBlockInterpreter.cpp:699:5 (gtests_dbms+0xc9aa146)
    #11 DB::DAGQueryBlockInterpreter::execute() /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/DAGQueryBlockInterpreter.cpp:777:5 (gtests_dbms+0xc9abded)
    #12 DB::InterpreterDAG::executeQueryBlock(DB::DAGQueryBlock&) /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/InterpreterDAG.cpp:62:36 (gtests_dbms+0xc99b4b8)
    #13 DB::InterpreterDAG::execute() /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/InterpreterDAG.cpp:67:33 (gtests_dbms+0xc99b6c9)
    #14 DB::(anonymous namespace)::executeQueryImpl(DB::IQuerySource&, DB::Context&, bool, DB::QueryProcessingStage::Enum) /data1/chentongli/tics_new/tics/dbms/src/Interpreters/executeQuery.cpp:235:28 (gtests_dbms+0xc264298)
    #15 DB::executeQuery(DB::DAGQuerySource&, DB::Context&, bool, DB::QueryProcessingStage::Enum) /data1/chentongli/tics_new/tics/dbms/src/Interpreters/executeQuery.cpp:433:38 (gtests_dbms+0xc2660ea)
    #16 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > > > >&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:129:15 (gtests_dbms+0x40ab717)
    #17 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:134:5 (gtests_dbms+0x40ac747)
    #18 DB::tests::ExecutorTestRunner_JoinWithTableScan_Test::TestBody() /data1/chentongli/tics_new/tics/dbms/src/Flash/tests/gtest_executor.cpp:109:9 (gtests_dbms+0x271367e)
    #19 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a160e5)
    #20 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a160e5)
    #21 testing::Test::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2473:5 (gtests_dbms+0x99f5e05)
    #22 testing::TestInfo::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2655:11 (gtests_dbms+0x99f75d1)
    #23 testing::TestCase::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2773:28 (gtests_dbms+0x99f828d)
    #24 testing::internal::UnitTestImpl::RunAllTests() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4673:43 (gtests_dbms+0x9a03610)
    #25 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a171a5)
    #26 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a171a5)
    #27 testing::UnitTest::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4281:10 (gtests_dbms+0x9a02a93)
    #28 RUN_ALL_TESTS() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/include/gtest/gtest.h:2237:46 (gtests_dbms+0x3ffae87)
    #29 main /data1/chentongli/tics_new/tics/dbms/src/TestUtils/gtests_dbms_main.cpp:36:16 (gtests_dbms+0x3ffae87)

  Thread T32 'ParallelUnion' (tid=19831, running) created by main thread at:
    #0 pthread_create /root/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:977:3 (gtests_dbms+0x24ad74d)
    #1 std::__1::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__threading_support:514:10 (gtests_dbms+0xd7ca834)
    #2 std::__1::thread::thread<std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)&, void>(std::__1::function<void ()>&&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:307:16 (gtests_dbms+0xd7ca834)
    #3 std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&) /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadFactory.h:49:16 (gtests_dbms+0xd7ca5f3)
    #4 DB::(anonymous namespace)::RawThreadManager::schedule(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>) /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadManager.cpp:78:18 (gtests_dbms+0xd7c8b1a)
    #5 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:129:29 (gtests_dbms+0xbea9ac0)
    #6 DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::readImpl() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/UnionBlockInputStream.h:228:23 (gtests_dbms+0xbea5f66)
    #7 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:75:19 (gtests_dbms+0xab96ac8)
    #8 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #9 DB::CreatingSetsBlockInputStream::readImpl() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/CreatingSetsBlockInputStream.cpp:93:29 (gtests_dbms+0xc078ff3)
    #10 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:75:19 (gtests_dbms+0xab96ac8)
    #11 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #12 DB::tests::(anonymous namespace)::readBlock(std::__1::shared_ptr<DB::IBlockInputStream>, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:112:33 (gtests_dbms+0x40ab7cb)
    #13 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > > > >&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:129:5 (gtests_dbms+0x40ab7cb)
    #14 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:134:5 (gtests_dbms+0x40ac747)
    #15 DB::tests::ExecutorTestRunner_JoinWithTableScan_Test::TestBody() /data1/chentongli/tics_new/tics/dbms/src/Flash/tests/gtest_executor.cpp:109:9 (gtests_dbms+0x271367e)
    #16 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a160e5)
    #17 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a160e5)
    #18 testing::Test::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2473:5 (gtests_dbms+0x99f5e05)
    #19 testing::TestInfo::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2655:11 (gtests_dbms+0x99f75d1)
    #20 testing::TestCase::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2773:28 (gtests_dbms+0x99f828d)
    #21 testing::internal::UnitTestImpl::RunAllTests() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4673:43 (gtests_dbms+0x9a03610)
    #22 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a171a5)
    #23 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a171a5)
    #24 testing::UnitTest::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4281:10 (gtests_dbms+0x9a02a93)
    #25 RUN_ALL_TESTS() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/include/gtest/gtest.h:2237:46 (gtests_dbms+0x3ffae87)
    #26 main /data1/chentongli/tics_new/tics/dbms/src/TestUtils/gtests_dbms_main.cpp:36:16 (gtests_dbms+0x3ffae87)

  Thread T31 'ParallelUnion' (tid=19830, running) created by main thread at:
    #0 pthread_create /root/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:977:3 (gtests_dbms+0x24ad74d)
    #1 std::__1::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__threading_support:514:10 (gtests_dbms+0xd7ca834)
    #2 std::__1::thread::thread<std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)&, void>(std::__1::function<void ()>&&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:307:16 (gtests_dbms+0xd7ca834)
    #3 std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&) /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadFactory.h:49:16 (gtests_dbms+0xd7ca5f3)
    #4 DB::(anonymous namespace)::RawThreadManager::schedule(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>) /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadManager.cpp:78:18 (gtests_dbms+0xd7c8b1a)
    #5 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:129:29 (gtests_dbms+0xbea9ac0)
    #6 DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::readImpl() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/UnionBlockInputStream.h:228:23 (gtests_dbms+0xbea5f66)
    #7 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:75:19 (gtests_dbms+0xab96ac8)
    #8 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #9 DB::CreatingSetsBlockInputStream::readImpl() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/CreatingSetsBlockInputStream.cpp:93:29 (gtests_dbms+0xc078ff3)
    #10 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:75:19 (gtests_dbms+0xab96ac8)
    #11 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #12 DB::tests::(anonymous namespace)::readBlock(std::__1::shared_ptr<DB::IBlockInputStream>, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:112:33 (gtests_dbms+0x40ab7cb)
    #13 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > > > >&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:129:5 (gtests_dbms+0x40ab7cb)
    #14 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:134:5 (gtests_dbms+0x40ac747)
    #15 DB::tests::ExecutorTestRunner_JoinWithTableScan_Test::TestBody() /data1/chentongli/tics_new/tics/dbms/src/Flash/tests/gtest_executor.cpp:109:9 (gtests_dbms+0x271367e)
    #16 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a160e5)
    #17 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a160e5)
    #18 testing::Test::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2473:5 (gtests_dbms+0x99f5e05)
    #19 testing::TestInfo::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2655:11 (gtests_dbms+0x99f75d1)
    #20 testing::TestCase::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2773:28 (gtests_dbms+0x99f828d)
    #21 testing::internal::UnitTestImpl::RunAllTests() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4673:43 (gtests_dbms+0x9a03610)
    #22 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a171a5)
    #23 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a171a5)
    #24 testing::UnitTest::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4281:10 (gtests_dbms+0x9a02a93)
    #25 RUN_ALL_TESTS() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/include/gtest/gtest.h:2237:46 (gtests_dbms+0x3ffae87)
    #26 main /data1/chentongli/tics_new/tics/dbms/src/TestUtils/gtests_dbms_main.cpp:36:16 (gtests_dbms+0x3ffae87)

SUMMARY: ThreadSanitizer: data race /data1/chentongli/tics_new/tics/dbms/src/Common/Stopwatch.h:60:17 in Stopwatch::start()
==================
==================
WARNING: ThreadSanitizer: data race (pid=19778)
  Write of size 1 at 0x7b640012fd74 by thread T32:
    #0 Stopwatch::start() /data1/chentongli/tics_new/tics/dbms/src/Common/Stopwatch.h:61:20 (gtests_dbms+0xab9660a)
    #1 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:56:30 (gtests_dbms+0xab9660a)
    #2 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #3 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::loop(unsigned long) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:291:37 (gtests_dbms+0xbeaaa1c)
    #4 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::thread(unsigned long) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:229:13 (gtests_dbms+0xbeaa380)
    #5 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()::operator()() const /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:129:81 (gtests_dbms+0xbea9de4)
    #6 decltype(static_cast<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(fp)()) std::__1::__invoke<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xbea9de4)
    #7 void std::__1::__invoke_void_return_wrapper<void, true>::__call<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/invoke.h:61:9 (gtests_dbms+0xbea9de4)
    #8 std::__1::__function::__alloc_func<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'(), std::__1::allocator<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()>, void ()>::operator()() /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:171:16 (gtests_dbms+0xbea9de4)
    #9 std::__1::__function::__func<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'(), std::__1::allocator<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()>, void ()>::operator()() /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:345:12 (gtests_dbms+0xbea9de4)
    #10 std::__1::__function::__value_func<void ()>::operator()() const /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:498:16 (gtests_dbms+0xd7cad5d)
    #11 std::__1::function<void ()>::operator()() const /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:1175:12 (gtests_dbms+0xd7cad5d)
    #12 decltype(static_cast<std::__1::function<void ()> const&>(fp)()) std::__1::__invoke<std::__1::function<void ()> const&>(std::__1::function<void ()> const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xd7cad5d)
    #13 std::__1::invoke_result<std::__1::function<void ()> const&>::type std::__1::invoke<std::__1::function<void ()> const&>(std::__1::function<void ()> const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/invoke.h:93:12 (gtests_dbms+0xd7cad5d)
    #14 auto std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)::operator()<>(auto&&...) const /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadFactory.h:47:20 (gtests_dbms+0xd7cad5d)
    #15 decltype(static_cast<std::__1::function<void ()>>(fp)()) std::__1::__invoke<std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>(std::__1::function<void ()>&&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xd7ca9e7)
    #16 void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>(std::__1::tuple<std::__1::function<void ()>, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>&, std::__1::__tuple_indices<>) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:280:5 (gtests_dbms+0xd7ca9e7)
    #17 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)> >(void*) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:291:5 (gtests_dbms+0xd7ca9e7)

  Previous write of size 1 at 0x7b640012fd74 by thread T31:
    #0 Stopwatch::start() /data1/chentongli/tics_new/tics/dbms/src/Common/Stopwatch.h:61:20 (gtests_dbms+0xab9660a)
    #1 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:56:30 (gtests_dbms+0xab9660a)
    #2 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #3 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::loop(unsigned long) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:291:37 (gtests_dbms+0xbeaaa1c)
    #4 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::thread(unsigned long) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:229:13 (gtests_dbms+0xbeaa380)
    #5 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()::operator()() const /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:129:81 (gtests_dbms+0xbea9de4)
    #6 decltype(static_cast<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(fp)()) std::__1::__invoke<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xbea9de4)
    #7 void std::__1::__invoke_void_return_wrapper<void, true>::__call<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&>(DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/invoke.h:61:9 (gtests_dbms+0xbea9de4)
    #8 std::__1::__function::__alloc_func<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'(), std::__1::allocator<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()>, void ()>::operator()() /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:171:16 (gtests_dbms+0xbea9de4)
    #9 std::__1::__function::__func<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'(), std::__1::allocator<DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process()::'lambda'()>, void ()>::operator()() /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:345:12 (gtests_dbms+0xbea9de4)
    #10 std::__1::__function::__value_func<void ()>::operator()() const /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:498:16 (gtests_dbms+0xd7cad5d)
    #11 std::__1::function<void ()>::operator()() const /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/function.h:1175:12 (gtests_dbms+0xd7cad5d)
    #12 decltype(static_cast<std::__1::function<void ()> const&>(fp)()) std::__1::__invoke<std::__1::function<void ()> const&>(std::__1::function<void ()> const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xd7cad5d)
    #13 std::__1::invoke_result<std::__1::function<void ()> const&>::type std::__1::invoke<std::__1::function<void ()> const&>(std::__1::function<void ()> const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__functional/invoke.h:93:12 (gtests_dbms+0xd7cad5d)
    #14 auto std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)::operator()<>(auto&&...) const /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadFactory.h:47:20 (gtests_dbms+0xd7cad5d)
    #15 decltype(static_cast<std::__1::function<void ()>>(fp)()) std::__1::__invoke<std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>(std::__1::function<void ()>&&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/type_traits:3918:1 (gtests_dbms+0xd7ca9e7)
    #16 void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>(std::__1::tuple<std::__1::function<void ()>, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)>&, std::__1::__tuple_indices<>) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:280:5 (gtests_dbms+0xd7ca9e7)
    #17 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)> >(void*) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:291:5 (gtests_dbms+0xd7ca9e7)

  Location is heap block of size 1056 at 0x7b640012fc00 allocated by main thread:
    #0 operator new(unsigned long) /root/llvm-project/compiler-rt/lib/tsan/rtl/tsan_new_delete.cpp:64:3 (gtests_dbms+0x2522328)
    #1 void* std::__1::__libcpp_operator_new<unsigned long>(unsigned long) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/new:235:10 (gtests_dbms+0xca16682)
    #2 std::__1::__libcpp_allocate(unsigned long, unsigned long) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/new:261:10 (gtests_dbms+0xca16682)
    #3 std::__1::allocator<std::__1::__shared_ptr_emplace<DB::SharedQueryBlockInputStream, std::__1::allocator<DB::SharedQueryBlockInputStream> > >::allocate(unsigned long) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__memory/allocator.h:108:38 (gtests_dbms+0xca16682)
    #4 std::__1::allocator_traits<std::__1::allocator<std::__1::__shared_ptr_emplace<DB::SharedQueryBlockInputStream, std::__1::allocator<DB::SharedQueryBlockInputStream> > > >::allocate(std::__1::allocator<std::__1::__shared_ptr_emplace<DB::SharedQueryBlockInputStream, std::__1::allocator<DB::SharedQueryBlockInputStream> > >&, unsigned long) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__memory/allocator_traits.h:262:20 (gtests_dbms+0xca16682)
    #5 std::__1::__allocation_guard<std::__1::allocator<std::__1::__shared_ptr_emplace<DB::SharedQueryBlockInputStream, std::__1::allocator<DB::SharedQueryBlockInputStream> > > >::__allocation_guard<std::__1::allocator<DB::SharedQueryBlockInputStream> >(std::__1::allocator<DB::SharedQueryBlockInputStream>, unsigned long) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__memory/allocation_guard.h:57:18 (gtests_dbms+0xca16682)
    #6 std::__1::shared_ptr<DB::SharedQueryBlockInputStream> std::__1::allocate_shared<DB::SharedQueryBlockInputStream, std::__1::allocator<DB::SharedQueryBlockInputStream>, unsigned long, std::__1::shared_ptr<DB::IBlockInputStream>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void>(std::__1::allocator<DB::SharedQueryBlockInputStream> const&, unsigned long&&, std::__1::shared_ptr<DB::IBlockInputStream>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__memory/shared_ptr.h:1105:48 (gtests_dbms+0xca16682)
    #7 std::__1::shared_ptr<DB::SharedQueryBlockInputStream> std::__1::make_shared<DB::SharedQueryBlockInputStream, unsigned long, std::__1::shared_ptr<DB::IBlockInputStream>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void>(unsigned long&&, std::__1::shared_ptr<DB::IBlockInputStream>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__memory/shared_ptr.h:1115:12 (gtests_dbms+0xca16682)
    #8 DB::restoreConcurrency(DB::DAGPipeline&, unsigned long, std::__1::shared_ptr<DB::Logger> const&) /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/InterpreterUtils.cpp:36:15 (gtests_dbms+0xca16682)
    #9 DB::DAGQueryBlockInterpreter::restorePipelineConcurrency(DB::DAGPipeline&) /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/DAGQueryBlockInterpreter.cpp:771:9 (gtests_dbms+0xc9aa146)
    #10 DB::DAGQueryBlockInterpreter::executeImpl(DB::DAGPipeline&) /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/DAGQueryBlockInterpreter.cpp:699:5 (gtests_dbms+0xc9aa146)
    #11 DB::DAGQueryBlockInterpreter::execute() /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/DAGQueryBlockInterpreter.cpp:777:5 (gtests_dbms+0xc9abded)
    #12 DB::InterpreterDAG::executeQueryBlock(DB::DAGQueryBlock&) /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/InterpreterDAG.cpp:62:36 (gtests_dbms+0xc99b4b8)
    #13 DB::InterpreterDAG::execute() /data1/chentongli/tics_new/tics/dbms/src/Flash/Coprocessor/InterpreterDAG.cpp:67:33 (gtests_dbms+0xc99b6c9)
    #14 DB::(anonymous namespace)::executeQueryImpl(DB::IQuerySource&, DB::Context&, bool, DB::QueryProcessingStage::Enum) /data1/chentongli/tics_new/tics/dbms/src/Interpreters/executeQuery.cpp:235:28 (gtests_dbms+0xc264298)
    #15 DB::executeQuery(DB::DAGQuerySource&, DB::Context&, bool, DB::QueryProcessingStage::Enum) /data1/chentongli/tics_new/tics/dbms/src/Interpreters/executeQuery.cpp:433:38 (gtests_dbms+0xc2660ea)
    #16 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > > > >&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:129:15 (gtests_dbms+0x40ab717)
    #17 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:134:5 (gtests_dbms+0x40ac747)
    #18 DB::tests::ExecutorTestRunner_JoinWithTableScan_Test::TestBody() /data1/chentongli/tics_new/tics/dbms/src/Flash/tests/gtest_executor.cpp:109:9 (gtests_dbms+0x271367e)
    #19 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a160e5)
    #20 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a160e5)
    #21 testing::Test::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2473:5 (gtests_dbms+0x99f5e05)
    #22 testing::TestInfo::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2655:11 (gtests_dbms+0x99f75d1)
    #23 testing::TestCase::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2773:28 (gtests_dbms+0x99f828d)
    #24 testing::internal::UnitTestImpl::RunAllTests() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4673:43 (gtests_dbms+0x9a03610)
    #25 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a171a5)
    #26 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a171a5)
    #27 testing::UnitTest::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4281:10 (gtests_dbms+0x9a02a93)
    #28 RUN_ALL_TESTS() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/include/gtest/gtest.h:2237:46 (gtests_dbms+0x3ffae87)
    #29 main /data1/chentongli/tics_new/tics/dbms/src/TestUtils/gtests_dbms_main.cpp:36:16 (gtests_dbms+0x3ffae87)

  Thread T32 'ParallelUnion' (tid=19831, running) created by main thread at:
    #0 pthread_create /root/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:977:3 (gtests_dbms+0x24ad74d)
    #1 std::__1::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__threading_support:514:10 (gtests_dbms+0xd7ca834)
    #2 std::__1::thread::thread<std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)&, void>(std::__1::function<void ()>&&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:307:16 (gtests_dbms+0xd7ca834)
    #3 std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&) /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadFactory.h:49:16 (gtests_dbms+0xd7ca5f3)
    #4 DB::(anonymous namespace)::RawThreadManager::schedule(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>) /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadManager.cpp:78:18 (gtests_dbms+0xd7c8b1a)
    #5 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:129:29 (gtests_dbms+0xbea9ac0)
    #6 DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::readImpl() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/UnionBlockInputStream.h:228:23 (gtests_dbms+0xbea5f66)
    #7 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:75:19 (gtests_dbms+0xab96ac8)
    #8 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #9 DB::CreatingSetsBlockInputStream::readImpl() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/CreatingSetsBlockInputStream.cpp:93:29 (gtests_dbms+0xc078ff3)
    #10 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:75:19 (gtests_dbms+0xab96ac8)
    #11 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #12 DB::tests::(anonymous namespace)::readBlock(std::__1::shared_ptr<DB::IBlockInputStream>, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:112:33 (gtests_dbms+0x40ab7cb)
    #13 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > > > >&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:129:5 (gtests_dbms+0x40ab7cb)
    #14 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:134:5 (gtests_dbms+0x40ac747)
    #15 DB::tests::ExecutorTestRunner_JoinWithTableScan_Test::TestBody() /data1/chentongli/tics_new/tics/dbms/src/Flash/tests/gtest_executor.cpp:109:9 (gtests_dbms+0x271367e)
    #16 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a160e5)
    #17 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a160e5)
    #18 testing::Test::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2473:5 (gtests_dbms+0x99f5e05)
    #19 testing::TestInfo::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2655:11 (gtests_dbms+0x99f75d1)
    #20 testing::TestCase::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2773:28 (gtests_dbms+0x99f828d)
    #21 testing::internal::UnitTestImpl::RunAllTests() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4673:43 (gtests_dbms+0x9a03610)
    #22 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a171a5)
    #23 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a171a5)
    #24 testing::UnitTest::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4281:10 (gtests_dbms+0x9a02a93)
    #25 RUN_ALL_TESTS() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/include/gtest/gtest.h:2237:46 (gtests_dbms+0x3ffae87)
    #26 main /data1/chentongli/tics_new/tics/dbms/src/TestUtils/gtests_dbms_main.cpp:36:16 (gtests_dbms+0x3ffae87)

  Thread T31 'ParallelUnion' (tid=19830, running) created by main thread at:
    #0 pthread_create /root/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:977:3 (gtests_dbms+0x24ad74d)
    #1 std::__1::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/__threading_support:514:10 (gtests_dbms+0xd7ca834)
    #2 std::__1::thread::thread<std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&)::'lambda'(auto&&...)&, void>(std::__1::function<void ()>&&) /data1/chentongli/tiflash-env/sysroot/bin/../include/c++/v1/thread:307:16 (gtests_dbms+0xd7ca834)
    #3 std::__1::thread DB::ThreadFactory::newThread<std::__1::function<void ()> >(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>&&) /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadFactory.h:49:16 (gtests_dbms+0xd7ca5f3)
    #4 DB::(anonymous namespace)::RawThreadManager::schedule(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>) /data1/chentongli/tics_new/tics/dbms/src/Common/ThreadManager.cpp:78:18 (gtests_dbms+0xd7c8b1a)
    #5 DB::ParallelInputsProcessor<DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::Handler, (DB::StreamUnionMode)0>::process() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/ParallelInputsProcessor.h:129:29 (gtests_dbms+0xbea9ac0)
    #6 DB::UnionBlockInputStream<(DB::StreamUnionMode)0, false>::readImpl() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/UnionBlockInputStream.h:228:23 (gtests_dbms+0xbea5f66)
    #7 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:75:19 (gtests_dbms+0xab96ac8)
    #8 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #9 DB::CreatingSetsBlockInputStream::readImpl() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/CreatingSetsBlockInputStream.cpp:93:29 (gtests_dbms+0xc078ff3)
    #10 DB::IProfilingBlockInputStream::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool) /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:75:19 (gtests_dbms+0xab96ac8)
    #11 DB::IProfilingBlockInputStream::read() /data1/chentongli/tics_new/tics/dbms/src/DataStreams/IProfilingBlockInputStream.cpp:43:12 (gtests_dbms+0xab964ea)
    #12 DB::tests::(anonymous namespace)::readBlock(std::__1::shared_ptr<DB::IBlockInputStream>, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:112:33 (gtests_dbms+0x40ab7cb)
    #13 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > > > >&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:129:5 (gtests_dbms+0x40ab7cb)
    #14 DB::tests::ExecutorTest::executeStreams(std::__1::shared_ptr<tipb::DAGRequest> const&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) /data1/chentongli/tics_new/tics/dbms/src/TestUtils/ExecutorTestUtils.cpp:134:5 (gtests_dbms+0x40ac747)
    #15 DB::tests::ExecutorTestRunner_JoinWithTableScan_Test::TestBody() /data1/chentongli/tics_new/tics/dbms/src/Flash/tests/gtest_executor.cpp:109:9 (gtests_dbms+0x271367e)
    #16 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a160e5)
    #17 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a160e5)
    #18 testing::Test::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2473:5 (gtests_dbms+0x99f5e05)
    #19 testing::TestInfo::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2655:11 (gtests_dbms+0x99f75d1)
    #20 testing::TestCase::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2773:28 (gtests_dbms+0x99f828d)
    #21 testing::internal::UnitTestImpl::RunAllTests() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4673:43 (gtests_dbms+0x9a03610)
    #22 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2401:10 (gtests_dbms+0x9a171a5)
    #23 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:2437:14 (gtests_dbms+0x9a171a5)
    #24 testing::UnitTest::Run() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/src/gtest.cc:4281:10 (gtests_dbms+0x9a02a93)
    #25 RUN_ALL_TESTS() /data1/chentongli/tics_new/tics/contrib/googletest/googletest/include/gtest/gtest.h:2237:46 (gtests_dbms+0x3ffae87)
    #26 main /data1/chentongli/tics_new/tics/dbms/src/TestUtils/gtests_dbms_main.cpp:36:16 (gtests_dbms+0x3ffae87)

SUMMARY: ThreadSanitizer: data race /data1/chentongli/tics_new/tics/dbms/src/Common/Stopwatch.h:61:20 in Stopwatch::start()
==================

Tsan in ExecutorTestRunner.JoinWithTableScan

@hehechen
Copy link
Contributor Author

hehechen commented Jul 7, 2022

pipeline.streams.assign(concurrency, shared_query_block_input_stream);

SharedQueryBlockInputStream enable multiple threads read from one stream, so the BlockStreamProfileInfo info may be accessed by multiple threads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
3 participants