Skip to content

Switch to llvm/clang 15#41046

Merged
alexey-milovidov merged 16 commits intoClickHouse:masterfrom
azat:build/llvm-15
Sep 16, 2022
Merged

Switch to llvm/clang 15#41046
alexey-milovidov merged 16 commits intoClickHouse:masterfrom
azat:build/llvm-15

Conversation

@azat
Copy link
Copy Markdown
Member

@azat azat commented Sep 6, 2022

It had been released few hours ago, and I want to check how clang-15
generates DWARF-5 (for #40772, see #41063)

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Switch to llvm/clang 15

Checklist

  • switch everything clang 15
  • fix new issues
  • fix new clang-tidy errors
  • switch location of repositories to ClickHouse namespace
  • strerror_r
  • rebase

Issues

  • llvm issue in JIT - will look separately

Changes

  • perf tests shows some stable improvements

@robot-clickhouse robot-clickhouse added the pr-build Pull request with build/testing/packaging improvement label Sep 6, 2022
@azat azat force-pushed the build/llvm-15 branch 11 times, most recently from bc16b97 to 0e9265a Compare September 6, 2022 17:55
@azat
Copy link
Copy Markdown
Member Author

azat commented Sep 7, 2022

Lots of interesting stuff for 8319a3d (builds).

Stateless tests (asan) [2/2] — fail: 4, passed: 2213, skipped: 10

  • 02327_capnproto_protobuf_empty_messages
2022-09-07 01:00:35 [048baea09e96] 2022.09.07 01:00:33.709010 [ 67932 ] {196c0e5a-7153-4a08-a2e6-0c3fa000a0c9}  executeQuery: Code: 636. DB::Exception: Cannot extract table structure from CapnProto format file. Error: Unknown exception while parsing CapnProto schema: Internal compiler bug: Bootstrap schema failed validation:
2022-09-07 01:00:35 kj/exception.c++:977: failed: expected offset < 65536 && offset > -65536; ExceptionCallback must be allocated on the stack.

Stateful tests (msan) — fail: 1, passed: 128, skipped: 1

  • 00974_query_profiler - I guess Fix debug symbols  #40873 will help, since right now it does not have information about the required frame (FunctionSleep), but maybe it won't, due to -g0 for functions.

ASAN

stack-use-after-return in PoolWithFailoverBase
==1==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f982b5e11a0 at pc 0x000031c30ffc bp 0x7f982c7aca00 sp 0x7f982c7ac9f8
READ of size 8 at 0x7f982b5e11a0 thread T200 (QueryPullPipeEx)
    #0 0x31c30ffb in DB::GetPriorityForLoadBalancing::getPriorityFunc(DB::LoadBalancing, unsigned long, unsigned long) const::$_3::operator()(unsigned long) const build_docker/../src/Common/G
    #1 0x31c30ffb in decltype(static_cast<DB::GetPriorityForLoadBalancing::getPriorityFunc(DB::LoadBalancing, unsigned long, unsigned long) const::$_3&>(fp)(static_cast<unsigned long>(fp0))) 
    #2 0x31c30ffb in unsigned long std::__1::__invoke_void_return_wrapper<unsigned long, false>::__call<DB::GetPriorityForLoadBalancing::getPriorityFunc(DB::LoadBalancing, unsigned long, unsi
    #3 0x31c30ffb in std::__1::__function::__default_alloc_func<DB::GetPriorityForLoadBalancing::getPriorityFunc(DB::LoadBalancing, unsigned long, unsigned long) const::$_3, unsigned long (un
    #4 0x31c30ffb in unsigned long std::__1::__function::__policy_invoker<unsigned long (unsigned long)>::__call_impl<std::__1::__function::__default_alloc_func<DB::GetPriorityForLoadBalancin
    #5 0x31c21ac7 in std::__1::__function::__policy_func<unsigned long (unsigned long)>::operator()(unsigned long&&) const build_docker/../contrib/libcxx/include/__functional/function.h:843:1
    #6 0x31c21ac7 in std::__1::function<unsigned long (unsigned long)>::operator()(unsigned long) const build_docker/../contrib/libcxx/include/__functional/function.h:1184:12
    #7 0x31c21ac7 in PoolWithFailoverBase<DB::IConnectionPool>::getShuffledPools(unsigned long, std::__1::function<unsigned long (unsigned long)> const&) build_docker/../src/Common/PoolWithFa
    #8 0x31c1d275 in DB::ConnectionPoolWithFailover::getShuffledPools(DB::Settings const*) build_docker/../src/Client/ConnectionPoolWithFailover.cpp:222:18
    #9 0x31c53d8c in DB::HedgedConnectionsFactory::HedgedConnectionsFactory(std::__1::shared_ptr<DB::ConnectionPoolWithFailover> const&, DB::Settings const*, DB::ConnectionTimeouts const&, st
    #10 0x31c39bb8 in DB::HedgedConnections::HedgedConnections(std::__1::shared_ptr<DB::ConnectionPoolWithFailover> const&, std::__1::shared_ptr<DB::Context const>, DB::ConnectionTimeouts con
    #11 0x2cb4ad5d in DB::HedgedConnections* std::__1::construct_at<DB::HedgedConnections, std::__1::shared_ptr<DB::ConnectionPoolWithFailover> const&, std::__1::shared_ptr<DB::Context const>
    #12 0x2cb4ad5d in void std::__1::allocator_traits<std::__1::allocator<DB::HedgedConnections>>::construct<DB::HedgedConnections, std::__1::shared_ptr<DB::ConnectionPoolWithFailover> const&
    #13 0x2cb4ad5d in std::__1::__shared_ptr_emplace<DB::HedgedConnections, std::__1::allocator<DB::HedgedConnections>>::__shared_ptr_emplace<std::__1::shared_ptr<DB::ConnectionPoolWithFailov
    #14 0x2cb4ad5d in std::__1::shared_ptr<DB::HedgedConnections> std::__1::allocate_shared<DB::HedgedConnections, std::__1::allocator<DB::HedgedConnections>, std::__1::shared_ptr<DB::Connect
    #15 0x2cb4ad5d in std::__1::shared_ptr<DB::HedgedConnections> std::__1::make_shared<DB::HedgedConnections, std::__1::shared_ptr<DB::ConnectionPoolWithFailover> const&, std::__1::shared_pt
    #16 0x2cb4ad5d in DB::RemoteQueryExecutor::RemoteQueryExecutor(std::__1::shared_ptr<DB::ConnectionPoolWithFailover> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::
    #17 0x2cb4ad5d in decltype(static_cast<DB::RemoteQueryExecutor::RemoteQueryExecutor(std::__1::shared_ptr<DB::ConnectionPoolWithFailover> const&, std::__1::basic_string<char, std::__1::cha
    #18 0x2cb4ad5d in std::__1::shared_ptr<DB::IConnections> std::__1::__invoke_void_return_wrapper<std::__1::shared_ptr<DB::IConnections>, false>::__call<DB::RemoteQueryExecutor::RemoteQuery
    #19 0x2cb4ad5d in std::__1::__function::__default_alloc_func<DB::RemoteQueryExecutor::RemoteQueryExecutor(std::__1::shared_ptr<DB::ConnectionPoolWithFailover> const&, std::__1::basic_stri
    #20 0x2cb4ad5d in std::__1::shared_ptr<DB::IConnections> std::__1::__function::__policy_invoker<std::__1::shared_ptr<DB::IConnections> ()>::__call_impl<std::__1::__function::__default_all
    #21 0x2cb3a549 in std::__1::__function::__policy_func<std::__1::shared_ptr<DB::IConnections> ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:843:16
    #22 0x2cb3a549 in std::__1::function<std::__1::shared_ptr<DB::IConnections> ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:1184:12
    #23 0x2cb3a549 in DB::RemoteQueryExecutor::sendQuery(DB::ClientInfo::QueryKind) build_docker/../src/QueryPipeline/RemoteQueryExecutor.cpp:222:19
    #24 0x326c6217 in DB::RemoteSource::tryGenerate() build_docker/../src/Processors/Sources/RemoteSource.cpp:81:25
    #25 0x31f10b1e in DB::ISource::work() build_docker/../src/Processors/ISource.cpp:94:26
    #26 0x31f5dfcd in DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*) build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:47:26
    #27 0x31f5dfcd in DB::ExecutionThreadContext::executeTask() build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:92:9
    #28 0x31f3d364 in DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:228:26
    #29 0x31f3bc55 in DB::PipelineExecutor::executeSingleThread(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:194:5
    #30 0x31f3bc55 in DB::PipelineExecutor::executeImpl(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:367:9
    #31 0x31f3b834 in DB::PipelineExecutor::execute(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:89:9
    #32 0x31f67c9b in DB::threadFunction(DB::PullingAsyncPipelineExecutor::Data&, std::__1::shared_ptr<DB::ThreadGroupStatus>, unsigned long) build_docker/../src/Processors/Executors/PullingA
    #33 0x31f67c9b in DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0::operator()() const build_docker/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:107:
    #34 0x31f67c9b in decltype(static_cast<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>(fp)()) std::__1::__invoke_constexpr<DB::PullingAsyncPipelineExecutor::pull(
    #35 0x31f67c9b in decltype(auto) std::__1::__apply_tuple_impl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&>(DB::PullingAsyncPipelineExecutor
    #36 0x31f67c9b in decltype(auto) std::__1::apply<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Ch
    #37 0x31f67c9b in ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(D
    #38 0x31f67c9b in decltype(static_cast<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPo
    #39 0x31f67c9b in void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk
    #40 0x31f67c9b in std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_
    #41 0x31f67c9b in void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB:
    #42 0xde30b9f in std::__1::__function::__policy_func<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:843:16
    #43 0xde30b9f in std::__1::function<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:1184:12
    #44 0xde30b9f in ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) build_docker/../src/Common/ThreadPool.cpp:294:17
    #45 0xde3a6cc in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()::operator()() const buil
    #46 0xde3a6cc in decltype(static_cast<void>(fp)()) std::__1::__invoke<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsign
    #47 0xde3a6cc in 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
    #48 0xde3a6cc in 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<s
    #49 0x7f9a24a36608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608) (BuildId: 7b4536f41cdaa5888408e82d0836e33dcf436466)
    #50 0x7f9a2495b132 in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x11f132) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)

Address 0x7f982b5e11a0 is located in stack of thread T200 (QueryPullPipeEx) at offset 32 in frame
    #0 0x31c3094f in DB::GetPriorityForLoadBalancing::getPriorityFunc(DB::LoadBalancing, unsigned long, unsigned long) const build_docker/../src/Common/GetPriorityForLoadBalancing.cpp:12

  This frame has 2 object(s):
    [32, 40) 'pool_size.addr' <== Memory access at offset 32 is inside this variable
    [64, 88) 'ref.tmp' (line 18)
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
Thread T200 (QueryPullPipeEx) created by T3 (TCPHandler) here:
    #0 0xdbcb35c in pthread_create (/usr/bin/clickhouse+0xdbcb35c) (BuildId: b260764a90f1be355b1988242b2681f5090a86bf)
    #1 0xde39554 in std::__1::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) build_docker/../contrib/libcxx/include/__threading_support:375:10
    #2 0xde39554 in std::__1::thread::thread<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'(),
    #3 0xde2d76b in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool) build_docker/../src/Common/ThreadPool.
    #4 0xde2f347 in ThreadPoolImpl<std::__1::thread>::scheduleOrThrow(std::__1::function<void ()>, int, unsigned long, bool) build_docker/../src/Common/ThreadPool.cpp:180:5
    #5 0x31f647b8 in ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB
    #6 0x31f647b8 in DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long) build_docker/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:110:24
    #7 0x31f65717 in DB::PullingAsyncPipelineExecutor::pull(DB::Block&, unsigned long) build_docker/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:147:10
    #8 0x31e54b70 in DB::TCPHandler::processOrdinaryQueryWithProcessors() build_docker/../src/Server/TCPHandler.cpp:734:25
    #9 0x31e40e17 in DB::TCPHandler::runImpl() build_docker/../src/Server/TCPHandler.cpp:375:17
    #10 0x31e720a2 in DB::TCPHandler::run() build_docker/../src/Server/TCPHandler.cpp:1879:9
    #11 0x38d9d92e in Poco::Net::TCPServerConnection::start() build_docker/../contrib/poco/Net/src/TCPServerConnection.cpp:43:3
    #12 0x38d9e6b2 in Poco::Net::TCPServerDispatcher::run() build_docker/../contrib/poco/Net/src/TCPServerDispatcher.cpp:115:20
    #13 0x3927307b in Poco::PooledThread::run() build_docker/../contrib/poco/Foundation/src/ThreadPool.cpp:199:14
    #14 0x3926c967 in Poco::ThreadImpl::runnableEntry(void*) build_docker/../contrib/poco/Foundation/src/Thread_POSIX.cpp:345:27
    #15 0x7f9a24a36608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608) (BuildId: 7b4536f41cdaa5888408e82d0836e33dcf436466)

MSAN

use-of-uninitialized-value in llvm::MachineBasicBlock
==697==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x497f5659 in llvm::iplist_impl<llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true>>, llvm::ilist_traits<llvm::MachineInstr>>::~iplist_impl() MachineBasicBlock.cpp
    #1 0x497f5a7f in llvm::MachineBasicBlock::~MachineBasicBlock() (/usr/bin/clickhouse+0x497f5a7f) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #2 0x4994b09f in llvm::ilist_alloc_traits<llvm::MachineBasicBlock>::deleteNode(llvm::MachineBasicBlock*) (/usr/bin/clickhouse+0x4994b09f) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #3 0x49820956 in llvm::MachineBasicBlock::eraseFromParent() (/usr/bin/clickhouse+0x49820956) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #4 0x4a0aae47 in llvm::TailDuplicator::removeDeadBlock(llvm::MachineBasicBlock*, llvm::function_ref<void (llvm::MachineBasicBlock*)>*) (/usr/bin/clickhouse+0x4a0aae47) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #5 0x4a0a3261 in llvm::TailDuplicator::tailDuplicateAndUpdate(bool, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>*, llvm::function_ref<void (llvm::MachineBasicBlock*)>*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>*) (/usr/bin/clickhouse+0x4a0a3261) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #6 0x4a0ab58e in llvm::TailDuplicator::tailDuplicateBlocks() (/usr/bin/clickhouse+0x4a0ab58e) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #7 0x4a09fe19 in (anonymous namespace)::TailDuplicateBase::runOnMachineFunction(llvm::MachineFunction&) TailDuplication.cpp
    #8 0x49983bf7 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/bin/clickhouse+0x49983bf7) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #9 0x4db9b78d in llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/bin/clickhouse+0x4db9b78d) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #10 0x4dbc4ba1 in llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/bin/clickhouse+0x4dbc4ba1) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #11 0x4db9fffb in llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/bin/clickhouse+0x4db9fffb) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #12 0x4dbc598b in llvm::legacy::PassManager::run(llvm::Module&) (/usr/bin/clickhouse+0x4dbc598b) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #13 0x4142cddf in DB::JITCompiler::compile(llvm::Module&) build_docker/../src/Interpreters/JIT/CHJIT.cpp:78:22
    #14 0x4142837d in DB::CHJIT::compileModule(std::__1::unique_ptr<llvm::Module, std::__1::default_delete<llvm::Module>>) build_docker/../src/Interpreters/JIT/CHJIT.cpp:378:29
    #15 0x414275ed in DB::CHJIT::compileModule(std::__1::function<void (llvm::Module&)>) build_docker/../src/Interpreters/JIT/CHJIT.cpp:359:24
    #16 0x41467a5e in DB::compileAggregateFunctions(DB::CHJIT&, std::__1::vector<DB::AggregateFunctionWithOffset, std::__1::allocator<DB::AggregateFunctionWithOffset>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) build_docker/../src/Interpreters/JIT/compileFunction.cpp:738:32
    #17 0x3ddf32da in DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0::operator()() const build_docker/../src/Interpreters/Aggregator.cpp:661:49
    #18 0x3ddf32da in std::__1::pair<std::__1::shared_ptr<DB::CompiledExpressionCacheEntry>, bool> DB::CacheBase<wide::integer<128ul, unsigned int>, DB::CompiledExpressionCacheEntry, UInt128Hash, DB::CompiledFunctionWeightFunction>::getOrSet<DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0>(wide::integer<128ul, unsigned int> const&, DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0&&) build_docker/../src/Common/CacheBase.h:125:24
    #19 0x3ddf32da in DB::Aggregator::compileAggregateFunctionsIfNeeded() build_docker/../src/Interpreters/Aggregator.cpp:657:70
    #20 0x3ddeb191 in DB::Aggregator::Aggregator(DB::Block const&, DB::Aggregator::Params const&) build_docker/../src/Interpreters/Aggregator.cpp:594:5
    #21 0x452dc1d3 in DB::Aggregator* std::__1::construct_at<DB::Aggregator, DB::Block const&, DB::Aggregator::Params&, DB::Aggregator*>(DB::Aggregator*, DB::Block const&, DB::Aggregator::Params&) build_docker/../contrib/libcxx/include/__memory/construct_at.h:38:50
    #22 0x452dc1d3 in void std::__1::allocator_traits<std::__1::allocator<std::__1::__list_node<DB::Aggregator, void*>>>::construct<DB::Aggregator, DB::Block const&, DB::Aggregator::Params&, void, void>(std::__1::allocator<std::__1::__list_node<DB::Aggregator, void*>>&, DB::Aggregator*, DB::Block const&, DB::Aggregator::Params&) build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:298:9
    #23 0x452dc1d3 in std::__1::__list_iterator<DB::Aggregator, void*> std::__1::list<DB::Aggregator, std::__1::allocator<DB::Aggregator>>::emplace<DB::Block const&, DB::Aggregator::Params&>(std::__1::__list_const_iterator<DB::Aggregator, void*>, DB::Block const&, DB::Aggregator::Params&) build_docker/../contrib/libcxx/include/list:1648:5
    #24 0x452dc1d3 in DB::AggregatingTransformParams::AggregatingTransformParams(DB::Block const&, DB::Aggregator::Params const&, bool) build_docker/../src/Processors/Transforms/AggregatingTransform.h:41:44
    #25 0x452d9e80 in DB::AggregatingTransformParams* std::__1::construct_at<DB::AggregatingTransformParams, DB::Block const&, DB::Aggregator::Params, bool&, DB::AggregatingTransformParams*>(DB::AggregatingTransformParams*, DB::Block const&, DB::Aggregator::Params&&, bool&) build_docker/../contrib/libcxx/include/__memory/construct_at.h:38:50
    #26 0x452d9e80 in void std::__1::allocator_traits<std::__1::allocator<DB::AggregatingTransformParams>>::construct<DB::AggregatingTransformParams, DB::Block const&, DB::Aggregator::Params, bool&, void, void>(std::__1::allocator<DB::AggregatingTransformParams>&, DB::AggregatingTransformParams*, DB::Block const&, DB::Aggregator::Params&&, bool&) build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:298:9
    #27 0x452d9e80 in std::__1::__shared_ptr_emplace<DB::AggregatingTransformParams, std::__1::allocator<DB::AggregatingTransformParams>>::__shared_ptr_emplace<DB::Block const&, DB::Aggregator::Params, bool&>(std::__1::allocator<DB::AggregatingTransformParams>, DB::Block const&, DB::Aggregator::Params&&, bool&) build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:293:9
    #28 0x452d9e80 in std::__1::shared_ptr<DB::AggregatingTransformParams> std::__1::allocate_shared<DB::AggregatingTransformParams, std::__1::allocator<DB::AggregatingTransformParams>, DB::Block const&, DB::Aggregator::Params, bool&, void>(std::__1::allocator<DB::AggregatingTransformParams> const&, DB::Block const&, DB::Aggregator::Params&&, bool&) build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:954:55
    #29 0x452d9e80 in std::__1::shared_ptr<DB::AggregatingTransformParams> std::__1::make_shared<DB::AggregatingTransformParams, DB::Block const&, DB::Aggregator::Params, bool&, void>(DB::Block const&, DB::Aggregator::Params&&, bool&) build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:963:12
    #30 0x452c1bf0 in DB::AggregatingStep::transformPipeline(DB::QueryPipelineBuilder&, DB::BuildQueryPipelineSettings const&) build_docker/../src/Processors/QueryPlan/AggregatingStep.cpp:139:29
    #31 0x453c8707 in DB::ITransformingStep::updatePipeline(std::__1::vector<std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder>>, std::__1::allocator<std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder>>>>, DB::BuildQueryPipelineSettings const&) build_docker/../src/Processors/QueryPlan/ITransformingStep.cpp:48:9
    #32 0x4542dd4c in DB::QueryPlan::buildQueryPipeline(DB::QueryPlanOptimizationSettings const&, DB::BuildQueryPipelineSettings const&) build_docker/../src/Processors/QueryPlan/QueryPlan.cpp:187:47
    #33 0x40613c4f in DB::InterpreterSelectWithUnionQuery::execute() build_docker/../src/Interpreters/InterpreterSelectWithUnionQuery.cpp:370:31
    #34 0x411fc4ed in DB::executeQueryImpl(char const*, char const*, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) build_docker/../src/Interpreters/executeQuery.cpp:686:36
    #35 0x411f00bc in DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum) build_docker/../src/Interpreters/executeQuery.cpp:1087:30
    #36 0x4445dc03 in DB::TCPHandler::runImpl() build_docker/../src/Server/TCPHandler.cpp:362:24
    #37 0x4449c67d in DB::TCPHandler::run() build_docker/../src/Server/TCPHandler.cpp:1879:9
    #38 0x4f10a05d in Poco::Net::TCPServerConnection::start() build_docker/../contrib/poco/Net/src/TCPServerConnection.cpp:43:3
    #39 0x4f10b3ee in Poco::Net::TCPServerDispatcher::run() build_docker/../contrib/poco/Net/src/TCPServerDispatcher.cpp:115:20
    #40 0x4f826c2b in Poco::PooledThread::run() build_docker/../contrib/poco/Foundation/src/ThreadPool.cpp:199:14
    #41 0x4f822681 in Poco::(anonymous namespace)::RunnableHolder::run() build_docker/../contrib/poco/Foundation/src/Thread.cpp:55:11
    #42 0x4f81e568 in Poco::ThreadImpl::runnableEntry(void*) build_docker/../contrib/poco/Foundation/src/Thread_POSIX.cpp:345:27
    #43 0x7fb2054cd608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608) (BuildId: 7b4536f41cdaa5888408e82d0836e33dcf436466)
    #44 0x7fb2053f2132 in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x11f132) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)

  Memory was marked as uninitialized
    #0 0xb9869ed in __sanitizer_dtor_callback (/usr/bin/clickhouse+0xb9869ed) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #1 0x497f5a5a in llvm::MachineBasicBlock::~MachineBasicBlock() (/usr/bin/clickhouse+0x497f5a5a) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #2 0x4994b09f in llvm::ilist_alloc_traits<llvm::MachineBasicBlock>::deleteNode(llvm::MachineBasicBlock*) (/usr/bin/clickhouse+0x4994b09f) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #3 0x49820956 in llvm::MachineBasicBlock::eraseFromParent() (/usr/bin/clickhouse+0x49820956) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #4 0x4a0aae47 in llvm::TailDuplicator::removeDeadBlock(llvm::MachineBasicBlock*, llvm::function_ref<void (llvm::MachineBasicBlock*)>*) (/usr/bin/clickhouse+0x4a0aae47) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #5 0x4a0a3261 in llvm::TailDuplicator::tailDuplicateAndUpdate(bool, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>*, llvm::function_ref<void (llvm::MachineBasicBlock*)>*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>*) (/usr/bin/clickhouse+0x4a0a3261) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #6 0x4a0ab58e in llvm::TailDuplicator::tailDuplicateBlocks() (/usr/bin/clickhouse+0x4a0ab58e) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #7 0x4a09fe19 in (anonymous namespace)::TailDuplicateBase::runOnMachineFunction(llvm::MachineFunction&) TailDuplication.cpp
    #8 0x49983bf7 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/bin/clickhouse+0x49983bf7) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #9 0x4db9b78d in llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/bin/clickhouse+0x4db9b78d) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #10 0x4dbc4ba1 in llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/bin/clickhouse+0x4dbc4ba1) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #11 0x4db9fffb in llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/bin/clickhouse+0x4db9fffb) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #12 0x4dbc598b in llvm::legacy::PassManager::run(llvm::Module&) (/usr/bin/clickhouse+0x4dbc598b) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #13 0x4142cddf in DB::JITCompiler::compile(llvm::Module&) build_docker/../src/Interpreters/JIT/CHJIT.cpp:78:22
    #14 0x4142837d in DB::CHJIT::compileModule(std::__1::unique_ptr<llvm::Module, std::__1::default_delete<llvm::Module>>) build_docker/../src/Interpreters/JIT/CHJIT.cpp:378:29
    #15 0x414275ed in DB::CHJIT::compileModule(std::__1::function<void (llvm::Module&)>) build_docker/../src/Interpreters/JIT/CHJIT.cpp:359:24
    #16 0x41467a5e in DB::compileAggregateFunctions(DB::CHJIT&, std::__1::vector<DB::AggregateFunctionWithOffset, std::__1::allocator<DB::AggregateFunctionWithOffset>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) build_docker/../src/Interpreters/JIT/compileFunction.cpp:738:32
    #17 0x3ddf32da in DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0::operator()() const build_docker/../src/Interpreters/Aggregator.cpp:661:49
    #18 0x3ddf32da in std::__1::pair<std::__1::shared_ptr<DB::CompiledExpressionCacheEntry>, bool> DB::CacheBase<wide::integer<128ul, unsigned int>, DB::CompiledExpressionCacheEntry, UInt128Hash, DB::CompiledFunctionWeightFunction>::getOrSet<DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0>(wide::integer<128ul, unsigned int> const&, DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0&&) build_docker/../src/Common/CacheBase.h:125:24
    #19 0x3ddf32da in DB::Aggregator::compileAggregateFunctionsIfNeeded() build_docker/../src/Interpreters/Aggregator.cpp:657:70
    #20 0x3ddeb191 in DB::Aggregator::Aggregator(DB::Block const&, DB::Aggregator::Params const&) build_docker/../src/Interpreters/Aggregator.cpp:594:5
    #21 0x452dc1d3 in DB::Aggregator* std::__1::construct_at<DB::Aggregator, DB::Block const&, DB::Aggregator::Params&, DB::Aggregator*>(DB::Aggregator*, DB::Block const&, DB::Aggregator::Params&) build_docker/../contrib/libcxx/include/__memory/construct_at.h:38:50
    #22 0x452dc1d3 in void std::__1::allocator_traits<std::__1::allocator<std::__1::__list_node<DB::Aggregator, void*>>>::construct<DB::Aggregator, DB::Block const&, DB::Aggregator::Params&, void, void>(std::__1::allocator<std::__1::__list_node<DB::Aggregator, void*>>&, DB::Aggregator*, DB::Block const&, DB::Aggregator::Params&) build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:298:9
    #23 0x452dc1d3 in std::__1::__list_iterator<DB::Aggregator, void*> std::__1::list<DB::Aggregator, std::__1::allocator<DB::Aggregator>>::emplace<DB::Block const&, DB::Aggregator::Params&>(std::__1::__list_const_iterator<DB::Aggregator, void*>, DB::Block const&, DB::Aggregator::Params&) build_docker/../contrib/libcxx/include/list:1648:5
    #24 0x452dc1d3 in DB::AggregatingTransformParams::AggregatingTransformParams(DB::Block const&, DB::Aggregator::Params const&, bool) build_docker/../src/Processors/Transforms/AggregatingTransform.h:41:44

SUMMARY: MemorySanitizer: use-of-uninitialized-value MachineBasicBlock.cpp in llvm::iplist_impl<llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true>>, llvm::ilist_traits<llvm::MachineInstr>>::~iplist_impl()
Exiting
Uninitialized bytes in __interceptor_write at offset 0 inside [0x7faea716c4b0, 392)
==697==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0xbb999f6 in DB::WriteBufferFromFileDescriptorDiscardOnFailure::nextImpl() build_docker/../src/IO/WriteBufferFromFileDescriptorDiscardOnFailure.cpp:16:23
    #1 0xbe3f659 in DB::WriteBuffer::next() build_docker/../src/IO/WriteBuffer.h:49:13
    #2 0xc25fd23 in sanitizerDeathCallback() build_docker/../src/Daemon/BaseDaemon.cpp:421:9
    #3 0xb9664b5 in __sanitizer::Die() crtstuff.c
    #4 0xb97b052 in __msan_warning_with_origin_noreturn (/usr/bin/clickhouse+0xb97b052) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #5 0x497f5659 in llvm::iplist_impl<llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true>>, llvm::ilist_traits<llvm::MachineInstr>>::~iplist_impl() MachineBasicBlock.cpp
    #6 0x497f5a7f in llvm::MachineBasicBlock::~MachineBasicBlock() (/usr/bin/clickhouse+0x497f5a7f) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #7 0x4994b09f in llvm::ilist_alloc_traits<llvm::MachineBasicBlock>::deleteNode(llvm::MachineBasicBlock*) (/usr/bin/clickhouse+0x4994b09f) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #8 0x49820956 in llvm::MachineBasicBlock::eraseFromParent() (/usr/bin/clickhouse+0x49820956) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #9 0x4a0aae47 in llvm::TailDuplicator::removeDeadBlock(llvm::MachineBasicBlock*, llvm::function_ref<void (llvm::MachineBasicBlock*)>*) (/usr/bin/clickhouse+0x4a0aae47) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #10 0x4a0a3261 in llvm::TailDuplicator::tailDuplicateAndUpdate(bool, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>*, llvm::function_ref<void (llvm::MachineBasicBlock*)>*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>*) (/usr/bin/clickhouse+0x4a0a3261) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #11 0x4a0ab58e in llvm::TailDuplicator::tailDuplicateBlocks() (/usr/bin/clickhouse+0x4a0ab58e) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #12 0x4a09fe19 in (anonymous namespace)::TailDuplicateBase::runOnMachineFunction(llvm::MachineFunction&) TailDuplication.cpp
    #13 0x49983bf7 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/bin/clickhouse+0x49983bf7) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #14 0x4db9b78d in llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/bin/clickhouse+0x4db9b78d) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #15 0x4dbc4ba1 in llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/bin/clickhouse+0x4dbc4ba1) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #16 0x4db9fffb in llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/bin/clickhouse+0x4db9fffb) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #17 0x4dbc598b in llvm::legacy::PassManager::run(llvm::Module&) (/usr/bin/clickhouse+0x4dbc598b) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #18 0x4142cddf in DB::JITCompiler::compile(llvm::Module&) build_docker/../src/Interpreters/JIT/CHJIT.cpp:78:22
    #19 0x4142837d in DB::CHJIT::compileModule(std::__1::unique_ptr<llvm::Module, std::__1::default_delete<llvm::Module>>) build_docker/../src/Interpreters/JIT/CHJIT.cpp:378:29
    #20 0x414275ed in DB::CHJIT::compileModule(std::__1::function<void (llvm::Module&)>) build_docker/../src/Interpreters/JIT/CHJIT.cpp:359:24
    #21 0x41467a5e in DB::compileAggregateFunctions(DB::CHJIT&, std::__1::vector<DB::AggregateFunctionWithOffset, std::__1::allocator<DB::AggregateFunctionWithOffset>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) build_docker/../src/Interpreters/JIT/compileFunction.cpp:738:32
    #22 0x3ddf32da in DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0::operator()() const build_docker/../src/Interpreters/Aggregator.cpp:661:49
    #23 0x3ddf32da in std::__1::pair<std::__1::shared_ptr<DB::CompiledExpressionCacheEntry>, bool> DB::CacheBase<wide::integer<128ul, unsigned int>, DB::CompiledExpressionCacheEntry, UInt128Hash, DB::CompiledFunctionWeightFunction>::getOrSet<DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0>(wide::integer<128ul, unsigned int> const&, DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0&&) build_docker/../src/Common/CacheBase.h:125:24
    #24 0x3ddf32da in DB::Aggregator::compileAggregateFunctionsIfNeeded() build_docker/../src/Interpreters/Aggregator.cpp:657:70
    #25 0x3ddeb191 in DB::Aggregator::Aggregator(DB::Block const&, DB::Aggregator::Params const&) build_docker/../src/Interpreters/Aggregator.cpp:594:5
    #26 0x452dc1d3 in DB::Aggregator* std::__1::construct_at<DB::Aggregator, DB::Block const&, DB::Aggregator::Params&, DB::Aggregator*>(DB::Aggregator*, DB::Block const&, DB::Aggregator::Params&) build_docker/../contrib/libcxx/include/__memory/construct_at.h:38:50
    #27 0x452dc1d3 in void std::__1::allocator_traits<std::__1::allocator<std::__1::__list_node<DB::Aggregator, void*>>>::construct<DB::Aggregator, DB::Block const&, DB::Aggregator::Params&, void, void>(std::__1::allocator<std::__1::__list_node<DB::Aggregator, void*>>&, DB::Aggregator*, DB::Block const&, DB::Aggregator::Params&) build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:298:9
    #28 0x452dc1d3 in std::__1::__list_iterator<DB::Aggregator, void*> std::__1::list<DB::Aggregator, std::__1::allocator<DB::Aggregator>>::emplace<DB::Block const&, DB::Aggregator::Params&>(std::__1::__list_const_iterator<DB::Aggregator, void*>, DB::Block const&, DB::Aggregator::Params&) build_docker/../contrib/libcxx/include/list:1648:5
    #29 0x452dc1d3 in DB::AggregatingTransformParams::AggregatingTransformParams(DB::Block const&, DB::Aggregator::Params const&, bool) build_docker/../src/Processors/Transforms/AggregatingTransform.h:41:44
    #30 0x452d9e80 in DB::AggregatingTransformParams* std::__1::construct_at<DB::AggregatingTransformParams, DB::Block const&, DB::Aggregator::Params, bool&, DB::AggregatingTransformParams*>(DB::AggregatingTransformParams*, DB::Block const&, DB::Aggregator::Params&&, bool&) build_docker/../contrib/libcxx/include/__memory/construct_at.h:38:50
    #31 0x452d9e80 in void std::__1::allocator_traits<std::__1::allocator<DB::AggregatingTransformParams>>::construct<DB::AggregatingTransformParams, DB::Block const&, DB::Aggregator::Params, bool&, void, void>(std::__1::allocator<DB::AggregatingTransformParams>&, DB::AggregatingTransformParams*, DB::Block const&, DB::Aggregator::Params&&, bool&) build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:298:9
    #32 0x452d9e80 in std::__1::__shared_ptr_emplace<DB::AggregatingTransformParams, std::__1::allocator<DB::AggregatingTransformParams>>::__shared_ptr_emplace<DB::Block const&, DB::Aggregator::Params, bool&>(std::__1::allocator<DB::AggregatingTransformParams>, DB::Block const&, DB::Aggregator::Params&&, bool&) build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:293:9
    #33 0x452d9e80 in std::__1::shared_ptr<DB::AggregatingTransformParams> std::__1::allocate_shared<DB::AggregatingTransformParams, std::__1::allocator<DB::AggregatingTransformParams>, DB::Block const&, DB::Aggregator::Params, bool&, void>(std::__1::allocator<DB::AggregatingTransformParams> const&, DB::Block const&, DB::Aggregator::Params&&, bool&) build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:954:55
    #34 0x452d9e80 in std::__1::shared_ptr<DB::AggregatingTransformParams> std::__1::make_shared<DB::AggregatingTransformParams, DB::Block const&, DB::Aggregator::Params, bool&, void>(DB::Block const&, DB::Aggregator::Params&&, bool&) build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:963:12
    #35 0x452c1bf0 in DB::AggregatingStep::transformPipeline(DB::QueryPipelineBuilder&, DB::BuildQueryPipelineSettings const&) build_docker/../src/Processors/QueryPlan/AggregatingStep.cpp:139:29
    #36 0x453c8707 in DB::ITransformingStep::updatePipeline(std::__1::vector<std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder>>, std::__1::allocator<std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder>>>>, DB::BuildQueryPipelineSettings const&) build_docker/../src/Processors/QueryPlan/ITransformingStep.cpp:48:9
    #37 0x4542dd4c in DB::QueryPlan::buildQueryPipeline(DB::QueryPlanOptimizationSettings const&, DB::BuildQueryPipelineSettings const&) build_docker/../src/Processors/QueryPlan/QueryPlan.cpp:187:47
    #38 0x40613c4f in DB::InterpreterSelectWithUnionQuery::execute() build_docker/../src/Interpreters/InterpreterSelectWithUnionQuery.cpp:370:31
    #39 0x411fc4ed in DB::executeQueryImpl(char const*, char const*, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) build_docker/../src/Interpreters/executeQuery.cpp:686:36
    #40 0x411f00bc in DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum) build_docker/../src/Interpreters/executeQuery.cpp:1087:30
    #41 0x4445dc03 in DB::TCPHandler::runImpl() build_docker/../src/Server/TCPHandler.cpp:362:24
    #42 0x4449c67d in DB::TCPHandler::run() build_docker/../src/Server/TCPHandler.cpp:1879:9
    #43 0x4f10a05d in Poco::Net::TCPServerConnection::start() build_docker/../contrib/poco/Net/src/TCPServerConnection.cpp:43:3
    #44 0x4f10b3ee in Poco::Net::TCPServerDispatcher::run() build_docker/../contrib/poco/Net/src/TCPServerDispatcher.cpp:115:20
    #45 0x4f826c2b in Poco::PooledThread::run() build_docker/../contrib/poco/Foundation/src/ThreadPool.cpp:199:14
    #46 0x4f822681 in Poco::(anonymous namespace)::RunnableHolder::run() build_docker/../contrib/poco/Foundation/src/Thread.cpp:55:11
    #47 0x4f81e568 in Poco::ThreadImpl::runnableEntry(void*) build_docker/../contrib/poco/Foundation/src/Thread_POSIX.cpp:345:27
    #48 0x7fb2054cd608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608) (BuildId: 7b4536f41cdaa5888408e82d0836e33dcf436466)
    #49 0x7fb2053f2132 in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x11f132) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)

  Uninitialized value was stored to memory at
    #0 0xb97fe79 in __msan_memcpy (/usr/bin/clickhouse+0xb97fe79) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #1 0xba79c36 in DB::WriteBuffer::write(char const*, unsigned long) build_docker/../src/IO/WriteBuffer.h:89:13
    #2 0xc266050 in void DB::writePODBinary<int>(int const&, DB::WriteBuffer&) build_docker/../src/IO/WriteHelpers.h:84:9
    #3 0xc266050 in void DB::writeBinary<int>(int const&, DB::WriteBuffer&) build_docker/../src/IO/WriteHelpers.h:852:59
    #4 0xc25fcd0 in sanitizerDeathCallback() build_docker/../src/Daemon/BaseDaemon.cpp:416:5
    #5 0xb9664b5 in __sanitizer::Die() crtstuff.c
    #6 0x497f5659 in llvm::iplist_impl<llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true>>, llvm::ilist_traits<llvm::MachineInstr>>::~iplist_impl() MachineBasicBlock.cpp
    #7 0x497f5a7f in llvm::MachineBasicBlock::~MachineBasicBlock() (/usr/bin/clickhouse+0x497f5a7f) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #8 0x4994b09f in llvm::ilist_alloc_traits<llvm::MachineBasicBlock>::deleteNode(llvm::MachineBasicBlock*) (/usr/bin/clickhouse+0x4994b09f) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #9 0x49820956 in llvm::MachineBasicBlock::eraseFromParent() (/usr/bin/clickhouse+0x49820956) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #10 0x4a0aae47 in llvm::TailDuplicator::removeDeadBlock(llvm::MachineBasicBlock*, llvm::function_ref<void (llvm::MachineBasicBlock*)>*) (/usr/bin/clickhouse+0x4a0aae47) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #11 0x4a0a3261 in llvm::TailDuplicator::tailDuplicateAndUpdate(bool, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>*, llvm::function_ref<void (llvm::MachineBasicBlock*)>*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>*) (/usr/bin/clickhouse+0x4a0a3261) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #12 0x4a0ab58e in llvm::TailDuplicator::tailDuplicateBlocks() (/usr/bin/clickhouse+0x4a0ab58e) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #13 0x4a09fe19 in (anonymous namespace)::TailDuplicateBase::runOnMachineFunction(llvm::MachineFunction&) TailDuplication.cpp
    #14 0x49983bf7 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/bin/clickhouse+0x49983bf7) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #15 0x4db9b78d in llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/bin/clickhouse+0x4db9b78d) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #16 0x4dbc4ba1 in llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/bin/clickhouse+0x4dbc4ba1) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #17 0x4db9fffb in llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/bin/clickhouse+0x4db9fffb) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #18 0x4dbc598b in llvm::legacy::PassManager::run(llvm::Module&) (/usr/bin/clickhouse+0x4dbc598b) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #19 0x4142cddf in DB::JITCompiler::compile(llvm::Module&) build_docker/../src/Interpreters/JIT/CHJIT.cpp:78:22
    #20 0x4142837d in DB::CHJIT::compileModule(std::__1::unique_ptr<llvm::Module, std::__1::default_delete<llvm::Module>>) build_docker/../src/Interpreters/JIT/CHJIT.cpp:378:29

  Memory was marked as uninitialized
    #0 0xb9869ed in __sanitizer_dtor_callback (/usr/bin/clickhouse+0xb9869ed) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #1 0x47626852 in llvm::X86TargetLowering::CanLowerReturn(unsigned int, llvm::MachineFunction&, bool, llvm::SmallVectorImpl<llvm::ISD::OutputArg> const&, llvm::LLVMContext&) const X86ISelLowering.cpp
    #2 0x48d0a842 in llvm::FunctionLoweringInfo::set(llvm::Function const&, llvm::MachineFunction&, llvm::SelectionDAG*) (/usr/bin/clickhouse+0x48d0a842) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #3 0x490de1af in llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/usr/bin/clickhouse+0x490de1af) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #4 0x4808afa5 in (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) X86ISelDAGToDAG.cpp
    #5 0x49983bf7 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/bin/clickhouse+0x49983bf7) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #6 0x4db9b78d in llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/bin/clickhouse+0x4db9b78d) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #7 0x4dbc4ba1 in llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/bin/clickhouse+0x4dbc4ba1) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #8 0x4db9fffb in llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/bin/clickhouse+0x4db9fffb) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #9 0x4dbc598b in llvm::legacy::PassManager::run(llvm::Module&) (/usr/bin/clickhouse+0x4dbc598b) (BuildId: 3de0f753c8595d1d1d5b0f64e1c82f880aca878e)
    #10 0x4142cddf in DB::JITCompiler::compile(llvm::Module&) build_docker/../src/Interpreters/JIT/CHJIT.cpp:78:22
    #11 0x4142837d in DB::CHJIT::compileModule(std::__1::unique_ptr<llvm::Module, std::__1::default_delete<llvm::Module>>) build_docker/../src/Interpreters/JIT/CHJIT.cpp:378:29
    #12 0x414275ed in DB::CHJIT::compileModule(std::__1::function<void (llvm::Module&)>) build_docker/../src/Interpreters/JIT/CHJIT.cpp:359:24
    #13 0x41467a5e in DB::compileAggregateFunctions(DB::CHJIT&, std::__1::vector<DB::AggregateFunctionWithOffset, std::__1::allocator<DB::AggregateFunctionWithOffset>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) build_docker/../src/Interpreters/JIT/compileFunction.cpp:738:32
    #14 0x3ddf32da in DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0::operator()() const build_docker/../src/Interpreters/Aggregator.cpp:661:49
    #15 0x3ddf32da in std::__1::pair<std::__1::shared_ptr<DB::CompiledExpressionCacheEntry>, bool> DB::CacheBase<wide::integer<128ul, unsigned int>, DB::CompiledExpressionCacheEntry, UInt128Hash, DB::CompiledFunctionWeightFunction>::getOrSet<DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0>(wide::integer<128ul, unsigned int> const&, DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0&&) build_docker/../src/Common/CacheBase.h:125:24
    #16 0x3ddf32da in DB::Aggregator::compileAggregateFunctionsIfNeeded() build_docker/../src/Interpreters/Aggregator.cpp:657:70
    #17 0x3ddeb191 in DB::Aggregator::Aggregator(DB::Block const&, DB::Aggregator::Params const&) build_docker/../src/Interpreters/Aggregator.cpp:594:5
    #18 0x452dc1d3 in DB::Aggregator* std::__1::construct_at<DB::Aggregator, DB::Block const&, DB::Aggregator::Params&, DB::Aggregator*>(DB::Aggregator*, DB::Block const&, DB::Aggregator::Params&) build_docker/../contrib/libcxx/include/__memory/construct_at.h:38:50
    #19 0x452dc1d3 in void std::__1::allocator_traits<std::__1::allocator<std::__1::__list_node<DB::Aggregator, void*>>>::construct<DB::Aggregator, DB::Block const&, DB::Aggregator::Params&, void, void>(std::__1::allocator<std::__1::__list_node<DB::Aggregator, void*>>&, DB::Aggregator*, DB::Block const&, DB::Aggregator::Params&) build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:298:9
    #20 0x452dc1d3 in std::__1::__list_iterator<DB::Aggregator, void*> std::__1::list<DB::Aggregator, std::__1::allocator<DB::Aggregator>>::emplace<DB::Block const&, DB::Aggregator::Params&>(std::__1::__list_const_iterator<DB::Aggregator, void*>, DB::Block const&, DB::Aggregator::Params&) build_docker/../contrib/libcxx/include/list:1648:5
    #21 0x452dc1d3 in DB::AggregatingTransformParams::AggregatingTransformParams(DB::Block const&, DB::Aggregator::Params const&, bool) build_docker/../src/Processors/Transforms/AggregatingTransform.h:41:44
    #22 0x452d9e80 in DB::AggregatingTransformParams* std::__1::construct_at<DB::AggregatingTransformParams, DB::Block const&, DB::Aggregator::Params, bool&, DB::AggregatingTransformParams*>(DB::AggregatingTransformParams*, DB::Block const&, DB::Aggregator::Params&&, bool&) build_docker/../contrib/libcxx/include/__memory/construct_at.h:38:50
    #23 0x452d9e80 in void std::__1::allocator_traits<std::__1::allocator<DB::AggregatingTransformParams>>::construct<DB::AggregatingTransformParams, DB::Block const&, DB::Aggregator::Params, bool&, void, void>(std::__1::allocator<DB::AggregatingTransformParams>&, DB::AggregatingTransformParams*, DB::Block const&, DB::Aggregator::Params&&, bool&) build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:298:9
    #24 0x452d9e80 in std::__1::__shared_ptr_emplace<DB::AggregatingTransformParams, std::__1::allocator<DB::AggregatingTransformParams>>::__shared_ptr_emplace<DB::Block const&, DB::Aggregator::Params, bool&>(std::__1::allocator<DB::AggregatingTransformParams>, DB::Block const&, DB::Aggregator::Params&&, bool&) build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:293:9
    #25 0x452d9e80 in std::__1::shared_ptr<DB::AggregatingTransformParams> std::__1::allocate_shared<DB::AggregatingTransformParams, std::__1::allocator<DB::AggregatingTransformParams>, DB::Block const&, DB::Aggregator::Params, bool&, void>(std::__1::allocator<DB::AggregatingTransformParams> const&, DB::Block const&, DB::Aggregator::Params&&, bool&) build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:954:55
    #26 0x452d9e80 in std::__1::shared_ptr<DB::AggregatingTransformParams> std::__1::make_shared<DB::AggregatingTransformParams, DB::Block const&, DB::Aggregator::Params, bool&, void>(DB::Block const&, DB::Aggregator::Params&&, bool&) build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:963:12
    #27 0x452c1bf0 in DB::AggregatingStep::transformPipeline(DB::QueryPipelineBuilder&, DB::BuildQueryPipelineSettings const&) build_docker/../src/Processors/QueryPlan/AggregatingStep.cpp:139:29
    #28 0x453c8707 in DB::ITransformingStep::updatePipeline(std::__1::vector<std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder>>, std::__1::allocator<std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder>>>>, DB::BuildQueryPipelineSettings const&) build_docker/../src/Processors/QueryPlan/ITransformingStep.cpp:48:9

SUMMARY: MemorySanitizer: use-of-uninitialized-value build_docker/../src/IO/WriteBufferFromFileDescriptorDiscardOnFailure.cpp:16:23 in DB::WriteBufferFromFileDescriptorDiscardOnFailure::nextImpl()
Exiting

@azat
Copy link
Copy Markdown
Member Author

azat commented Sep 8, 2022

  • 8319a3d7b8837ec2c2334a41f11ccecee314d823 - Build Check
  • bb660b340255e6d6120b62770ce276e115c0fee8 - Build Check

BuilderBinRelease

fatal: unable to access 'https://github.com/google/googletest.git/': Failed to connect to github.com port 443: Connection timed out

@azat
Copy link
Copy Markdown
Member Author

azat commented Sep 9, 2022

This is more or less ready.
@alexey-milovidov can you look at the referenced PRs?

@azat
Copy link
Copy Markdown
Member Author

azat commented Sep 10, 2022

@Felixoid maybe you will be interesting, here ClangTidy check trying to build on and on, even though clang-tidy simply cannot compile it, https://github.com/ClickHouse/ClickHouse/runs/8282941449?check_suite_focus=true, I saw some intermediate errors there from clang-tidy, but maybe eventually VM got killed or OOM or similar.

azat added 13 commits September 10, 2022 21:38
Build error [1]:

    Sep 06 18:40:53 FAILED: contrib/jemalloc-cmake/CMakeFiles/_jemalloc.dir/__/jemalloc/src/malloc_io.c.o
    Sep 06 18:40:53 /usr/bin/ccache /usr/bin/clang-15 --target=x86_64-linux-musl --sysroot=/build/cmake/linux/../../contrib/sysroot/linux-x86_64-musl -DHAS_RESERVED_IDENTIFIER -DJEMALLOC_NO_PRIVATE_NAMESPACE -DJEMALLOC_PROF=1 -DJEMALLOC_PROF_LIBGCC=1 -DSTD_EXCEPTION_HAS_STACK_TRACE=1 -DUSE_MUSL=1 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -D_LIBCPP_HAS_MUSL_LIBC=1 -I../contrib/jemalloc/include -isystem ../contrib/jemalloc-cmake/include -isystem contrib/jemalloc-cmake/include_linux_x86_64_musl/jemalloc/internal -isystem ../contrib/libcxx/include -isystem ../contrib/libcxxabi/include -isystem ../contrib/libunwind/include --gcc-toolchain=/build/cmake/linux/../../contrib/sysroot/linux-x86_64-musl --gcc-toolchain=/build/cmake/linux/../../contrib/sysroot/linux-x86_64-musl -fdiagnostics-color=always -Xclang -fuse-ctor-homing  -gdwarf-aranges -pipe -mssse3 -msse4.1 -msse4.2 -mpclmul -mpopcnt -fasynchronous-unwind-tables -ffile-prefix-map=/build=. -falign-functions=32 -mbranches-within-32B-boundaries  -fdiagnostics-absolute-paths -fexperimental-new-pass-manager -w -O2 -g -DNDEBUG -O3 -g -gdwarf-4  -flto=thin -fwhole-program-vtables -fno-pie   -D OS_LINUX -D_GNU_SOURCE -Werror -std=gnu11 -MD -MT contrib/jemalloc-cmake/CMakeFiles/_jemalloc.dir/__/jemalloc/src/malloc_io.c.o -MF contrib/jemalloc-cmake/CMakeFiles/_jemalloc.dir/__/jemalloc/src/malloc_io.c.o.d -o contrib/jemalloc-cmake/CMakeFiles/_jemalloc.dir/__/jemalloc/src/malloc_io.c.o   -c ../contrib/jemalloc/src/malloc_io.c
    Sep 06 18:40:53 /build/contrib/jemalloc/src/malloc_io.c:100:8: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
    Sep 06 18:40:53         char *b = strerror_r(err, buf, buflen);
    Sep 06 18:40:53               ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Sep 06 18:40:53 1 error generated.

  [1]: https://s3.amazonaws.com/clickhouse-builds/41046/0e9265ad951d40cdce3716fb8a679360b2e0c156/package_release/build_log.log

Signed-off-by: Azat Khuzhin <[email protected]>
Fixes the following use-of-uninitialized-value in llvm [1]:

    ==696==WARNING: MemorySanitizer: use-of-uninitialized-value
        0 0x498141d9 in llvm::ilist_traits<llvm::MachineInstr>::removeNodeFromList(llvm::MachineInstr*) build_docker/../contrib/llvm/llvm/lib/CodeGen/MachineBasicBlock.cpp:155:24
        1 0x498141d9 in llvm::iplist_impl<llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true>>, llvm::ilist_traits<llvm::MachineInstr>>::remove(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false>&) build_docker/../contrib/llvm/llvm/include/llvm/ADT/ilist.h:253:11
        2 0x498141d9 in llvm::iplist_impl<llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true>>, llvm::ilist_traits<llvm::MachineInstr>>::erase(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false>) build_docker/../contrib/llvm/llvm/include/llvm/ADT/ilist.h:268:22
        3 0x498141d9 in llvm::iplist_impl<llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true>>, llvm::ilist_traits<llvm::MachineInstr>>::erase(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false>) build_docker/../contrib/llvm/llvm/include/llvm/ADT/ilist.h:305:15
        4 0x498141d9 in llvm::iplist_impl<llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true>>, llvm::ilist_traits<llvm::MachineInstr>>::clear() build_docker/../contrib/llvm/llvm/include/llvm/ADT/ilist.h:309:18
        5 0x498141d9 in llvm::iplist_impl<llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true>>, llvm::ilist_traits<llvm::MachineInstr>>::~iplist_impl() build_docker/../contrib/llvm/llvm/include/llvm/ADT/ilist.h:210:20
        6 0x498145ff in llvm::MachineBasicBlock::~MachineBasicBlock() build_docker/../contrib/llvm/llvm/lib/CodeGen/MachineBasicBlock.cpp:56:1
        7 0x49969c1f in llvm::MachineFunction::DeleteMachineBasicBlock(llvm::MachineBasicBlock*) build_docker/../contrib/llvm/llvm/lib/CodeGen/MachineFunction.cpp:426:8
        8 0x49969c1f in llvm::ilist_alloc_traits<llvm::MachineBasicBlock>::deleteNode(llvm::MachineBasicBlock*) build_docker/../contrib/llvm/llvm/lib/CodeGen/MachineFunction.cpp:127:21
        9 0x4983f4d6 in llvm::iplist_impl<llvm::simple_ilist<llvm::MachineBasicBlock>, llvm::ilist_traits<llvm::MachineBasicBlock>>::erase(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineBasicBlock, false, false, void>, false, false>) build_docker/../contrib/llvm/llvm/include/llvm/ADT/ilist.h:268:11
        10 0x4983f4d6 in llvm::iplist_impl<llvm::simple_ilist<llvm::MachineBasicBlock>, llvm::ilist_traits<llvm::MachineBasicBlock>>::erase(llvm::MachineBasicBlock*) build_docker/../contrib/llvm/llvm/include/llvm/ADT/ilist.h:272:39
        11 0x4983f4d6 in llvm::MachineFunction::erase(llvm::MachineBasicBlock*) build_docker/../contrib/llvm/llvm/include/llvm/CodeGen/MachineFunction.h:767:53
        12 0x4983f4d6 in llvm::MachineBasicBlock::eraseFromParent() build_docker/../contrib/llvm/llvm/lib/CodeGen/MachineBasicBlock.cpp:1317:16
        13 0x4a0c9a27 in llvm::TailDuplicator::removeDeadBlock(llvm::MachineBasicBlock*, llvm::function_ref<void (llvm::MachineBasicBlock*)>*) build_docker/../contrib/llvm/llvm/lib/CodeGen/TailDuplicator.cpp:1051:8
        14 0x4a0c1e41 in llvm::TailDuplicator::tailDuplicateAndUpdate(bool, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>*, llvm::function_ref<void (llvm::MachineBasicBlock*)>*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>*) build_docker/../contrib/llvm/llvm/lib/CodeGen/TailDuplicator.cpp:189:5
        15 0x4a0ca16e in llvm::TailDuplicator::tailDuplicateBlocks() build_docker/../contrib/llvm/llvm/lib/CodeGen/TailDuplicator.cpp:288:19
        16 0x4a0be9f9 in (anonymous namespace)::TailDuplicateBase::runOnMachineFunction(llvm::MachineFunction&) build_docker/../contrib/llvm/llvm/lib/CodeGen/TailDuplication.cpp:98:21
        17 0x499a2777 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) build_docker/../contrib/llvm/llvm/lib/CodeGen/MachineFunctionPass.cpp:72:13
        18 0x4dbba34d in llvm::FPPassManager::runOnFunction(llvm::Function&) build_docker/../contrib/llvm/llvm/lib/IR/LegacyPassManager.cpp:1435:27
        19 0x4dbe3761 in llvm::FPPassManager::runOnModule(llvm::Module&) build_docker/../contrib/llvm/llvm/lib/IR/LegacyPassManager.cpp:1481:16
        20 0x4dbbebbb in (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) build_docker/../contrib/llvm/llvm/lib/IR/LegacyPassManager.cpp:1550:27
        21 0x4dbbebbb in llvm::legacy::PassManagerImpl::run(llvm::Module&) build_docker/../contrib/llvm/llvm/lib/IR/LegacyPassManager.cpp:541:44
        22 0x4dbe454b in llvm::legacy::PassManager::run(llvm::Module&) build_docker/../contrib/llvm/llvm/lib/IR/LegacyPassManager.cpp:1677:14
        23 0x414405df in DB::JITCompiler::compile(llvm::Module&) build_docker/../src/Interpreters/JIT/CHJIT.cpp:78:22
        24 0x4143bb7d in DB::CHJIT::compileModule(std::__1::unique_ptr<llvm::Module, std::__1::default_delete<llvm::Module>>) build_docker/../src/Interpreters/JIT/CHJIT.cpp:378:29
        25 0x4143aded in DB::CHJIT::compileModule(std::__1::function<void (llvm::Module&)>) build_docker/../src/Interpreters/JIT/CHJIT.cpp:359:24
        26 0x4147b25e in DB::compileAggregateFunctions(DB::CHJIT&, std::__1::vector<DB::AggregateFunctionWithOffset, std::__1::allocator<DB::AggregateFunctionWithOffset>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) build_docker/../src/Interpreters/JIT/compileFunction.cpp:738:32
        27 0x3de0a23a in DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0::operator()() const build_docker/../src/Interpreters/Aggregator.cpp:661:49
        28 0x3de0a23a in std::__1::pair<std::__1::shared_ptr<DB::CompiledExpressionCacheEntry>, bool> DB::CacheBase<wide::integer<128ul, unsigned int>, DB::CompiledExpressionCacheEntry, UInt128Hash, DB::CompiledFunctionWeightFunction>::getOrSet<DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0>(wide::integer<128ul, unsigned int> const&, DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0&&) build_docker/../src/Common/CacheBase.h:125:24
        29 0x3de0a23a in DB::Aggregator::compileAggregateFunctionsIfNeeded() build_docker/../src/Interpreters/Aggregator.cpp:657:70

      Memory was marked as uninitialized
        0 0xb988ded in __sanitizer_dtor_callback (/usr/bin/clickhouse+0xb988ded) (BuildId: c4a880b742797a1f37bc4f5ed869f055cc86486b)
        1 0x498145da in llvm::MachineBasicBlock::~MachineBasicBlock() build_docker/../contrib/llvm/llvm/lib/CodeGen/MachineBasicBlock.cpp:56:1
        2 0x49969c1f in llvm::MachineFunction::DeleteMachineBasicBlock(llvm::MachineBasicBlock*) build_docker/../contrib/llvm/llvm/lib/CodeGen/MachineFunction.cpp:426:8
        3 0x49969c1f in llvm::ilist_alloc_traits<llvm::MachineBasicBlock>::deleteNode(llvm::MachineBasicBlock*) build_docker/../contrib/llvm/llvm/lib/CodeGen/MachineFunction.cpp:127:21
        4 0x4983f4d6 in llvm::iplist_impl<llvm::simple_ilist<llvm::MachineBasicBlock>, llvm::ilist_traits<llvm::MachineBasicBlock>>::erase(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineBasicBlock, false, false, void>, false, false>) build_docker/../contrib/llvm/llvm/include/llvm/ADT/ilist.h:268:11
        5 0x4983f4d6 in llvm::iplist_impl<llvm::simple_ilist<llvm::MachineBasicBlock>, llvm::ilist_traits<llvm::MachineBasicBlock>>::erase(llvm::MachineBasicBlock*) build_docker/../contrib/llvm/llvm/include/llvm/ADT/ilist.h:272:39
        6 0x4983f4d6 in llvm::MachineFunction::erase(llvm::MachineBasicBlock*) build_docker/../contrib/llvm/llvm/include/llvm/CodeGen/MachineFunction.h:767:53
        7 0x4983f4d6 in llvm::MachineBasicBlock::eraseFromParent() build_docker/../contrib/llvm/llvm/lib/CodeGen/MachineBasicBlock.cpp:1317:16
        8 0x4a0c9a27 in llvm::TailDuplicator::removeDeadBlock(llvm::MachineBasicBlock*, llvm::function_ref<void (llvm::MachineBasicBlock*)>*) build_docker/../contrib/llvm/llvm/lib/CodeGen/TailDuplicator.cpp:1051:8
        9 0x4a0c1e41 in llvm::TailDuplicator::tailDuplicateAndUpdate(bool, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>*, llvm::function_ref<void (llvm::MachineBasicBlock*)>*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>*) build_docker/../contrib/llvm/llvm/lib/CodeGen/TailDuplicator.cpp:189:5
        10 0x4a0ca16e in llvm::TailDuplicator::tailDuplicateBlocks() build_docker/../contrib/llvm/llvm/lib/CodeGen/TailDuplicator.cpp:288:19
        11 0x4a0be9f9 in (anonymous namespace)::TailDuplicateBase::runOnMachineFunction(llvm::MachineFunction&) build_docker/../contrib/llvm/llvm/lib/CodeGen/TailDuplication.cpp:98:21
        12 0x499a2777 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) build_docker/../contrib/llvm/llvm/lib/CodeGen/MachineFunctionPass.cpp:72:13
        13 0x4dbba34d in llvm::FPPassManager::runOnFunction(llvm::Function&) build_docker/../contrib/llvm/llvm/lib/IR/LegacyPassManager.cpp:1435:27
        14 0x4dbe3761 in llvm::FPPassManager::runOnModule(llvm::Module&) build_docker/../contrib/llvm/llvm/lib/IR/LegacyPassManager.cpp:1481:16
        15 0x4dbbebbb in (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) build_docker/../contrib/llvm/llvm/lib/IR/LegacyPassManager.cpp:1550:27
        16 0x4dbbebbb in llvm::legacy::PassManagerImpl::run(llvm::Module&) build_docker/../contrib/llvm/llvm/lib/IR/LegacyPassManager.cpp:541:44
        17 0x4dbe454b in llvm::legacy::PassManager::run(llvm::Module&) build_docker/../contrib/llvm/llvm/lib/IR/LegacyPassManager.cpp:1677:14
        18 0x414405df in DB::JITCompiler::compile(llvm::Module&) build_docker/../src/Interpreters/JIT/CHJIT.cpp:78:22
        19 0x4143bb7d in DB::CHJIT::compileModule(std::__1::unique_ptr<llvm::Module, std::__1::default_delete<llvm::Module>>) build_docker/../src/Interpreters/JIT/CHJIT.cpp:378:29
        20 0x4143aded in DB::CHJIT::compileModule(std::__1::function<void (llvm::Module&)>) build_docker/../src/Interpreters/JIT/CHJIT.cpp:359:24
        21 0x4147b25e in DB::compileAggregateFunctions(DB::CHJIT&, std::__1::vector<DB::AggregateFunctionWithOffset, std::__1::allocator<DB::AggregateFunctionWithOffset>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) build_docker/../src/Interpreters/JIT/compileFunction.cpp:738:32
        22 0x3de0a23a in DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0::operator()() const build_docker/../src/Interpreters/Aggregator.cpp:661:49
        23 0x3de0a23a in std::__1::pair<std::__1::shared_ptr<DB::CompiledExpressionCacheEntry>, bool> DB::CacheBase<wide::integer<128ul, unsigned int>, DB::CompiledExpressionCacheEntry, UInt128Hash, DB::CompiledFunctionWeightFunction>::getOrSet<DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0>(wide::integer<128ul, unsigned int> const&, DB::Aggregator::compileAggregateFunctionsIfNeeded()::$_0&&) build_docker/../src/Common/CacheBase.h:125:24
        24 0x3de0a23a in DB::Aggregator::compileAggregateFunctionsIfNeeded() build_docker/../src/Interpreters/Aggregator.cpp:657:70

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/41046/490a2c75610c4bc3191d55226f8454b3c3d3919a/stateful_tests__msan_.html

