aws-sdk-cpp: Corrupted stack with gflags detected in WinHttpConnectionPoolMgr::DoCloseHandle

What platform/OS are you using?

Windows

What compiler are you using? what version?

Visual Studio 2017 Version 15.3.4

What’s your CMake arguments?

'BUILD_ONLY': 'kinesis;s3;transfer;dynamodb',
'ENABLE_OPENSSL_ENCRYPTION': 'OFF',
'CURL_INCLUDE_DIR': '...'
'CURL_LIBRARY': '...'

I use version 1.1.44

Can you provide a TRACE level log? (sanitize any sensitive information)

Call Stack

 winhttp.dll!HANDLE_OBJECT::IsValid(enum HINTERNET_HANDLE_TYPE)	Unknown	Non-user code. Symbols loaded.
winhttp.dll!WinHttpCloseHandle()	Unknown	Non-user code. Symbols loaded.
>	aws-cpp-sdk-core.dll!Aws::Http::WinHttpConnectionPoolMgr::DoCloseHandle(void * handle) Line 40	C++	Symbols loaded.
aws-cpp-sdk-core.dll!Aws::Http::WinSyncHttpClient::~WinSyncHttpClient() Line 44	C++	Symbols loaded.
aws-cpp-sdk-core.dll!Aws::Http::WinHttpSyncHttpClient::~WinHttpSyncHttpClient() Line 108	C++	Symbols loaded.
[External Code]		Annotated Frame
aws-cpp-sdk-core.dll!std::_Ref_count_obj_alloc<Aws::Http::WinHttpSyncHttpClient,Aws::Allocator<Aws::Http::WinHttpSyncHttpClient> >::_Destroy() Line 1759	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Ref_count_base::_Decref() Line 906	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Ptr_base<Aws::Http::HttpClient>::_Decref() Line 1146	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::shared_ptr<Aws::Http::HttpClient>::~shared_ptr<Aws::Http::HttpClient>() Line 1384	C++	Symbols loaded.
aws-cpp-sdk-core.dll!Aws::Internal::AWSHttpResourceClient::~AWSHttpResourceClient() Line 52	C++	Symbols loaded.
aws-cpp-sdk-core.dll!Aws::Internal::EC2MetadataClient::~EC2MetadataClient() Line 94	C++	Symbols loaded.
[External Code]		Annotated Frame
aws-cpp-sdk-core.dll!std::_Ref_count_obj_alloc<Aws::Internal::EC2MetadataClient,Aws::Allocator<Aws::Internal::EC2MetadataClient> >::_Destroy() Line 1759	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Ref_count_base::_Decref() Line 906	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Ptr_base<Aws::Internal::EC2MetadataClient>::_Decref() Line 1146	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::shared_ptr<Aws::Internal::EC2MetadataClient>::~shared_ptr<Aws::Internal::EC2MetadataClient>() Line 1384	C++	Symbols loaded.
aws-cpp-sdk-core.dll!Aws::Config::EC2InstanceProfileConfigLoader::~EC2InstanceProfileConfigLoader() Line 157	C++	Symbols loaded.
[External Code]		Annotated Frame
aws-cpp-sdk-core.dll!std::_Ref_count_obj_alloc<Aws::Config::EC2InstanceProfileConfigLoader,Aws::Allocator<Aws::Config::EC2InstanceProfileConfigLoader> >::_Destroy() Line 1759	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Ref_count_base::_Decref() Line 906	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Ptr_base<Aws::Config::AWSProfileConfigLoader>::_Decref() Line 1146	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::shared_ptr<Aws::Config::AWSProfileConfigLoader>::~shared_ptr<Aws::Config::AWSProfileConfigLoader>() Line 1384	C++	Symbols loaded.
[External Code]		Annotated Frame
aws-cpp-sdk-core.dll!std::_Ref_count_obj_alloc<Aws::Auth::InstanceProfileCredentialsProvider,Aws::Allocator<Aws::Auth::InstanceProfileCredentialsProvider> >::_Destroy() Line 1759	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Ref_count_base::_Decref() Line 906	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Ptr_base<Aws::Auth::AWSCredentialsProvider>::_Decref() Line 1146	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::shared_ptr<Aws::Auth::AWSCredentialsProvider>::~shared_ptr<Aws::Auth::AWSCredentialsProvider>() Line 1384	C++	Symbols loaded.
[External Code]		Annotated Frame
aws-cpp-sdk-core.dll!std::allocator<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> >::destroy<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> >(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> * const _Ptr) Line 966	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Normal_allocator_traits<Aws::Allocator<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> > >::_Destroy1<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> >(Aws::Allocator<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> > & _Al, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> * _Ptr, std::integral_constant<bool,0> __formal) Line 771	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Normal_allocator_traits<Aws::Allocator<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> > >::destroy<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> >(Aws::Allocator<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> > & _Al, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> * _Ptr) Line 777	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Destroy_range1<Aws::Allocator<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> > >(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> * _First, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> * _Last, Aws::Allocator<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> > & _Al, std::integral_constant<bool,0> __formal) Line 1095	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Destroy_range<Aws::Allocator<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> > >(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> * _First, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> * _Last, Aws::Allocator<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> > & _Al) Line 1119	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::vector<std::shared_ptr<Aws::Auth::AWSCredentialsProvider>,Aws::Allocator<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> > >::_Destroy(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> * _First, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> * _Last) Line 1941	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::vector<std::shared_ptr<Aws::Auth::AWSCredentialsProvider>,Aws::Allocator<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> > >::_Tidy() Line 2007	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::vector<std::shared_ptr<Aws::Auth::AWSCredentialsProvider>,Aws::Allocator<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> > >::~vector<std::shared_ptr<Aws::Auth::AWSCredentialsProvider>,Aws::Allocator<std::shared_ptr<Aws::Auth::AWSCredentialsProvider> > >() Line 921	C++	Symbols loaded.
aws-cpp-sdk-core.dll!Aws::Auth::AWSCredentialsProviderChain::~AWSCredentialsProviderChain() Line 55	C++	Symbols loaded.
[External Code]		Annotated Frame
aws-cpp-sdk-kinesis.dll!std::_Ref_count_obj_alloc<Aws::Auth::DefaultAWSCredentialsProviderChain,Aws::Allocator<Aws::Auth::DefaultAWSCredentialsProviderChain> >::_Destroy() Line 1759	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Ref_count_base::_Decref() Line 906	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Ptr_base<Aws::Auth::AWSCredentialsProvider>::_Decref() Line 1146	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::shared_ptr<Aws::Auth::AWSCredentialsProvider>::~shared_ptr<Aws::Auth::AWSCredentialsProvider>() Line 1384	C++	Symbols loaded.
aws-cpp-sdk-core.dll!Aws::Client::AWSAuthV4Signer::~AWSAuthV4Signer() Line 152	C++	Symbols loaded.
[External Code]		Annotated Frame
aws-cpp-sdk-kinesis.dll!std::_Ref_count_obj_alloc<Aws::Client::AWSAuthV4Signer,Aws::Allocator<Aws::Client::AWSAuthV4Signer> >::_Destroy() Line 1759	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Ref_count_base::_Decref() Line 906	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Ptr_base<Aws::Client::AWSAuthSigner>::_Decref() Line 1146	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::shared_ptr<Aws::Client::AWSAuthSigner>::~shared_ptr<Aws::Client::AWSAuthSigner>() Line 1384	C++	Symbols loaded.
[External Code]		Annotated Frame
aws-cpp-sdk-core.dll!std::allocator<std::_Tree_node<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> >,void * __ptr64> >::destroy<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> > >(std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> > * const _Ptr) Line 966	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Normal_allocator_traits<Aws::Allocator<std::_Tree_node<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> >,void * __ptr64> > >::_Destroy1<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> > >(Aws::Allocator<std::_Tree_node<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> >,void *> > & _Al, std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> > * _Ptr, std::integral_constant<bool,0> __formal) Line 771	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Normal_allocator_traits<Aws::Allocator<std::_Tree_node<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> >,void * __ptr64> > >::destroy<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> > >(Aws::Allocator<std::_Tree_node<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> >,void *> > & _Al, std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> > * _Ptr) Line 777	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> >,std::shared_ptr<Aws::Client::AWSAuthSigner>,std::less<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > >,Aws::Allocator<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> > >,0> >::_Erase(std::_Tree_node<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> >,void *> * _Rootnode) Line 1998	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> >,std::shared_ptr<Aws::Client::AWSAuthSigner>,std::less<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > >,Aws::Allocator<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> > >,0> >::clear() Line 1391	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> >,std::shared_ptr<Aws::Client::AWSAuthSigner>,std::less<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > >,Aws::Allocator<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> > >,0> >::erase(std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> > > > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> > > > > _Last) Line 1367	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> >,std::shared_ptr<Aws::Client::AWSAuthSigner>,std::less<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > >,Aws::Allocator<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> > >,0> >::_Tidy() Line 2154	C++	Symbols loaded.
aws-cpp-sdk-core.dll!std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> >,std::shared_ptr<Aws::Client::AWSAuthSigner>,std::less<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > >,Aws::Allocator<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> > >,0> >::~_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> >,std::shared_ptr<Aws::Client::AWSAuthSigner>,std::less<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > >,Aws::Allocator<std::pair<std::basic_string<char,std::char_traits<char>,Aws::Allocator<char> > const ,std::shared_ptr<Aws::Client::AWSAuthSigner> > >,0> >() Line 974	C++	Symbols loaded.
[External Code]		Annotated Frame
aws-cpp-sdk-core.dll!Aws::Client::AWSClient::~AWSClient() Line 150	C++	Symbols loaded.
aws-cpp-sdk-core.dll!Aws::Client::AWSJsonClient::~AWSJsonClient() Line 295	C++	Symbols loaded.
aws-cpp-sdk-kinesis.dll!Aws::Kinesis::KinesisClient::~KinesisClient() Line 97	C++	Symbols loaded.
utils_test.exe!construction_destruction_test_for_gflags_plain_Test::TestBody() Line 13	C++	Symbols loaded.
utils_test.exe!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void>(testing::Test * object, void(testing::Test::*)() method, const char * location) Line 2385	C++	Symbols loaded.
utils_test.exe!testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void>(testing::Test * object, void(testing::Test::*)() method, const char * location) Line 2436	C++	Symbols loaded.
utils_test.exe!testing::Test::Run() Line 2479	C++	Symbols loaded.
utils_test.exe!testing::TestInfo::Run() Line 2658	C++	Symbols loaded.
utils_test.exe!testing::TestCase::Run() Line 2773	C++	Symbols loaded.
utils_test.exe!testing::internal::UnitTestImpl::RunAllTests() Line 4678	C++	Symbols loaded.
utils_test.exe!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>(testing::internal::UnitTestImpl * object, bool(testing::internal::UnitTestImpl::*)() method, const char * location) Line 2385	C++	Symbols loaded.
utils_test.exe!testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>(testing::internal::UnitTestImpl * object, bool(testing::internal::UnitTestImpl::*)() method, const char * location) Line 2436	C++	Symbols loaded.
utils_test.exe!testing::UnitTest::Run() Line 4285	C++	Symbols loaded.
utils_test.exe!RUN_ALL_TESTS() Line 2238	C++	Symbols loaded.
utils_test.exe!main(int ac, char * * av) Line 7	C++	Symbols loaded.
[External Code]		Annotated Frame

When I enable gflags (global flags editor) in windows and I run the following unit test I get an access violation in DoCloseHandle().

TEST(construction_destruction, test_for_gflags_plain)
{
    Aws::SDKOptions options;
    Aws::InitAPI(options);
    Aws::Kinesis::KinesisClient client;
    Aws::ShutdownAPI(options);
}

image

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 21 (12 by maintainers)

Most upvoted comments

I created a new pull request #763.