
https://s3.amazonaws.com/clickhouse-test-reports/37164/f7493965b7da227af4e8b4261e6f6f66877d4c68/stress_test__thread__actions_.html

```
ThreadSanitizer: memory flushed RSS=47589
==================
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=642)
  Cycle in lock order graph: M4025 (0x7b8c000024d8) => M30623369 (0x7b3c01e2f118) => M4025

  Mutex M30623369 acquired here while holding mutex M4025 in thread T1022:
    #0 pthread_mutex_lock <null> (clickhouse+0xaec4ff8)
    #1 std::__1::__libcpp_mutex_lock(pthread_mutex_t*) build_docker/../contrib/libcxx/include/__threading_support:303:10 (clickhouse+0x216fb3d9)
    #2 std::__1::mutex::lock() build_docker/../contrib/libcxx/src/mutex.cpp:33:14 (clickhouse+0x216fb3d9)
    #3 std::__1::unique_lock<std::__1::mutex>::unique_lock(std::__1::mutex&) build_docker/../contrib/libcxx/include/__mutex_base:119:61 (clickhouse+0x1890c416)
    #4 bool ConcurrentBoundedQueue<std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > > >::emplaceImpl<std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > > >(std::__1::optional<unsigned long>, std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&&) build_docker/../src/Common/ConcurrentBoundedQueue.h:35:42 (clickhouse+0x1890c416)
    #5 bool ConcurrentBoundedQueue<std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > > >::emplace<std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > > >(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&&) build_docker/../src/Common/ConcurrentBoundedQueue.h:112:9 (clickhouse+0x1890b4ea)
    #6 DB::OwnSplitChannel::logSplit(Poco::Message const&) build_docker/../src/Loggers/OwnSplitChannel.cpp:110:57 (clickhouse+0x1890b4ea)
    #7 DB::OwnSplitChannel::tryLogSplit(Poco::Message const&) build_docker/../src/Loggers/OwnSplitChannel.cpp:51:9 (clickhouse+0x1890af08)
    #8 DB::OwnSplitChannel::log(Poco::Message const&) build_docker/../src/Loggers/OwnSplitChannel.cpp:43:5 (clickhouse+0x1890ae23)
    #9 GlobalOvercommitTracker::pickQueryToExcludeImpl() build_docker/../src/Common/OvercommitTracker.cpp:168:5 (clickhouse+0xafa3a28)
    #10 OvercommitTracker::pickQueryToExclude() build_docker/../src/Common/OvercommitTracker.h:91:13 (clickhouse+0xafa1e8d)
    #11 OvercommitTracker::needToStopQuery(MemoryTracker*, long) build_docker/../src/Common/OvercommitTracker.cpp:41:5 (clickhouse+0xafa1e8d)
    #12 MemoryTracker::allocImpl(long, bool, MemoryTracker*) build_docker/../src/Common/MemoryTracker.cpp:194:53 (clickhouse+0xaf78e32)
    #13 MemoryTracker::allocImpl(long, bool, MemoryTracker*) build_docker/../src/Common/MemoryTracker.cpp:241:22 (clickhouse+0xaf78d40)
    #14 MemoryTracker::allocImpl(long, bool, MemoryTracker*) build_docker/../src/Common/MemoryTracker.cpp:241:22 (clickhouse+0xaf78d40)
    #15 MemoryTracker::allocImpl(long, bool, MemoryTracker*) build_docker/../src/Common/MemoryTracker.cpp:241:22 (clickhouse+0xaf78d40)
    #16 CurrentMemoryTracker::(anonymous namespace)::allocImpl(long, bool) build_docker/../src/Common/CurrentMemoryTracker.cpp (clickhouse+0xaf912da)
    #17 CurrentMemoryTracker::alloc(long) build_docker/../src/Common/CurrentMemoryTracker.cpp:68:5 (clickhouse+0xaf9117e)
    #18 Allocator<false, false>::alloc(unsigned long, unsigned long) build_docker/../src/Common/Allocator.h:95:9 (clickhouse+0xafca2f7)
    #19 void DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::alloc<>(unsigned long) build_docker/../src/Common/PODArray.h:128:65 (clickhouse+0xafca2f7)
    #20 void DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::realloc<>(unsigned long) build_docker/../src/Common/PODArray.h:153:13 (clickhouse+0x19092735)
    #21 void DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::reserve<>(unsigned long) build_docker/../src/Common/PODArray.h:234:13 (clickhouse+0x19092735)
    #22 DB::SerializationString::deserializeBinaryBulk(DB::IColumn&, DB::ReadBuffer&, unsigned long, double) const build_docker/../src/DataTypes/Serializations/SerializationString.cpp:183:18 (clickhouse+0x19092735)
    #23 DB::ISerialization::deserializeBinaryBulkWithMultipleStreams(COW<DB::IColumn>::immutable_ptr<DB::IColumn>&, unsigned long, DB::ISerialization::DeserializeBinaryBulkSettings&, std::__1::shared_ptr<DB::ISerialization::DeserializeBinaryBulkState>&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, COW<DB::IColumn>::immutable_ptr<DB::IColumn>, 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, COW<DB::IColumn>::immutable_ptr<DB::IColumn> > > >*) const build_docker/../src/DataTypes/Serializations/ISerialization.cpp:132:9 (clickhouse+0x190085a5)
    #24 DB::MergeTreeReaderWide::readData(DB::NameAndTypePair const&, COW<DB::IColumn>::immutable_ptr<DB::IColumn>&, unsigned long, bool, unsigned long, unsigned long, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, COW<DB::IColumn>::immutable_ptr<DB::IColumn>, 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, COW<DB::IColumn>::immutable_ptr<DB::IColumn> > > >&, bool) build_docker/../src/Storages/MergeTree/MergeTreeReaderWide.cpp:297:20 (clickhouse+0x1a9a6ea4)
    #25 DB::MergeTreeReaderWide::readRows(unsigned long, unsigned long, bool, unsigned long, std::__1::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn> > >&) build_docker/../src/Storages/MergeTree/MergeTreeReaderWide.cpp:120:17 (clickhouse+0x1a9a5cf4)
    #26 DB::MergeTreeRangeReader::DelayedStream::readRows(std::__1::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn> > >&, unsigned long) build_docker/../src/Storages/MergeTree/MergeTreeRangeReader.cpp:90:47 (clickhouse+0x1b072e2a)
    #27 DB::MergeTreeRangeReader::DelayedStream::finalize(std::__1::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn> > >&) build_docker/../src/Storages/MergeTree/MergeTreeRangeReader.cpp:164:12 (clickhouse+0x1b072e2a)
    #28 DB::MergeTreeRangeReader::Stream::finalize(std::__1::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn> > >&) build_docker/../src/Storages/MergeTree/MergeTreeRangeReader.cpp:275:31 (clickhouse+0x1b079892)
    #29 DB::MergeTreeRangeReader::startReadingChain(unsigned long, std::__1::deque<DB::MarkRange, std::__1::allocator<DB::MarkRange> >&) build_docker/../src/Storages/MergeTree/MergeTreeRangeReader.cpp:840:27 (clickhouse+0x1b079892)
    #30 DB::MergeTreeRangeReader::read(unsigned long, std::__1::deque<DB::MarkRange, std::__1::allocator<DB::MarkRange> >&) build_docker/../src/Storages/MergeTree/MergeTreeRangeReader.cpp:749:23 (clickhouse+0x1b077a1f)
    #31 DB::MergeTreeRangeReader::read(unsigned long, std::__1::deque<DB::MarkRange, std::__1::allocator<DB::MarkRange> >&) build_docker/../src/Storages/MergeTree/MergeTreeRangeReader.cpp:667:36 (clickhouse+0x1b077960)
    #32 DB::MergeTreeBaseSelectProcessor::readFromPartImpl() build_docker/../src/Storages/MergeTree/MergeTreeBaseSelectProcessor.cpp:283:43 (clickhouse+0x1b068a5f)
    #33 DB::MergeTreeBaseSelectProcessor::readFromPart() build_docker/../src/Storages/MergeTree/MergeTreeBaseSelectProcessor.cpp:331:12 (clickhouse+0x1b069b76)
    #34 DB::MergeTreeBaseSelectProcessor::generate() build_docker/../src/Storages/MergeTree/MergeTreeBaseSelectProcessor.cpp:194:20 (clickhouse+0x1b067ba8)
    #35 DB::ISource::tryGenerate() build_docker/../src/Processors/ISource.cpp:79:18 (clickhouse+0x1acaa414)
    #36 DB::ISource::work() build_docker/../src/Processors/ISource.cpp:53:26 (clickhouse+0x1aca9ef2)
    #37 DB::SourceWithProgress::work() build_docker/../src/Processors/Sources/SourceWithProgress.cpp:67:30 (clickhouse+0x1af982a9)
    #38 DB::executeJob(DB::IProcessor*) build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:45:20 (clickhouse+0x1accd9fb)
    #39 DB::ExecutionThreadContext::executeTask() build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:68:9 (clickhouse+0x1accd9fb)
    #40 DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:217:26 (clickhouse+0x1acbfc40)
    #41 DB::PipelineExecutor::executeSingleThread(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:182:5 (clickhouse+0x1acc0e35)
    #42 DB::PipelineExecutor::executeImpl(unsigned long)::$_1::operator()() const build_docker/../src/Processors/Executors/PipelineExecutor.cpp:310:21 (clickhouse+0x1acc0e35)
    #43 decltype(static_cast<DB::PipelineExecutor::executeImpl(unsigned long)::$_1&>(fp)()) std::__1::__invoke_constexpr<DB::PipelineExecutor::executeImpl(unsigned long)::$_1&>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&) build_docker/../contrib/libcxx/include/type_traits:3648:23 (clickhouse+0x1acc0e35)
    #44 decltype(auto) std::__1::__apply_tuple_impl<DB::PipelineExecutor::executeImpl(unsigned long)::$_1&, std::__1::tuple<>&>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&, std::__1::tuple<>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/tuple:1595:1 (clickhouse+0x1acc0e35)
    #45 decltype(auto) std::__1::apply<DB::PipelineExecutor::executeImpl(unsigned long)::$_1&, std::__1::tuple<>&>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&, std::__1::tuple<>&) build_docker/../contrib/libcxx/include/tuple:1604:1 (clickhouse+0x1acc0e35)
    #46 ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&)::'lambda'()::operator()() build_docker/../src/Common/ThreadPool.h:188:13 (clickhouse+0x1acc0e35)
    #47 decltype(static_cast<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(fp)()) std::__1::__invoke<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&)::'lambda'()&>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&) build_docker/../contrib/libcxx/include/type_traits:3640:23 (clickhouse+0x1acc0e35)
    #48 void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&)::'lambda'()&>(ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&)::'lambda'()&) build_docker/../contrib/libcxx/include/__functional/invoke.h:61:9 (clickhouse+0x1acc0e35)
    #49 std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&)::'lambda'(), void ()>::operator()() build_docker/../contrib/libcxx/include/__functional/function.h:230:12 (clickhouse+0x1acc0e35)
    #50 void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) build_docker/../contrib/libcxx/include/__functional/function.h:711:16 (clickhouse+0x1acc0e35)
    #51 std::__1::__function::__policy_func<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:843:16 (clickhouse+0xaff582d)
    #52 std::__1::function<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:1184:12 (clickhouse+0xaff582d)
    #53 ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) build_docker/../src/Common/ThreadPool.cpp:281:17 (clickhouse+0xaff582d)
    #54 void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()::operator()() const build_docker/../src/Common/ThreadPool.cpp:143:73 (clickhouse+0xaff9070)
    #55 decltype(static_cast<void>(fp)()) std::__1::__invoke<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()>(void&&) build_docker/../contrib/libcxx/include/type_traits:3640:23 (clickhouse+0xaff9070)
    #56 void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/thread:282:5 (clickhouse+0xaff9070)
    #57 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()> >(void*) build_docker/../contrib/libcxx/include/thread:293:5 (clickhouse+0xaff9070)

    Hint: use TSAN_OPTIONS=second_deadlock_stack=1 to get more informative warning message

  Mutex M4025 acquired here while holding mutex M30623369 in thread T419:
    #0 pthread_mutex_lock <null> (clickhouse+0xaec4ff8)
    #1 std::__1::__libcpp_mutex_lock(pthread_mutex_t*) build_docker/../contrib/libcxx/include/__threading_support:303:10 (clickhouse+0x216fb3d9)
    #2 std::__1::mutex::lock() build_docker/../contrib/libcxx/src/mutex.cpp:33:14 (clickhouse+0x216fb3d9)
    #3 std::__1::lock_guard<std::__1::mutex>::lock_guard(std::__1::mutex&) build_docker/../contrib/libcxx/include/__mutex_base:91:27 (clickhouse+0xafa27a8)
    #4 OvercommitTracker::tryContinueQueryExecutionAfterFree(long) build_docker/../src/Common/OvercommitTracker.cpp:92:21 (clickhouse+0xafa27a8)
    #5 MemoryTracker::free(long) build_docker/../src/Common/MemoryTracker.cpp:314:33 (clickhouse+0xaf7981c)
    #6 MemoryTracker::free(long) build_docker/../src/Common/MemoryTracker.cpp:317:22 (clickhouse+0xaf7983e)
    #7 MemoryTracker::free(long) build_docker/../src/Common/MemoryTracker.cpp:317:22 (clickhouse+0xaf7983e)
    #8 MemoryTracker::free(long) build_docker/../src/Common/MemoryTracker.cpp:317:22 (clickhouse+0xaf7983e)
    #9 CurrentMemoryTracker::free(long) build_docker/../src/Common/CurrentMemoryTracker.cpp:92:33 (clickhouse+0xaf914b1)
    #10 Allocator<false, false>::free(void*, unsigned long) build_docker/../src/Common/Allocator.h:106:13 (clickhouse+0xaf91a46)
    #11 DB::PODArrayBase<8ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::dealloc() build_docker/../src/Common/PODArray.h:145:21 (clickhouse+0x1a0b6604)
    #12 DB::PODArrayBase<8ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::~PODArrayBase() build_docker/../src/Common/PODArray.h:310:9 (clickhouse+0x1a0b6604)
    #13 DB::ColumnString::~ColumnString() build_docker/../src/Columns/ColumnString.h:24:7 (clickhouse+0x1a0b6604)
    #14 DB::ColumnString::~ColumnString() build_docker/../src/Columns/ColumnString.h:24:7 (clickhouse+0x1a0b6604)
    #15 void boost::sp_adl_block::intrusive_ptr_release<DB::IColumn, boost::sp_adl_block::thread_safe_counter>(boost::sp_adl_block::intrusive_ref_counter<DB::IColumn, boost::sp_adl_block::thread_safe_counter> const*) build_docker/../contrib/boost/boost/smart_ptr/intrusive_ref_counter.hpp:173:9 (clickhouse+0x1abe5b61)
    #16 boost::intrusive_ptr<DB::IColumn>::~intrusive_ptr() build_docker/../contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:98:23 (clickhouse+0x1abe5b61)
    #17 void std::__1::__destroy_at<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, 0>(COW<DB::IColumn>::mutable_ptr<DB::IColumn>*) build_docker/../contrib/libcxx/include/__memory/construct_at.h:56:13 (clickhouse+0x1abe5b61)
    #18 void std::__1::destroy_at<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, 0>(COW<DB::IColumn>::mutable_ptr<DB::IColumn>*) build_docker/../contrib/libcxx/include/__memory/construct_at.h:81:5 (clickhouse+0x1abe5b61)
    #19 void std::__1::allocator_traits<std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >::destroy<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, void, void>(std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> >&, COW<DB::IColumn>::mutable_ptr<DB::IColumn>*) build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:317:9 (clickhouse+0x1abe5b61)
    #20 std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >::__base_destruct_at_end(COW<DB::IColumn>::mutable_ptr<DB::IColumn>*) build_docker/../contrib/libcxx/include/vector:803:9 (clickhouse+0x1abe5b61)
    #21 std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >::__clear() build_docker/../contrib/libcxx/include/vector:797:29 (clickhouse+0x1abe5b61)
    #22 std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >::clear() build_docker/../contrib/libcxx/include/vector:621:9 (clickhouse+0x1abe5b61)
    #23 std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >::__vdeallocate() build_docker/../contrib/libcxx/include/vector:933:9 (clickhouse+0x1abe5b61)
    #24 std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >::__move_assign(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&, std::__1::integral_constant<bool, true>) build_docker/../contrib/libcxx/include/vector:1275:5 (clickhouse+0x1abe5b61)
    #25 std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >::operator=(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&&) build_docker/../contrib/libcxx/include/vector:1251:5 (clickhouse+0x1abe5b61)
    #26 detail::MoveOrCopyIfThrow<std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >, true>::operator()(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&&, std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&) const build_docker/../base/base/../base/MoveOrCopyIfThrow.h:15:17 (clickhouse+0x1abe5b61)
    #27 void detail::moveOrCopyIfThrow<std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > > >(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&&, std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&) build_docker/../base/base/../base/MoveOrCopyIfThrow.h:31:9 (clickhouse+0x1abe5b61)
    #28 ConcurrentBoundedQueue<std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > > >::popImpl(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&, std::__1::optional<unsigned long>) build_docker/../src/Common/ConcurrentBoundedQueue.h:83:13 (clickhouse+0x1abe5b61)
    #29 ConcurrentBoundedQueue<std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > > >::tryPop(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&, unsigned long) build_docker/../src/Common/ConcurrentBoundedQueue.h:143:16 (clickhouse+0x1ac5a891)
    #30 DB::TCPHandler::sendLogs() build_docker/../src/Server/TCPHandler.cpp:1755:30 (clickhouse+0x1ac5a891)
    #31 DB::TCPHandler::processOrdinaryQueryWithProcessors() build_docker/../src/Server/TCPHandler.cpp:702:13 (clickhouse+0x1ac5a182)
    #32 DB::TCPHandler::runImpl() build_docker/../src/Server/TCPHandler.cpp:345:17 (clickhouse+0x1ac53967)
    #33 DB::TCPHandler::run() build_docker/../src/Server/TCPHandler.cpp:1781:9 (clickhouse+0x1ac64447)
    #34 Poco::Net::TCPServerConnection::start() build_docker/../contrib/poco/Net/src/TCPServerConnection.cpp:43:3 (clickhouse+0x1f91a022)
    #35 Poco::Net::TCPServerDispatcher::run() build_docker/../contrib/poco/Net/src/TCPServerDispatcher.cpp:115:20 (clickhouse+0x1f91a892)
    #36 Poco::PooledThread::run() build_docker/../contrib/poco/Foundation/src/ThreadPool.cpp:199:14 (clickhouse+0x1fb7f135)
    #37 Poco::(anonymous namespace)::RunnableHolder::run() build_docker/../contrib/poco/Foundation/src/Thread.cpp:55:11 (clickhouse+0x1fb7d2cf)
    #38 Poco::ThreadImpl::runnableEntry(void*) build_docker/../contrib/poco/Foundation/src/Thread_POSIX.cpp:345:27 (clickhouse+0x1fb7b947)

  Thread T745 'QueryPipelineEx' (tid=3793, running) created by thread T321 at:
    #0 pthread_create <null> (clickhouse+0xaea7d1d)
    #1 std::__1::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) build_docker/../contrib/libcxx/include/__threading_support:375:10 (clickhouse+0xaff8b20)
ThreadSanitizer: memory flush check RSS=47605 LAST=47581 LIMIT=46080
ThreadSanitizer: flushing memory due to RSS
    #2 std::__1::thread::thread<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'(), void>(void&&) build_docker/../contrib/libcxx/include/thread:309:16 (clickhouse+0xaff8b20)
    #3 void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>) build_docker/../src/Common/ThreadPool.cpp:143:35 (clickhouse+0xaff3e54)
    #4 ThreadPoolImpl<std::__1::thread>::scheduleOrThrow(std::__1::function<void ()>, int, unsigned long) build_docker/../src/Common/ThreadPool.cpp:175:5 (clickhouse+0xaff4787)
    #5 ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&) build_docker/../src/Common/ThreadPool.h:169:38 (clickhouse+0x1acc0aa7)
    #6 ThreadFromGlobalPool* std::__1::construct_at<ThreadFromGlobalPool, DB::PipelineExecutor::executeImpl(unsigned long)::$_1, ThreadFromGlobalPool*>(ThreadFromGlobalPool*, DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&) build_docker/../contrib/libcxx/include/__memory/construct_at.h:38:50 (clickhouse+0x1acc0aa7)
    #7 void std::__1::allocator_traits<std::__1::allocator<ThreadFromGlobalPool> >::construct<ThreadFromGlobalPool, DB::PipelineExecutor::executeImpl(unsigned long)::$_1, void, void>(std::__1::allocator<ThreadFromGlobalPool>&, ThreadFromGlobalPool*, DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&) build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:298:9 (clickhouse+0x1acc0aa7)
    #8 void std::__1::vector<ThreadFromGlobalPool, std::__1::allocator<ThreadFromGlobalPool> >::__construct_one_at_end<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&) build_docker/../contrib/libcxx/include/vector:778:5 (clickhouse+0x1acbec44)
    #9 ThreadFromGlobalPool& std::__1::vector<ThreadFromGlobalPool, std::__1::allocator<ThreadFromGlobalPool> >::emplace_back<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&) build_docker/../contrib/libcxx/include/vector:1577:9 (clickhouse+0x1acbec44)
    #10 DB::PipelineExecutor::executeImpl(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:299:21 (clickhouse+0x1acbec44)
    #11 DB::PipelineExecutor::execute(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:88:9 (clickhouse+0x1acbe938)
    #12 DB::threadFunction(DB::PullingAsyncPipelineExecutor::Data&, std::__1::shared_ptr<DB::ThreadGroupStatus>, unsigned long) build_docker/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:78:24 (clickhouse+0x1acd1b23)
    #13 DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0::operator()() const build_docker/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:105:13 (clickhouse+0x1acd1b23)
    #14 decltype(static_cast<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>(fp)()) std::__1::__invoke_constexpr<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&) build_docker/../contrib/libcxx/include/type_traits:3648:23 (clickhouse+0x1acd1b23)
    #15 decltype(auto) std::__1::__apply_tuple_impl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/tuple:1595:1 (clickhouse+0x1acd1b23)
    #16 decltype(auto) std::__1::apply<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&) build_docker/../contrib/libcxx/include/tuple:1604:1 (clickhouse+0x1acd1b23)
    #17 ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()::operator()() build_docker/../src/Common/ThreadPool.h:188:13 (clickhouse+0x1acd1b23)
    #18 decltype(static_cast<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&) build_docker/../contrib/libcxx/include/type_traits:3640:23 (clickhouse+0x1acd1b23)
    #19 void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&) build_docker/../contrib/libcxx/include/__functional/invoke.h:61:9 (clickhouse+0x1acd1b23)
    #20 std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()>::operator()() build_docker/../contrib/libcxx/include/__functional/function.h:230:12 (clickhouse+0x1acd1b23)
    #21 void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) build_docker/../contrib/libcxx/include/__functional/function.h:711:16 (clickhouse+0x1acd1b23)
```

{
    static Block sample_block = getSampleBlock();
    if (blocksHaveEqualStructure(sample_block, log_block))
        (void)(emplace(log_block.mutateColumns()));
    else
        LOG_WARNING(&Poco::Logger::get("InternalTextLogsQueue"), "Log block have different structure");
}
const char * InternalTextLogsQueue::getPriorityName(int priority)
{
    
    static constexpr const char * const PRIORITIES[] =
    {
        "Unknown",
        "Fatal",
        "Critical",
        "Error",
        "Warning",
        "Notice",
        "Information",
        "Debug",
        "Trace"
    };
    return (priority >= 1 && priority <= 8) ? PRIORITIES[priority] : PRIORITIES[0];
}
}