Note, that it is safe to do, but only for this method, since it had been
disabled anyway, back in ClickHouse#27574, and I guess this MSan report may be
related.

Signed-off-by: Azat Khuzhin <[email protected]>
Since it also does not fits into timeouts [1]:

    2022-09-08 21:16:20 [ 377 ] DEBUG : Command:['docker', 'exec', '-u', 'root', 'roottestsendcrashreports_node_1', 'bash', '-c', 'pkill -SEGV clickhouse'] (cluster.py:95, run_and_check)
    ...
    2022-09-08 21:16:22 [ 377 ] DEBUG : run container_id:roottestsendcrashreports_node_1 detach:False nothrow:False cmd: ['cat', '/result.txt'] (cluster.py:1744, exec_in_container)
    ...
    2022-09-08 21:16:36 [ 377 ] DEBUG : Stdout:INITIAL_STATE (cluster.py:103, run_and_check)

And server logs:

    2022.09.08 21:16:21.112076 [ 228 ] {} <Fatal> BaseDaemon: ########################################
    2022.09.08 21:16:21.112170 [ 228 ] {} <Fatal> BaseDaemon: (version 22.9.1.1, build id: 0F7336E0A4D64134C51C8365DADCB78A9B39AA3B) (from thread 1) (no query) Received signal Segmentation fault (11)
    2022.09.08 21:16:21.112244 [ 228 ] {} <Fatal> BaseDaemon: Address: 0xde Access: read. Unknown si_code.
    2022.09.08 21:16:21.112321 [ 228 ] {} <Fatal> BaseDaemon: Stack trace: 0x7fbe21d09376 0x40a4f71a 0xe293a4b 0xdc5c51a 0x38dee227 0xdc326a0 0x38e319d9 0xdc2b4e2 0xdc25fdb 0x7fbe21b2c083 0xdb636ae
    2022.09.08 21:16:21.112419 [ 228 ] {} <Fatal> BaseDaemon: 3. pthread_cond_wait @ 0x7fbe21d09376 in ?
    2022.09.08 21:16:21.122914 [ 228 ] {} <Fatal> BaseDaemon: 4. ./build_docker/../contrib/libcxx/src/condition_variable.cpp:0: std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) @ 0x40a4f71a in /usr/bin/clickhouse
    2022.09.08 21:16:21.233016 [ 228 ] {} <Fatal> BaseDaemon: 5.1. inlined from ./build_docker/../contrib/libcxx/include/atomic:952: unsigned long std::__1::__cxx_atomic_load<unsigned long>(std::__1::__cxx_atomic_base_impl<unsigned long> const*, std::__1::memory_order)
    2022.09.08 21:16:21.233135 [ 228 ] {} <Fatal> BaseDaemon: 5.2. inlined from ../contrib/libcxx/include/atomic:1582: std::__1::__atomic_base<unsigned long, false>::load(std::__1::memory_order) const
    2022.09.08 21:16:21.233183 [ 228 ] {} <Fatal> BaseDaemon: 5.3. inlined from ../contrib/libcxx/include/atomic:1586: std::__1::__atomic_base<unsigned long, false>::operator unsigned long() const
    2022.09.08 21:16:21.233234 [ 228 ] {} <Fatal> BaseDaemon: 5.4. inlined from ../src/Daemon/BaseDaemon.cpp:967: operator()
    2022.09.08 21:16:21.233303 [ 228 ] {} <Fatal> BaseDaemon: 5.5. inlined from ../contrib/libcxx/include/__mutex_base:402: void std::__1::condition_variable::wait<BaseDaemon::waitForTerminationRequest()::$_0>(std::__1::unique_lock<std::__1::mutex>&, BaseDaemon::waitForTerminationRequest()::$_0)
    2022.09.08 21:16:21.233334 [ 228 ] {} <Fatal> BaseDaemon: 5. ../src/Daemon/BaseDaemon.cpp:967: BaseDaemon::waitForTerminationRequest() @ 0xe293a4b in /usr/bin/clickhouse
    2022.09.08 21:16:21.350675 [ 228 ] {} <Fatal> BaseDaemon: 6. ./build_docker/../programs/server/Server.cpp:0: DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xdc5c51a in /usr/bin/clickhouse
    2022.09.08 21:16:21.394092 [ 228 ] {} <Fatal> BaseDaemon: 7. ./build_docker/../contrib/poco/Util/src/Application.cpp:0: Poco::Util::Application::run() @ 0x38dee227 in /usr/bin/clickhouse
    2022.09.08 21:16:21.654195 [ 228 ] {} <Fatal> BaseDaemon: 8. ./build_docker/../programs/server/Server.cpp:466: DB::Server::run() @ 0xdc326a0 in /usr/bin/clickhouse
    2022.09.08 21:16:21.666991 [ 228 ] {} <Fatal> BaseDaemon: 9. ./build_docker/../contrib/poco/Util/src/ServerApplication.cpp:0: Poco::Util::ServerApplication::run(int, char**) @ 0x38e319d9 in /usr/bin/clickhouse
    2022.09.08 21:16:21.916078 [ 228 ] {} <Fatal> BaseDaemon: 10. ./build_docker/../programs/server/Server.cpp:0: mainEntryClickHouseServer(int, char**) @ 0xdc2b4e2 in /usr/bin/clickhouse
    2022.09.08 21:16:21.929922 [ 228 ] {} <Fatal> BaseDaemon: 11. ./build_docker/../programs/main.cpp:0: main @ 0xdc25fdb in /usr/bin/clickhouse
    2022.09.08 21:16:21.929981 [ 228 ] {} <Fatal> BaseDaemon: 12. __libc_start_main @ 0x7fbe21b2c083 in ?
    2022.09.08 21:16:30.357032 [ 228 ] {} <Fatal> BaseDaemon: 13. _start @ 0xdb636ae in /usr/bin/clickhouse
    2022.09.08 21:16:31.383233 [ 228 ] {} <Fatal> BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read. (calculated checksum: 6200AC7C1270DC293DF3302E1C64399B)
    ...
    2022.09.08 21:16:40.564453 [ 228 ] {} <Information> SentryWriter: Sending crash report

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/41046/a0b85eaca8d4003c9fbc4571b30830d30f1984e9/integration_tests__asan__[3/3].html

