https://s3.amazonaws.com/clickhouse-test-reports/40910/b86aec41d48f57c105bc913c3258858a9243bae3/stress_test__msan_.html

```
==864563==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x3cbb26b1 in std::__1::__tree_end_node<std::__1::__tree_node_base<void*>*>* std::__1::__tree_next_iter<std::__1::__tree_end_node<std::__1::__tree_node_base<void*>*>*, std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*) build_docker/../contrib/libcxx/include/__tree:184:9
    #1 0x3cbb26b1 in std::__1::__tree_iterator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>*, long>::operator++() build_docker/../contrib/libcxx/include/__tree:844:11
    #2 0x3cbb26b1 in std::__1::__tree<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__map_value_compare<Poco::Timestamp, std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::less<Poco::Timestamp>, true>, std::__1::allocator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>>>::__remove_node_pointer(std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>*) build_docker/../contrib/libcxx/include/__tree:2249:5
    #3 0x3cbb26b1 in std::__1::__tree<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__map_value_compare<Poco::Timestamp, std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::less<Poco::Timestamp>, true>, std::__1::allocator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>>>::erase(std::__1::__tree_const_iterator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>*, long>) build_docker/../contrib/libcxx/include/__tree:2422:20
    #4 0x3cb9b303 in std::__1::multimap<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>, std::__1::less<Poco::Timestamp>, std::__1::allocator<std::__1::pair<Poco::Timestamp const, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>>>::erase(std::__1::__map_iterator<std::__1::__tree_iterator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>*, long>>) build_docker/../contrib/libcxx/include/map:2044:56
    #5 0x3cb9b303 in DB::BackgroundSchedulePool::cancelDelayedTask(std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo> const&, std::__1::lock_guard<std::__1::mutex>&) build_docker/../src/Core/BackgroundSchedulePool.cpp:239:23
    #6 0x3cb9b303 in DB::BackgroundSchedulePoolTaskInfo::deactivate() build_docker/../src/Core/BackgroundSchedulePool.cpp:55:14
    #7 0x3eece9bf in DB::DNSCacheUpdater::~DNSCacheUpdater() build_docker/../src/Interpreters/DNSCacheUpdater.cpp:53:18
    #8 0xbae5ebf in std::__1::default_delete<DB::DNSCacheUpdater>::operator()(DB::DNSCacheUpdater*) const build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:54:5
    #9 0xbae5ebf in std::__1::unique_ptr<DB::DNSCacheUpdater, std::__1::default_delete<DB::DNSCacheUpdater>>::reset(DB::DNSCacheUpdater*) build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:315:7
    #10 0xbae5ebf in std::__1::unique_ptr<DB::DNSCacheUpdater, std::__1::default_delete<DB::DNSCacheUpdater>>::~unique_ptr() build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:269:19
    #11 0xbaab03e in 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&) build_docker/../programs/server/Server.cpp:1846:1
    #12 0x4f52f3b5 in Poco::Util::Application::run() build_docker/../contrib/poco/Util/src/Application.cpp:334:8
    #13 0xba5d41a in DB::Server::run() build_docker/../programs/server/Server.cpp:466:25
    #14 0x4f58a086 in Poco::Util::ServerApplication::run(int, char**) build_docker/../contrib/poco/Util/src/ServerApplication.cpp:611:9
    #15 0xba54e6b in mainEntryClickHouseServer(int, char**) build_docker/../programs/server/Server.cpp:181:20
    #16 0xba4d387 in main build_docker/../programs/main.cpp:480:12
    #17 0x7f1b3903a082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
    #18 0xb9c33ed in _start (/usr/bin/clickhouse+0xb9c33ed) (BuildId: f25e3d966f98f9a1b621f1fd98b03270f4d7fa53)

  Uninitialized value was created by a heap deallocation
    #0 0xba4a959 in operator delete(void*, unsigned long) (/usr/bin/clickhouse+0xba4a959) (BuildId: f25e3d966f98f9a1b621f1fd98b03270f4d7fa53)
    #1 0x3cba97a4 in void std::__1::__libcpp_operator_delete<void*, unsigned long>(void*, unsigned long) build_docker/../contrib/libcxx/include/new:255:3
    #2 0x3cba97a4 in void std::__1::__do_deallocate_handle_size<>(void*, unsigned long) build_docker/../contrib/libcxx/include/new:281:10
    #3 0x3cba97a4 in std::__1::__libcpp_deallocate(void*, unsigned long, unsigned long) build_docker/../contrib/libcxx/include/new:295:14
    #4 0x3cba97a4 in std::__1::allocator<std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>>::deallocate(std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>*, unsigned long) build_docker/../contrib/libcxx/include/__memory/allocator.h:114:13
    #5 0x3cba97a4 in std::__1::allocator_traits<std::__1::allocator<std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>>>::deallocate(std::__1::allocator<std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>>&, std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>*, unsigned long) build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:282:13
    #6 0x3cba97a4 in std::__1::__tree<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__map_value_compare<Poco::Timestamp, std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::less<Poco::Timestamp>, true>, std::__1::allocator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>*) build_docker/../contrib/libcxx/include/__tree:1804:9
    #7 0x3cba3ad6 in std::__1::__tree<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__map_value_compare<Poco::Timestamp, std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::less<Poco::Timestamp>, true>, std::__1::allocator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>>>::~__tree() build_docker/../contrib/libcxx/include/__tree:1791:3
    #8 0x3cba3ad6 in std::__1::multimap<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>, std::__1::less<Poco::Timestamp>, std::__1::allocator<std::__1::pair<Poco::Timestamp const, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>>>::~multimap() build_docker/../contrib/libcxx/include/map:1939:5
    #9 0x3cba3ad6 in DB::BackgroundSchedulePool::~BackgroundSchedulePool() build_docker/../src/Core/BackgroundSchedulePool.cpp:199:1
    #10 0x3ed50d71 in std::__1::default_delete<DB::BackgroundSchedulePool>::operator()(DB::BackgroundSchedulePool*) const build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:54:5
    #11 0x3ed50d71 in std::__1::unique_ptr<DB::BackgroundSchedulePool, std::__1::default_delete<DB::BackgroundSchedulePool>>::reset(DB::BackgroundSchedulePool*) build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:315:7
    #12 0x3ed50d71 in DB::ContextSharedPart::shutdown() build_docker/../src/Interpreters/Context.cpp:455:30
    #13 0x3ed2e274 in DB::Context::shutdown() build_docker/../src/Interpreters/Context.cpp:2846:13
    #14 0xbab6e86 in 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&)::$_9::operator()() const build_docker/../programs/server/Server.cpp:1494:5
    #15 0xbab6e86 in BasicScopeGuard<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&)::$_9>::invoke() build_docker/../base/base/../base/scope_guard.h:99:9
    #16 0xbab6e86 in BasicScopeGuard<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&)::$_9>::~BasicScopeGuard() build_docker/../base/base/../base/scope_guard.h:48:26
    #17 0xbaab029 in 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&) build_docker/../programs/server/Server.cpp:1846:1
    #18 0x4f52f3b5 in Poco::Util::Application::run() build_docker/../contrib/poco/Util/src/Application.cpp:334:8
    #19 0xba5d41a in DB::Server::run() build_docker/../programs/server/Server.cpp:466:25
    #20 0x4f58a086 in Poco::Util::ServerApplication::run(int, char**) build_docker/../contrib/poco/Util/src/ServerApplication.cpp:611:9
    #21 0xba54e6b in mainEntryClickHouseServer(int, char**) build_docker/../programs/server/Server.cpp:181:20
    #22 0xba4d387 in main build_docker/../programs/main.cpp:480:12
    #23 0x7f1b3903a082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)

SUMMARY: MemorySanitizer: use-of-uninitialized-value build_docker/../contrib/libcxx/include/__tree:184:9 in std::__1::__tree_end_node<std::__1::__tree_node_base<void*>*>* std::__1::__tree_next_iter<std::__1::__tree_end_node<std::__1::__tree_node_base<void*>*>*, std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*)
Exiting
Uninitialized bytes in __interceptor_write at offset 0 inside [0x7ffd6a9ce270, 392)
==864563==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0xbc1ea16 in DB::WriteBufferFromFileDescriptorDiscardOnFailure::nextImpl() build_docker/../src/IO/WriteBufferFromFileDescriptorDiscardOnFailure.cpp:16:23
    #1 0xbec5d39 in DB::WriteBuffer::next() build_docker/../src/IO/WriteBuffer.h:49:13
    #2 0xc2e7fc3 in sanitizerDeathCallback() build_docker/../src/Daemon/BaseDaemon.cpp:421:9
    #3 0xb9d6ff5 in __sanitizer::Die() crtstuff.c
    #4 0xb9ebb92 in __msan_warning_with_origin_noreturn (/usr/bin/clickhouse+0xb9ebb92) (BuildId: f25e3d966f98f9a1b621f1fd98b03270f4d7fa53)
    #5 0x3cbb26b1 in std::__1::__tree_end_node<std::__1::__tree_node_base<void*>*>* std::__1::__tree_next_iter<std::__1::__tree_end_node<std::__1::__tree_node_base<void*>*>*, std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*) build_docker/../contrib/libcxx/include/__tree:184:9
    #6 0x3cbb26b1 in std::__1::__tree_iterator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>*, long>::operator++() build_docker/../contrib/libcxx/include/__tree:844:11
    #7 0x3cbb26b1 in std::__1::__tree<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__map_value_compare<Poco::Timestamp, std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::less<Poco::Timestamp>, true>, std::__1::allocator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>>>::__remove_node_pointer(std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>*) build_docker/../contrib/libcxx/include/__tree:2249:5
    #8 0x3cbb26b1 in std::__1::__tree<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__map_value_compare<Poco::Timestamp, std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::less<Poco::Timestamp>, true>, std::__1::allocator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>>>::erase(std::__1::__tree_const_iterator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>*, long>) build_docker/../contrib/libcxx/include/__tree:2422:20
    #9 0x3cb9b303 in std::__1::multimap<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>, std::__1::less<Poco::Timestamp>, std::__1::allocator<std::__1::pair<Poco::Timestamp const, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>>>::erase(std::__1::__map_iterator<std::__1::__tree_iterator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>*, long>>) build_docker/../contrib/libcxx/include/map:2044:56
    #10 0x3cb9b303 in DB::BackgroundSchedulePool::cancelDelayedTask(std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo> const&, std::__1::lock_guard<std::__1::mutex>&) build_docker/../src/Core/BackgroundSchedulePool.cpp:239:23
    #11 0x3cb9b303 in DB::BackgroundSchedulePoolTaskInfo::deactivate() build_docker/../src/Core/BackgroundSchedulePool.cpp:55:14
    #12 0x3eece9bf in DB::DNSCacheUpdater::~DNSCacheUpdater() build_docker/../src/Interpreters/DNSCacheUpdater.cpp:53:18
    #13 0xbae5ebf in std::__1::default_delete<DB::DNSCacheUpdater>::operator()(DB::DNSCacheUpdater*) const build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:54:5
    #14 0xbae5ebf in std::__1::unique_ptr<DB::DNSCacheUpdater, std::__1::default_delete<DB::DNSCacheUpdater>>::reset(DB::DNSCacheUpdater*) build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:315:7
    #15 0xbae5ebf in std::__1::unique_ptr<DB::DNSCacheUpdater, std::__1::default_delete<DB::DNSCacheUpdater>>::~unique_ptr() build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:269:19
    #16 0xbaab03e in 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&) build_docker/../programs/server/Server.cpp:1846:1
    #17 0x4f52f3b5 in Poco::Util::Application::run() build_docker/../contrib/poco/Util/src/Application.cpp:334:8
    #18 0xba5d41a in DB::Server::run() build_docker/../programs/server/Server.cpp:466:25
    #19 0x4f58a086 in Poco::Util::ServerApplication::run(int, char**) build_docker/../contrib/poco/Util/src/ServerApplication.cpp:611:9
    #20 0xba54e6b in mainEntryClickHouseServer(int, char**) build_docker/../programs/server/Server.cpp:181:20
    #21 0xba4d387 in main build_docker/../programs/main.cpp:480:12
    #22 0x7f1b3903a082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
    #23 0xb9c33ed in _start (/usr/bin/clickhouse+0xb9c33ed) (BuildId: f25e3d966f98f9a1b621f1fd98b03270f4d7fa53)

  Uninitialized value was stored to memory at
    #0 0xb9f09b9 in __msan_memcpy (/usr/bin/clickhouse+0xb9f09b9) (BuildId: f25e3d966f98f9a1b621f1fd98b03270f4d7fa53)
    #1 0xbaec076 in DB::WriteBuffer::write(char const*, unsigned long) build_docker/../src/IO/WriteBuffer.h:89:13
    #2 0xc2ee2f0 in void DB::writePODBinary<int>(int const&, DB::WriteBuffer&) build_docker/../src/IO/WriteHelpers.h:84:9
    #3 0xc2ee2f0 in void DB::writeBinary<int>(int const&, DB::WriteBuffer&) build_docker/../src/IO/WriteHelpers.h:852:59
    #4 0xc2e7f70 in sanitizerDeathCallback() build_docker/../src/Daemon/BaseDaemon.cpp:416:5
    #5 0xb9d6ff5 in __sanitizer::Die() crtstuff.c
    #6 0x3cbb26b1 in std::__1::__tree_end_node<std::__1::__tree_node_base<void*>*>* std::__1::__tree_next_iter<std::__1::__tree_end_node<std::__1::__tree_node_base<void*>*>*, std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*) build_docker/../contrib/libcxx/include/__tree:184:9
    #7 0x3cbb26b1 in std::__1::__tree_iterator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>*, long>::operator++() build_docker/../contrib/libcxx/include/__tree:844:11
    #8 0x3cbb26b1 in std::__1::__tree<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__map_value_compare<Poco::Timestamp, std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::less<Poco::Timestamp>, true>, std::__1::allocator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>>>::__remove_node_pointer(std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>*) build_docker/../contrib/libcxx/include/__tree:2249:5
    #9 0x3cbb26b1 in std::__1::__tree<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__map_value_compare<Poco::Timestamp, std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::less<Poco::Timestamp>, true>, std::__1::allocator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>>>::erase(std::__1::__tree_const_iterator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>*, long>) build_docker/../contrib/libcxx/include/__tree:2422:20
    #10 0x3cb9b303 in std::__1::multimap<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>, std::__1::less<Poco::Timestamp>, std::__1::allocator<std::__1::pair<Poco::Timestamp const, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>>>::erase(std::__1::__map_iterator<std::__1::__tree_iterator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo>>, void*>*, long>>) build_docker/../contrib/libcxx/include/map:2044:56
    #11 0x3cb9b303 in DB::BackgroundSchedulePool::cancelDelayedTask(std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo> const&, std::__1::lock_guard<std::__1::mutex>&) build_docker/../src/Core/BackgroundSchedulePool.cpp:239:23
    #12 0x3cb9b303 in DB::BackgroundSchedulePoolTaskInfo::deactivate() build_docker/../src/Core/BackgroundSchedulePool.cpp:55:14
    #13 0x3eece9bf in DB::DNSCacheUpdater::~DNSCacheUpdater() build_docker/../src/Interpreters/DNSCacheUpdater.cpp:53:18
    #14 0xbae5ebf in std::__1::default_delete<DB::DNSCacheUpdater>::operator()(DB::DNSCacheUpdater*) const build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:54:5
    #15 0xbae5ebf in std::__1::unique_ptr<DB::DNSCacheUpdater, std::__1::default_delete<DB::DNSCacheUpdater>>::reset(DB::DNSCacheUpdater*) build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:315:7
    #16 0xbae5ebf in std::__1::unique_ptr<DB::DNSCacheUpdater, std::__1::default_delete<DB::DNSCacheUpdater>>::~unique_ptr() build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:269:19
    #17 0xbaab03e in 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&) build_docker/../programs/server/Server.cpp:1846:1
    #18 0x4f52f3b5 in Poco::Util::Application::run() build_docker/../contrib/poco/Util/src/Application.cpp:334:8
    #19 0xba5d41a in DB::Server::run() build_docker/../programs/server/Server.cpp:466:25
    #20 0x4f58a086 in Poco::Util::ServerApplication::run(int, char**) build_docker/../contrib/poco/Util/src/ServerApplication.cpp:611:9
    #21 0xba54e6b in mainEntryClickHouseServer(int, char**) build_docker/../programs/server/Server.cpp:181:20
    #22 0xba4d387 in main build_docker/../programs/main.cpp:480:12
    #23 0x7f1b3903a082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)

  Uninitialized value was stored to memory at
    #0 0xb9f09b9 in __msan_memcpy (/usr/bin/clickhouse+0xb9f09b9) (BuildId: f25e3d966f98f9a1b621f1fd98b03270f4d7fa53)
    #1 0x5b25f6f2 in libunwind::Registers_x86_64::Registers_x86_64(void const*) build_docker/../contrib/libunwind/src/Registers.hpp:345:3
    #2 0x5b25f6f2 in libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::UnwindCursor(unw_context_t*, libunwind::LocalAddressSpace&) build_docker/../contrib/libunwind/src/UnwindCursor.hpp:1289:26
    #3 0x5b25f6f2 in unw_init_local build_docker/../contrib/libunwind/src/libunwind.cpp:85:7
    #4 0x5b263061 in unwind_phase2 build_docker/../contrib/libunwind/src/UnwindLevel1.c:172:3
    #5 0x5b26300c in _Unwind_RaiseException build_docker/../contrib/libunwind/src/UnwindLevel1.c:418:10
    #6 0x5b24c75e in __cxa_rethrow build_docker/../contrib/libcxxabi/src/cxa_exception.cpp:615:5
    #7 0xbaaad04 in 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&) build_docker/../programs/server/Server.cpp:1597:9
    #8 0x4f52f3b5 in Poco::Util::Application::run() build_docker/../contrib/poco/Util/src/Application.cpp:334:8
    #9 0xba5d41a in DB::Server::run() build_docker/../programs/server/Server.cpp:466:25
    #10 0x4f58a086 in Poco::Util::ServerApplication::run(int, char**) build_docker/../contrib/poco/Util/src/ServerApplication.cpp:611:9
    #11 0xba54e6b in mainEntryClickHouseServer(int, char**) build_docker/../programs/server/Server.cpp:181:20
    #12 0xba4d387 in main build_docker/../programs/main.cpp:480:12
    #13 0x7f1b3903a082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)

  Memory was marked as uninitialized
    #0 0xb9f752d in __sanitizer_dtor_callback (/usr/bin/clickhouse+0xb9f752d) (BuildId: f25e3d966f98f9a1b621f1fd98b03270f4d7fa53)
    #1 0xbb57536 in DB::tryLogCurrentExceptionImpl(Poco::Logger*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) build_docker/../src/Common/Exception.cpp
    #2 0xbb57bca in DB::tryLogCurrentException(Poco::Logger*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) build_docker/../src/Common/Exception.cpp:199:5
    #3 0xbaaace4 in 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&) build_docker/../programs/server/Server.cpp:1596:9
    #4 0x4f52f3b5 in Poco::Util::Application::run() build_docker/../contrib/poco/Util/src/Application.cpp:334:8
    #5 0xba5d41a in DB::Server::run() build_docker/../programs/server/Server.cpp:466:25
    #6 0x4f58a086 in Poco::Util::ServerApplication::run(int, char**) build_docker/../contrib/poco/Util/src/ServerApplication.cpp:611:9
    #7 0xba54e6b in mainEntryClickHouseServer(int, char**) build_docker/../programs/server/Server.cpp:181:20
    #8 0xba4d387 in main build_docker/../programs/main.cpp:480:12
    #9 0x7f1b3903a082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)

```
if (dns_cache_updater)
        dns_cache_updater->start();
    SCOPE_EXIT({
        
        
        main_config_reloader.reset();
        access_control.stopPeriodicReloading();
        async_metrics.stop();
        /** Ask to cancel background jobs all table engines,
          *  and also query_log.
          * It is important to do early, not in destructor of Context, because
          *  table engines could use Context on destroy.
          */
        LOG_INFO(log, "Shutting down storages.");
        global_context->shutdown();
        LOG_DEBUG(log, "Shut down storages.");
        if (!servers_to_start_before_tables.empty())
        {
            LOG_DEBUG(log, "Waiting for current connections to servers for tables to finish.");
            int current_connections = 0;
            for (auto & server : servers_to_start_before_tables)
            {
                server.stop();
                current_connections += server.currentConnections();
            }
            if (current_connections)
                LOG_INFO(log, "Closed all listening sockets. Waiting for {} outstanding connections.", current_connections);
            else
                LOG_INFO(log, "Closed all listening sockets.");
            if (current_connections > 0)