Azure / azure-sdk-for-cpp

This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
MIT License
181 stars 126 forks source link

TSan complains about thread leak #4047

Closed alexey-milovidov closed 2 years ago

alexey-milovidov commented 2 years ago

Describe the bug

==================
WARNING: ThreadSanitizer: thread leak (pid=1362)
  Thread T231 (tid=1605, finished) created by thread T226 at:
    #0 pthread_create <null> (clickhouse+0xb8e7f7d) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #1 std::__1::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) build_docker/../contrib/libcxx/include/__threading_support:375:10 (clickhouse+0x217c1f37) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #2 std::__1::thread::thread<void (&)(), void>(void (&)()) build_docker/../contrib/libcxx/include/thread:309:16 (clickhouse+0x217c1f37)
    #3 Azure::Core::Http::_detail::CurlConnectionPool::MoveConnectionBackToPool(std::__1::unique_ptr<Azure::Core::Http::CurlNetworkConnection, std::__1::default_delete<Azure::Core::Http::CurlNetworkConnection>>, Azure::Core::Http::HttpStatusCode) build_docker/../contrib/azure/sdk/core/azure-core/src/http/curl/curl.cpp:1491:21 (clickhouse+0x217bfe90) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #4 Azure::Core::Http::CurlSession::~CurlSession() build_docker/../contrib/azure/sdk/core/azure-core/src/http/curl/curl_session_private.hpp:393:59 (clickhouse+0x217c24a7) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #5 Azure::Core::Http::CurlSession::~CurlSession() build_docker/../contrib/azure/sdk/core/azure-core/src/http/curl/curl_session_private.hpp:384:5 (clickhouse+0x217c24a7)
    #6 std::__1::default_delete<Azure::Core::IO::BodyStream>::operator()(Azure::Core::IO::BodyStream*) const build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:54:5 (clickhouse+0x217b63b0) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #7 std::__1::unique_ptr<Azure::Core::IO::BodyStream, std::__1::default_delete<Azure::Core::IO::BodyStream>>::reset(Azure::Core::IO::BodyStream*) build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:315:7 (clickhouse+0x217b63b0)
    #8 std::__1::unique_ptr<Azure::Core::IO::BodyStream, std::__1::default_delete<Azure::Core::IO::BodyStream>>::~unique_ptr() build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:269:19 (clickhouse+0x217b63b0)
    #9 Azure::Core::Http::Policies::_internal::TransportPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Http::Policies::NextHttpPolicy, Azure::Core::Context const&) const build_docker/../contrib/azure/sdk/core/azure-core/src/http/transport_policy.cpp:79:1 (clickhouse+0x217b63b0)
    #10 Azure::Core::Http::Policies::NextHttpPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Context const&) build_docker/../contrib/azure/sdk/core/azure-core/src/http/policy.cpp:21:35 (clickhouse+0x217b4898) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #11 Azure::Core::Http::Policies::_internal::LogPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Http::Policies::NextHttpPolicy, Azure::Core::Context const&) const build_docker/../contrib/azure/sdk/core/azure-core/src/http/log_policy.cpp:172:23 (clickhouse+0x217b1868) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #12 Azure::Core::Http::Policies::NextHttpPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Context const&) build_docker/../contrib/azure/sdk/core/azure-core/src/http/policy.cpp:21:35 (clickhouse+0x217b4898) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #13 Azure::Storage::_internal::SharedKeyPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Http::Policies::NextHttpPolicy, Azure::Core::Context const&) const build_docker/../contrib/azure/sdk/storage/azure-storage-common/inc/azure/storage/common/internal/shared_key_policy.hpp:36:25 (clickhouse+0x21817392) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #14 Azure::Core::Http::Policies::NextHttpPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Context const&) build_docker/../contrib/azure/sdk/core/azure-core/src/http/policy.cpp:21:35 (clickhouse+0x217b4898) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #15 Azure::Storage::_internal::StoragePerRetryPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Http::Policies::NextHttpPolicy, Azure::Core::Context const&) const build_docker/../contrib/azure/sdk/storage/azure-storage-common/src/storage_per_retry_policy.cpp:48:23 (clickhouse+0x218d0c97) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #16 Azure::Core::Http::Policies::NextHttpPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Context const&) build_docker/../contrib/azure/sdk/core/azure-core/src/http/policy.cpp:21:35 (clickhouse+0x217b4898) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #17 Azure::Storage::_internal::StorageSwitchToSecondaryPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Http::Policies::NextHttpPolicy, Azure::Core::Context const&) const build_docker/../contrib/azure/sdk/storage/azure-storage-common/src/storage_switch_to_secondary_policy.cpp:36:32 (clickhouse+0x218d14dc) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #18 Azure::Core::Http::Policies::NextHttpPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Context const&) build_docker/../contrib/azure/sdk/core/azure-core/src/http/policy.cpp:21:35 (clickhouse+0x217b4898) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #19 Azure::Core::Http::Policies::_internal::RetryPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Http::Policies::NextHttpPolicy, Azure::Core::Context const&) const build_docker/../contrib/azure/sdk/core/azure-core/src/http/retry_policy.cpp:134:34 (clickhouse+0x217df6ae) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #20 Azure::Core::Http::Policies::NextHttpPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Context const&) build_docker/../contrib/azure/sdk/core/azure-core/src/http/policy.cpp:21:35 (clickhouse+0x217b4898) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #21 Azure::Core::Http::Policies::_internal::TelemetryPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Http::Policies::NextHttpPolicy, Azure::Core::Context const&) const build_docker/../contrib/azure/sdk/core/azure-core/src/http/telemetry_policy.cpp:166:21 (clickhouse+0x217df11e) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #22 Azure::Core::Http::Policies::NextHttpPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Context const&) build_docker/../contrib/azure/sdk/core/azure-core/src/http/policy.cpp:21:35 (clickhouse+0x217b4898) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #23 Azure::Core::Http::Policies::_internal::RequestIdPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Http::Policies::NextHttpPolicy, Azure::Core::Context const&) const build_docker/../contrib/azure/sdk/core/azure-core/inc/azure/core/http/policies/policy.hpp:373:27 (clickhouse+0x217dd6c3) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #24 Azure::Core::Http::Policies::NextHttpPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Context const&) build_docker/../contrib/azure/sdk/core/azure-core/src/http/policy.cpp:21:35 (clickhouse+0x217b4898) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #25 Azure::Storage::_internal::StorageServiceVersionPolicy::Send(Azure::Core::Http::Request&, Azure::Core::Http::Policies::NextHttpPolicy, Azure::Core::Context const&) const build_docker/../contrib/azure/sdk/storage/azure-storage-common/inc/azure/storage/common/internal/storage_service_version_policy.hpp:31:25 (clickhouse+0x21817efe) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #26 Azure::Core::Http::_internal::HttpPipeline::Send(Azure::Core::Http::Request&, Azure::Core::Context const&) const build_docker/../contrib/azure/sdk/core/azure-core/inc/azure/core/internal/http/pipeline.hpp:186:29 (clickhouse+0x2185d102) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #27 Azure::Storage::Blobs::_detail::BlobRestClient::Service::ListBlobContainers(Azure::Core::Http::_internal::HttpPipeline&, Azure::Core::Url const&, Azure::Storage::Blobs::_detail::BlobRestClient::Service::ListBlobContainersOptions const&, Azure::Core::Context const&) build_docker/../contrib/azure/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/protocol/blob_rest_client.hpp:3003:41 (clickhouse+0x2185d102)
    #28 Azure::Storage::Blobs::BlobServiceClient::ListBlobContainers(Azure::Storage::Blobs::ListBlobContainersOptions const&, Azure::Core::Context const&) const build_docker/../contrib/azure/sdk/storage/azure-storage-blobs/src/blob_service_client.cpp:131:21 (clickhouse+0x218596a5) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #29 DB::getAzureBlobContainerClient(Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) build_docker/../src/Disks/ObjectStorages/AzureBlobStorage/AzureBlobStorageAuth.cpp:132:53 (clickhouse+0x1b0ff2b0) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #30 DB::registerDiskAzureBlobStorage(DB::DiskFactory&)::$_0::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&) const build_docker/../src/Disks/ObjectStorages/AzureBlobStorage/registerDiskAzureBlobStorage.cpp:79:13 (clickhouse+0x1b0fc236) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #31 decltype(static_cast<DB::registerDiskAzureBlobStorage(DB::DiskFactory&)::$_0&>(fp)(static_cast<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&>(fp0), static_cast<Poco::Util::AbstractConfiguration const&>(fp0), static_cast<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&>(fp0), static_cast<std::__1::shared_ptr<DB::Context const>>(fp0), static_cast<std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&>(fp0))) std::__1::__invoke<DB::registerDiskAzureBlobStorage(DB::DiskFactory&)::$_0&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&>(DB::registerDiskAzureBlobStorage(DB::DiskFactory&)::$_0&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>&&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&) build_docker/../contrib/libcxx/include/type_traits:3640:23 (clickhouse+0x1b0fc236)
    #32 std::__1::shared_ptr<DB::IDisk> std::__1::__invoke_void_return_wrapper<std::__1::shared_ptr<DB::IDisk>, false>::__call<DB::registerDiskAzureBlobStorage(DB::DiskFactory&)::$_0&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&>(DB::registerDiskAzureBlobStorage(DB::DiskFactory&)::$_0&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>&&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&) build_docker/../contrib/libcxx/include/__functional/invoke.h:30:16 (clickhouse+0x1b0fc236)
    #33 std::__1::__function::__default_alloc_func<DB::registerDiskAzureBlobStorage(DB::DiskFactory&)::$_0, std::__1::shared_ptr<DB::IDisk> (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&)>::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>&&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&) build_docker/../contrib/libcxx/include/__functional/function.h:230:12 (clickhouse+0x1b0fc236)
    #34 std::__1::shared_ptr<DB::IDisk> std::__1::__function::__policy_invoker<std::__1::shared_ptr<DB::IDisk> (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&)>::__call_impl<std::__1::__function::__default_alloc_func<DB::registerDiskAzureBlobStorage(DB::DiskFactory&)::$_0, std::__1::shared_ptr<DB::IDisk> (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&)>>(std::__1::__function::__policy_storage const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>&&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&) build_docker/../contrib/libcxx/include/__functional/function.h:711:16 (clickhouse+0x1b0fc236)
    #35 std::__1::__function::__policy_func<std::__1::shared_ptr<DB::IDisk> (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&)>::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>&&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&) const build_docker/../contrib/libcxx/include/__functional/function.h:843:16 (clickhouse+0x1b05488b) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #36 std::__1::function<std::__1::shared_ptr<DB::IDisk> (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&)>::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&) const build_docker/../contrib/libcxx/include/__functional/function.h:1184:12 (clickhouse+0x1b05488b)
    #37 DB::DiskFactory::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<DB::IDisk>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::shared_ptr<DB::IDisk>>>> const&) const build_docker/../src/Disks/DiskFactory.cpp:37:12 (clickhouse+0x1b05488b)
    #38 DB::DiskSelector::initialize(Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>) build_docker/../src/Disks/DiskSelector.cpp:49:42 (clickhouse+0x1b706000) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #39 DB::Context::getDiskSelector(std::__1::lock_guard<std::__1::mutex>&) const build_docker/../src/Interpreters/Context.cpp:2752:24 (clickhouse+0x1b6b9a93) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #40 DB::Context::getStoragePolicySelector(std::__1::lock_guard<std::__1::mutex>&) const build_docker/../src/Interpreters/Context.cpp:2765:115 (clickhouse+0x1b69fe2c) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #41 DB::Context::getStoragePolicy(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const build_docker/../src/Interpreters/Context.cpp:2726:28 (clickhouse+0x1b6b9caa) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #42 DB::MergeTreeData::getStoragePolicy() const build_docker/../src/Storages/MergeTree/MergeTreeData.cpp:370:26 (clickhouse+0x1ce9a43d) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #43 DB::MergeTreeData::getDisks() const build_docker/../src/Storages/MergeTree/MergeTreeData.h:875:37 (clickhouse+0x1ce9a43d)
    #44 DB::MergeTreeData::MergeTreeData(DB::StorageID const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::StorageInMemoryMetadata const&, std::__1::shared_ptr<DB::Context>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::MergeTreeData::MergingParams const&, std::__1::unique_ptr<DB::MergeTreeSettings, std::__1::default_delete<DB::MergeTreeSettings>>, bool, bool, std::__1::function<void (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)>) build_docker/../src/Storages/MergeTree/MergeTreeData.cpp:288:30 (clickhouse+0x1ce9a43d)
    #45 DB::StorageMergeTree::StorageMergeTree(DB::StorageID const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::StorageInMemoryMetadata const&, bool, std::__1::shared_ptr<DB::Context>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::MergeTreeData::MergingParams const&, std::__1::unique_ptr<DB::MergeTreeSettings, std::__1::default_delete<DB::MergeTreeSettings>>, bool) build_docker/../src/Storages/StorageMergeTree.cpp:91:7 (clickhouse+0x1d190861) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #46 DB::StorageMergeTree* std::__1::construct_at<DB::StorageMergeTree, DB::StorageID const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::StorageInMemoryMetadata&, bool const&, std::__1::shared_ptr<DB::Context>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, DB::MergeTreeData::MergingParams&, std::__1::unique_ptr<DB::MergeTreeSettings, std::__1::default_delete<DB::MergeTreeSettings>>, bool const&, DB::StorageMergeTree*>(DB::StorageMergeTree*, DB::StorageID const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::StorageInMemoryMetadata&, bool const&, std::__1::shared_ptr<DB::Context>&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, DB::MergeTreeData::MergingParams&, std::__1::unique_ptr<DB::MergeTreeSettings, std::__1::default_delete<DB::MergeTreeSettings>>&&, bool const&) build_docker/../contrib/libcxx/include/__memory/construct_at.h:38:50 (clickhouse+0x1d19025e) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #47 void std::__1::allocator_traits<std::__1::allocator<DB::StorageMergeTree>>::construct<DB::StorageMergeTree, DB::StorageID const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::StorageInMemoryMetadata&, bool const&, std::__1::shared_ptr<DB::Context>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, DB::MergeTreeData::MergingParams&, std::__1::unique_ptr<DB::MergeTreeSettings, std::__1::default_delete<DB::MergeTreeSettings>>, bool const&, void, void>(std::__1::allocator<DB::StorageMergeTree>&, DB::StorageMergeTree*, DB::StorageID const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::StorageInMemoryMetadata&, bool const&, std::__1::shared_ptr<DB::Context>&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, DB::MergeTreeData::MergingParams&, std::__1::unique_ptr<DB::MergeTreeSettings, std::__1::default_delete<DB::MergeTreeSettings>>&&, bool const&) build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:298:9 (clickhouse+0x1d19025e)
    #48 std::__1::__shared_ptr_emplace<DB::StorageMergeTree, std::__1::allocator<DB::StorageMergeTree>>::__shared_ptr_emplace<DB::StorageID const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::StorageInMemoryMetadata&, bool const&, std::__1::shared_ptr<DB::Context>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, DB::MergeTreeData::MergingParams&, std::__1::unique_ptr<DB::MergeTreeSettings, std::__1::default_delete<DB::MergeTreeSettings>>, bool const&>(std::__1::allocator<DB::StorageMergeTree>, DB::StorageID const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::StorageInMemoryMetadata&, bool const&, std::__1::shared_ptr<DB::Context>&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, DB::MergeTreeData::MergingParams&, std::__1::unique_ptr<DB::MergeTreeSettings, std::__1::default_delete<DB::MergeTreeSettings>>&&, bool const&) build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:293:9 (clickhouse+0x1d19025e)
    #49 std::__1::shared_ptr<DB::StorageMergeTree> std::__1::allocate_shared<DB::StorageMergeTree, std::__1::allocator<DB::StorageMergeTree>, DB::StorageID const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::StorageInMemoryMetadata&, bool const&, std::__1::shared_ptr<DB::Context>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, DB::MergeTreeData::MergingParams&, std::__1::unique_ptr<DB::MergeTreeSettings, std::__1::default_delete<DB::MergeTreeSettings>>, bool const&, void>(std::__1::allocator<DB::StorageMergeTree> const&, DB::StorageID const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::StorageInMemoryMetadata&, bool const&, std::__1::shared_ptr<DB::Context>&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, DB::MergeTreeData::MergingParams&, std::__1::unique_ptr<DB::MergeTreeSettings, std::__1::default_delete<DB::MergeTreeSettings>>&&, bool const&) build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:954:55 (clickhouse+0x1d19025e)
    #50 std::__1::shared_ptr<DB::StorageMergeTree> std::__1::make_shared<DB::StorageMergeTree, DB::StorageID const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::StorageInMemoryMetadata&, bool const&, std::__1::shared_ptr<DB::Context>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, DB::MergeTreeData::MergingParams&, std::__1::unique_ptr<DB::MergeTreeSettings, std::__1::default_delete<DB::MergeTreeSettings>>, bool const&, void>(DB::StorageID const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::StorageInMemoryMetadata&, bool const&, std::__1::shared_ptr<DB::Context>&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, DB::MergeTreeData::MergingParams&, std::__1::unique_ptr<DB::MergeTreeSettings, std::__1::default_delete<DB::MergeTreeSettings>>&&, bool const&) build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:963:12 (clickhouse+0x1d18d2c1) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #51 DB::create(DB::StorageFactory::Arguments const&) build_docker/../src/Storages/MergeTree/registerStorageMergeTree.cpp:701:16 (clickhouse+0x1d18d2c1)
    #52 decltype(static_cast<std::__1::shared_ptr<DB::IStorage> (*&>(fp)(static_cast<DB::StorageFactory::Arguments const&>(fp0))) std::__1::__invoke<std::__1::shared_ptr<DB::IStorage> (*&)(DB::StorageFactory::Arguments const&), DB::StorageFactory::Arguments const&>(std::__1::shared_ptr<DB::IStorage> (*&)(DB::StorageFactory::Arguments const&), DB::StorageFactory::Arguments const&) build_docker/../contrib/libcxx/include/type_traits:3640:23 (clickhouse+0x1a7f2842) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #53 std::__1::shared_ptr<DB::IStorage> std::__1::__invoke_void_return_wrapper<std::__1::shared_ptr<DB::IStorage>, false>::__call<std::__1::shared_ptr<DB::IStorage> (*&)(DB::StorageFactory::Arguments const&), DB::StorageFactory::Arguments const&>(std::__1::shared_ptr<DB::IStorage> (*&)(DB::StorageFactory::Arguments const&), DB::StorageFactory::Arguments const&) build_docker/../contrib/libcxx/include/__functional/invoke.h:30:16 (clickhouse+0x1a7f2842)
    #54 std::__1::__function::__default_alloc_func<std::__1::shared_ptr<DB::IStorage> (*)(DB::StorageFactory::Arguments const&), std::__1::shared_ptr<DB::IStorage> (DB::StorageFactory::Arguments const&)>::operator()(DB::StorageFactory::Arguments const&) build_docker/../contrib/libcxx/include/__functional/function.h:230:12 (clickhouse+0x1a7f2842)
    #55 std::__1::shared_ptr<DB::IStorage> std::__1::__function::__policy_invoker<std::__1::shared_ptr<DB::IStorage> (DB::StorageFactory::Arguments const&)>::__call_impl<std::__1::__function::__default_alloc_func<std::__1::shared_ptr<DB::IStorage> (*)(DB::StorageFactory::Arguments const&), std::__1::shared_ptr<DB::IStorage> (DB::StorageFactory::Arguments const&)>>(std::__1::__function::__policy_storage const*, DB::StorageFactory::Arguments const&) build_docker/../contrib/libcxx/include/__functional/function.h:711:16 (clickhouse+0x1a7f2842)
    #56 std::__1::__function::__policy_func<std::__1::shared_ptr<DB::IStorage> (DB::StorageFactory::Arguments const&)>::operator()(DB::StorageFactory::Arguments const&) const build_docker/../contrib/libcxx/include/__functional/function.h:843:16 (clickhouse+0x1c9bd7b0) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #57 std::__1::function<std::__1::shared_ptr<DB::IStorage> (DB::StorageFactory::Arguments const&)>::operator()(DB::StorageFactory::Arguments const&) const build_docker/../contrib/libcxx/include/__functional/function.h:1184:12 (clickhouse+0x1c9bd7b0)
    #58 DB::StorageFactory::get(DB::ASTCreateQuery const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context>, std::__1::shared_ptr<DB::Context>, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, bool) const build_docker/../src/Storages/StorageFactory.cpp:229:16 (clickhouse+0x1c9bd7b0)
    #59 DB::createTableFromAST(DB::ASTCreateQuery, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context>, bool) build_docker/../src/Databases/DatabaseOnDisk.cpp:102:36 (clickhouse+0x1afe1ede) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #60 DB::(anonymous namespace)::tryAttachTable(std::__1::shared_ptr<DB::Context>, DB::ASTCreateQuery const&, DB::DatabaseOrdinary&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, bool) build_docker/../src/Databases/DatabaseOrdinary.cpp:52:40 (clickhouse+0x1b0035f0) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #61 DB::DatabaseOrdinary::loadTableFromMetadata(std::__1::shared_ptr<DB::Context>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::QualifiedTableName const&, std::__1::shared_ptr<DB::IAST> const&, DB::LoadingStrictnessLevel) build_docker/../src/Databases/DatabaseOrdinary.cpp:249:5 (clickhouse+0x1b0035f0)
    #62 DB::TablesLoader::startLoadingIndependentTables(ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>&, unsigned long, std::__1::shared_ptr<DB::Context>)::$_1::operator()() const build_docker/../src/Databases/TablesLoader.cpp:256:45 (clickhouse+0x1b0474b6) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #63 decltype(static_cast<DB::TablesLoader::startLoadingIndependentTables(ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>&, unsigned long, std::__1::shared_ptr<DB::Context>)::$_1&>(fp)()) std::__1::__invoke<DB::TablesLoader::startLoadingIndependentTables(ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>&, unsigned long, std::__1::shared_ptr<DB::Context>)::$_1&>(DB::TablesLoader::startLoadingIndependentTables(ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>&, unsigned long, std::__1::shared_ptr<DB::Context>)::$_1&) build_docker/../contrib/libcxx/include/type_traits:3640:23 (clickhouse+0x1b0474b6)
    #64 void std::__1::__invoke_void_return_wrapper<void, true>::__call<DB::TablesLoader::startLoadingIndependentTables(ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>&, unsigned long, std::__1::shared_ptr<DB::Context>)::$_1&>(DB::TablesLoader::startLoadingIndependentTables(ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>&, unsigned long, std::__1::shared_ptr<DB::Context>)::$_1&) build_docker/../contrib/libcxx/include/__functional/invoke.h:61:9 (clickhouse+0x1b0474b6)
    #65 std::__1::__function::__default_alloc_func<DB::TablesLoader::startLoadingIndependentTables(ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>&, unsigned long, std::__1::shared_ptr<DB::Context>)::$_1, void ()>::operator()() build_docker/../contrib/libcxx/include/__functional/function.h:230:12 (clickhouse+0x1b0474b6)
    #66 void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<DB::TablesLoader::startLoadingIndependentTables(ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>&, unsigned long, std::__1::shared_ptr<DB::Context>)::$_1, void ()>>(std::__1::__function::__policy_storage const*) build_docker/../contrib/libcxx/include/__functional/function.h:711:16 (clickhouse+0x1b0474b6)
    #67 std::__1::__function::__policy_func<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:843:16 (clickhouse+0x13330a8e) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #68 std::__1::function<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:1184:12 (clickhouse+0x13330a8e)
    #69 ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>::worker(std::__1::__list_iterator<ThreadFromGlobalPoolImpl<false>, void*>) build_docker/../src/Common/ThreadPool.cpp:294:17 (clickhouse+0x13330a8e)
    #70 void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()::operator()() const build_docker/../src/Common/ThreadPool.cpp:144:73 (clickhouse+0x1333524c) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #71 decltype(static_cast<void>(fp)()) std::__1::__invoke_constexpr<void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()&>(void&&) build_docker/../contrib/libcxx/include/type_traits:3648:23 (clickhouse+0x1333524c)
    #72 decltype(auto) std::__1::__apply_tuple_impl<void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()&, std::__1::tuple<>&>(void&&, std::__1::tuple<>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/tuple:1595:1 (clickhouse+0x1333524c)
    #73 decltype(auto) std::__1::apply<void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()&, std::__1::tuple<>&>(void&&, std::__1::tuple<>&) build_docker/../contrib/libcxx/include/tuple:1604:1 (clickhouse+0x1333524c)
    #74 ThreadFromGlobalPoolImpl<false>::ThreadFromGlobalPoolImpl<void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&)::'lambda'()::operator()() build_docker/../src/Common/ThreadPool.h:193:13 (clickhouse+0x1333524c)
    #75 decltype(static_cast<void>(fp)()) std::__1::__invoke<ThreadFromGlobalPoolImpl<false>::ThreadFromGlobalPoolImpl<void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&)::'lambda'()&>(void&&) build_docker/../contrib/libcxx/include/type_traits:3640:23 (clickhouse+0x1333524c)
    #76 void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<false>::ThreadFromGlobalPoolImpl<void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<false>::ThreadFromGlobalPoolImpl<void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&)::'lambda'()&) build_docker/../contrib/libcxx/include/__functional/invoke.h:61:9 (clickhouse+0x133351c1) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #77 std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<false>::ThreadFromGlobalPoolImpl<void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&)::'lambda'(), void ()>::operator()() build_docker/../contrib/libcxx/include/__functional/function.h:230:12 (clickhouse+0x133351c1)
    #78 void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<false>::ThreadFromGlobalPoolImpl<void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&)::'lambda'(), void ()>>(std::__1::__function::__policy_storage const*) build_docker/../contrib/libcxx/include/__functional/function.h:711:16 (clickhouse+0x133351c1)
    #79 std::__1::__function::__policy_func<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:843:16 (clickhouse+0x1332dece) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #80 std::__1::function<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:1184:12 (clickhouse+0x1332dece)
    #81 ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) build_docker/../src/Common/ThreadPool.cpp:294:17 (clickhouse+0x1332dece)
    #82 void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()::operator()() const build_docker/../src/Common/ThreadPool.cpp:144:73 (clickhouse+0x133324d1) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960)
    #83 decltype(static_cast<void>(fp)()) std::__1::__invoke<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&) build_docker/../contrib/libcxx/include/type_traits:3640:23 (clickhouse+0x133324d1)
    #84 void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/thread:282:5 (clickhouse+0x133324d1)
    #85 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>>(void*) build_docker/../contrib/libcxx/include/thread:293:5 (clickhouse+0x133324d1)

SUMMARY: ThreadSanitizer: thread leak (/usr/bin/clickhouse+0xb8e7f7d) (BuildId: 9625062ad8e3c31d12f4fc1aea1ec35882c68960) in pthread_create

To Reproduce Run ClickHouse stress tests under TSan. They are run automatically for every commit, for example: https://s3.amazonaws.com/clickhouse-test-reports/42003/8eb751fbe551aeb8a5af94c0c7e7b4960865645a/stress_test__tsan_.html

Expected behavior It does not complain.

Screenshots Screenshot_20221024_005539

Setup (please complete the following information):

Additional context Add any other context about the problem here.

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

qoega commented 2 years ago

More occurencies

azat commented 2 years ago

This is a false-positive warning, the code looks OK, the problem was in unclean shutdown.