Though another option is to increase waiting time.

Signed-off-by: Azat Khuzhin <[email protected]>
Appartently there is some issue with clang-15, since even the following
example shows error [1].

  [1]: https://gist.github.com/azat/027f0e949ea836fc2e6269113ceb8752

clang-tidy report [1]:

    FAILED: src/CMakeFiles/dbms.dir/Processors/Formats/Impl/MsgPackRowInputFormat.cpp.o                                                                                                            /usr/bin/cmake -E __run_co_compile --launcher="prlimit;--as=10000000000;--data=5000000000;--cpu=1000;/usr/bin/ccache" --tidy=/usr/bin/clang-tidy-15 --source=/ch/src/Processors/Formats/Impl/MsgPackRowInputFormat.cpp -- /usr/bin/clang++-15 --target=x86_64-linux-gnu --sysroot=/ch/cmake/linux/../../contrib/sysroot/linux-x86_64/x86_64-linux-gnu/libc  -DAWS_SDK_VERSION_MAJOR=1 -DAWS_SDK_VERSION_MINOR=7 -DAWS_SDK_VERSION_PATCH=231 -DBOOST_ASIO_HAS_STD_INVOKE_RESULT=1 -DBOOST_ASIO_STANDALONE=1 -DCARES_STATICLIB -DCONFIGDIR=\"\" -DENABLE_MULTITARGET_CODE=1 -DENABLE_OPENSSL_ENCRYPTION -DHAS_RESERVED_IDENTIFIER -DHAVE_CONFIG_H -DLIBSASL_EXPORTS=1 -DLZ4_DISABLE_DEPRECATE_WARNINGS=1 -DOBSOLETE_CRAM_ATTR=1 -DOBSOLETE_DIGEST_ATTR=1 -DPLUGINDIR=\"\" -DPOCO_ENABLE_CPP11 -DPOCO_HAVE_FD_EPOLL -DPOCO_OS_FAMILY_UNIX -DSASLAUTHD_CONF_FILE_DEFAULT=\"\" -DSNAPPY_CODEC_AVAILABLE -DSTD_EXCEPTION_HAS_STACK_TRACE=1 -DUNALIGNED_OK -DWITH_COVERAGE=0 -DWITH_GZFILEOP -DX86_64 -DZLIB_COMPAT -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Iincludes/configs -I/ch/src -Isrc -Isrc/Core/include -I/ch/base/glibc-compatibility/memcpy -I/ch/base/base/.. -Ibase/base/.. -I/ch/contrib/cctz/include -I/ch/base/pcg-random/. -I/ch/contrib/miniselect/include -I/ch/contrib/zstd/lib -Icontrib/cyrus-sasl-cmake -I/ch/contrib/lz4/lib -I/ch/src/Common/mysqlxx/. -Icontrib/c-ares -I/ch/contrib/c-ares -I/ch/contrib/c-ares/include -isystem /ch/contrib/libcxx/include -isystem /ch/contrib/libcxxabi/include -isystem /ch/contrib/libunwind/include -isystem /ch/contrib/libdivide/. -isystem /ch/contrib/jemalloc-cmake/include -isystem /ch/contrib/llvm/llvm/include -isystem contrib/llvm/llvm/include -isystem /ch/contrib/abseil-cpp -isystem /ch/contrib/croaring/cpp -isystem /ch/contrib/croaring/include -isystem /ch/contrib/cityhash102/include -isystem /ch/contrib/boost -isystem /ch/contrib/poco/Net/include -isystem /ch/contrib/poco/Foundation/include -isystem /ch/contrib/poco/NetSSL_OpenSSL/include -isystem /ch/contrib/poco/Crypto/include -isystem /ch/contrib/boringssl/include -isystem /ch/contrib/poco/Util/include -isystem /ch/contrib/poco/JSON/include -isystem /ch/contrib/poco/XML/include -isystem /ch/contrib/replxx/include -isystem /ch/contrib/fmtlib-cmake/../fmtlib/include -isystem /ch/contrib/magic_enum/include -isystem /ch/contrib/double-conversion -isystem /ch/contrib/dragonbox/include -isystem /ch/contrib/re2 -isystem contrib/re2-cmake -isystem /ch/contrib/zlib-ng -isystem contrib/zlib-ng-cmake -isystem /ch/contrib/pdqsort -isystem /ch/contrib/xz/src/liblzma/api -isystem /ch/contrib/aws-c-common/include -isystem /ch/contrib/aws-c-event-stream/include -isystem /ch/contrib/aws/aws-cpp-sdk-s3/include -isystem /ch/contrib/aws/aws-cpp-sdk-core/include -isystem contrib/aws-s3-cmake/include -isystem /ch/contrib/snappy -isystem contrib/snappy-cmake -isystem /ch/contrib/msgpack-c/include -isystem /ch/contrib/fast_float/include -isystem /ch/contrib/librdkafka-cmake/include -isystem /ch/contrib/librdkafka/src -isystem contrib/librdkafka-cmake/auxdir -isystem /ch/contrib/cppkafka/include -isystem /ch/contrib/nats-io/src -isystem /ch/contrib/nats-io/src/adapters -isystem /ch/contrib/nats-io/src/include -isystem /ch/contrib/nats-io/src/unix -isystem /ch/contrib/libuv/include -isystem /ch/contrib/krb5/src/include -isystem contrib/krb5-cmake/include -isystem /ch/contrib/NuRaft/include -isystem /ch/contrib/poco/MongoDB/include -isystem contrib/mariadb-connector-c-cmake/include-public -isystem /ch/contrib/mariadb-connector-c/include -isystem /ch/contrib/mariadb-connector-c/libmariadb -isystem /ch/contrib/icu/icu4c/source/i18n -isystem /ch/contrib/icu/icu4c/source/common -isystem /ch/contrib/capnproto/c++/src -isystem /ch/contrib/arrow/cpp/src -isystem /ch/contrib/arrow-cmake/cpp/src -isystem contrib/arrow-cmake/cpp/src -isystem contrib/arrow-cmake/../orc/c++/include -isystem /ch/contrib/orc/c++/include -isystem contrib/avro-cmake/include -isystem /ch/contrib/avro/lang/c++/api -isystem /ch/contrib/openldap-cmake/linux_x86_64/include -isystem /ch/contrib/openldap/include -isystem /ch/contrib/sparsehash-c11 -isystem /ch/contrib/protobuf/src -isystem src/Server/grpc_protos -isystem /ch/contrib/grpc/include -isystem /ch/contrib/libhdfs3/include -isystem /ch/contrib/hive-metastore -isystem /ch/contrib/thrift/lib/cpp/src -isystem contrib/thrift-cmake -isystem /ch/contrib/azure/sdk/core/azure-core/inc-isystem /ch/contrib/azure/sdk/identity/azure-identity/inc -isystem /ch/contrib/azure/sdk/storage/azure-storage-common/inc -isystem /ch/contrib/azure/sdk/storage/azure-storage-blobs/inc -isystem /ch/contrib/s2geometry/src -isystem /ch/contrib/AMQP-CPP/include -isystem /ch/contrib/AMQP-CPP -isystem /ch/contrib/sqlite-amalgamation -isystem /ch/contrib/rocksdb/include -isystem /ch/contrib/libpqxx/include -isystem /ch/contrib/libpq -isystem /ch/contrib/libpq/include -isystem /ch/contrib/libstemmer_c/include -isystem /ch/contrib/wordnet-blast -isystem /ch/contrib/lemmagen-c/include -isystem /ch/contrib/simdjson/include -isystem /ch/contrib/rapidjson/include -isystem /ch/contrib/consistent-hashing --gcc-toolchain=/ch/cmake/linux/../../contrib/sysroot/linux-x86_64 -std=c++20 -fdiagnostics-color=always -Xclang -fuse-ctor-homing -fsized-deallocation  -UNDEBUG -gdwarf-aranges -pipe -mssse3 -msse4.1 -msse4.2 -mpclmul -mpopcnt -fasynchronous-unwind-tables -falign-functions=32 -mbranches-within-32B-boundaries -fdiagnostics-absolute-paths -fstrict-vtable-pointers -fexperimental-new-pass-manager -Wall -Wextra -Weverything -Wpedantic -Wno-zero -length-array -Wno-c++98-compat-pedantic -Wno-c++98-compat -Wno-c++20-compat -Wno-conversion -Wno-ctad-maybe-unsupported -Wno-disabled-macro-expansion -Wno-documentation-unknown-command -Wno-double-promotion -Wno-exit-time-destructors -Wno-float-equal -Wno-global-constructors -Wno-missing-prototypes -Wno-missing-variable-declarations -Wno-padded -Wno-switch-enum -Wno-undefined-func-template -Wno-unused-template -Wno-vla -Wno-weak-template-vtables -Wno-weak-vtables -Wno-thread-safety-negative -g -O0 -g -gdwarf-4 -fno-inline  -D_LIBCPP_DEBUG=0   -D OS_LINUX -I/ch/base -I/ch/contrib/magic_enum/include -include /ch/src/Core/iostream_debug_helpers.h -Werror -nostdinc++ -std=gnu++2a -MD -MT src/CMakeFiles/dbms.dir/Processors/Formats/Impl/MsgPackRowInputFormat.cpp.o -MF src/CMakeFiles/dbms.dir/Processors/Formats/Impl/MsgPackRowInputFormat.cpp.o.d -o src/CMakeFiles/dbms.dir/Processors/Formats/Impl/MsgPackRowInputFormat.cpp.o -c /ch/src/Processors/Formats/Impl/MsgPackRowInputFormat.cpp

    /ch/contrib/msgpack-c/include/msgpack/v1/detail/cpp11_zone.hpp:195:9: error: Attempt to free released memory [clang-analyzer-cplusplus.NewDelete,-warnings-as-errors]
            ::free(p);
            ^
    /ch/src/Processors/Formats/Impl/MsgPackRowInputFormat.cpp:509:5: note: Taking false branch
        if (buf.eof())
        ^
    /ch/src/Processors/Formats/Impl/MsgPackRowInputFormat.cpp:514:24: note: Assuming 'i' is not equal to field 'number_of_columns'
        for (size_t i = 0; i != number_of_columns; ++i)
                           ^~~~~~~~~~~~~~~~~~~~~~
    /ch/src/Processors/Formats/Impl/MsgPackRowInputFormat.cpp:514:5: note: Loop condition is true.  Entering loop body
        for (size_t i = 0; i != number_of_columns; ++i)
        ^
    /ch/src/Processors/Formats/Impl/MsgPackRowInputFormat.cpp:516:30: note: Calling 'MsgPackSchemaReader::readObject'
            auto object_handle = readObject();
                                 ^~~~~~~~~~~~
    /ch/src/Processors/Formats/Impl/MsgPackRowInputFormat.cpp:426:5: note: Taking false branch
        if (buf.eof())
        ^
    /ch/src/Processors/Formats/Impl/MsgPackRowInputFormat.cpp:433:5: note: Loop condition is true.  Entering loop body
        while (need_more_data)
        ^
    /ch/src/Processors/Formats/Impl/MsgPackRowInputFormat.cpp:438:29: note: Calling 'unpack'
                object_handle = msgpack::unpack(buf.position(), buf.buffer().end() - buf.position(), offset);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /ch/contrib/msgpack-c/include/msgpack/v3/unpack.hpp:52:12: note: Calling 'unpack'
        return msgpack::v3::unpack(data, len, off, referenced, f, user_data, limit);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /ch/contrib/msgpack-c/include/msgpack/v3/unpack.hpp:35:5: note: Control jumps to the 'default' case at line 40
        switch(ret) {
        ^
    /ch/contrib/msgpack-c/include/msgpack/v3/unpack.hpp:41:9: note:  Execution continues on line 43
            break;
            ^
    /ch/contrib/msgpack-c/include/msgpack/v3/unpack.hpp:43:35: note: Calling '~unique_ptr'
        return msgpack::object_handle();
                                      ^
    /ch/contrib/libcxx/include/__memory/unique_ptr.h:269:19: note: Calling 'unique_ptr::reset'
      ~unique_ptr() { reset(); }
                      ^~~~~~~
    /ch/contrib/libcxx/include/__memory/unique_ptr.h:314:9: note: '__tmp' is non-null
        if (__tmp)
            ^~~~~
    /ch/contrib/libcxx/include/__memory/unique_ptr.h:314:5: note: Taking true branch
        if (__tmp)
        ^
    /ch/contrib/libcxx/include/__memory/unique_ptr.h:315:7: note: Calling 'default_delete::operator()'
          __ptr_.second()(__tmp);
          ^~~~~~~~~~~~~~~~~~~~~~
    /ch/contrib/libcxx/include/__memory/unique_ptr.h:54:5: note: Memory is released
        delete __ptr;
        ^~~~~~~~~~~~
    /ch/contrib/libcxx/include/__memory/unique_ptr.h:54:5: note: Calling 'zone::operator delete'
        delete __ptr;
        ^~~~~~~~~~~~
    /ch/contrib/msgpack-c/include/msgpack/v1/detail/cpp11_zone.hpp:195:9: note: Attempt to free released memory
            ::free(p);
            ^~~~~~~~~

  [1]: https://s3.amazonaws.com/clickhouse-builds/41046/9677898b3b234a5ba0371edaf719ea8890d084ff/binary_tidy/build_log.log

Signed-off-by: Azat Khuzhin <[email protected]>
@azat azat marked this pull request as ready for review September 10, 2022 19:39
@azat
Copy link
Copy Markdown
Member Author

azat commented Sep 11, 2022

So this looks OK, and the failures looks unrelated.

But note, that there is one issue with JIT, though it does not makes anything worse, that code (compileAddIntoAggregateStatesFunctionsSinglePlace) was already disabled in aggregator (in #27574) - ba41744, I'm going to take a look separately into this.

[Integration tests (tsan) [3/4] — fail: 1, passed: 471, flaky: 0}(https://s3.amazonaws.com/clickhouse-test-reports/41046/c1e70169d2eec449012ac1bb555347a840c9c181/integration_tests__tsan__[3/4].html)

  • test_dns_cache/test.py::test_host_is_drop_from_cache_after_consecutive_failures - flaky (clickhouse play)

Stress test (ubsan) — Cannot start clickhouse-server

Backward check

2022.09.11 01:06:39.684098 [ 1069926 ] {} <Error> Application: DB::Exception: Attempt to read after eof: Cannot attach table `test_13`.`a` from metadata file /var/lib/clickhouse/metadata/test_13/a.sql from query ATTACH TABLE test_13.a (`x` UInt8) ENGINE = MergeTree ORDER BY tuple() SETTINGS index_granularity = 8192

Stateless tests (debug, s3 storage) [1/3] — fail: 1, passed: 1466, skipped: 32

  • 02360_send_logs_level_colors this test was flaky and has some fixes, but apparently is not enough

@nickitat
Copy link
Copy Markdown
Member

perf tests showed also some slowdowns. have you take a look?

@azat
Copy link
Copy Markdown
Member Author

azat commented Sep 11, 2022

perf tests showed also some slowdowns. have you take a look?

I've looked only briefly at perf results, and need to take a closer look. At first I thought that this can be due to different inlines (than I was going to start from https://github.com/llvm/llvm-project/blob/llvmorg-15.0.0/llvm/lib/Analysis/InlineCost.cpp, and maybe play with -mllvm -inline-threshold=1000 and some new options that had been added to control inlining), but this is not always the case, it just simply generates slightly different code.

FWIW when previously it had been upgrade to clang-14 (#34754) perf tests also shows some slow downs.

BTW, apparently llvm/clang improves codegen for amd64, since it shows significant improvements.

@alexey-milovidov alexey-milovidov merged commit da01982 into ClickHouse:master Sep 16, 2022
@azat
Copy link
Copy Markdown
Member Author

azat commented Sep 16, 2022

alexey-milovidov merged commit da01982

I think it worth to rebase first, maybe some new warning had been introduced recently :)
But, yeah, can be fixed after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-build Pull request with build/testing/packaging improvement submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants