Closed
Description
Describe the bug
Hi, I am using s3crtclient to test getObjectAsync performance, but seems core dump occurs when the initialization of s3crtclient.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
Initialization succeed.
Current Behavior
core dump
Reproduction Steps
A simple reproduction step
int main(int argc, char* argv[]) {
// Initialize AWS SDK
Aws::SDKOptions options;
options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Info;
options.loggingOptions.logger_create_fn = [] {
return std::make_shared<Aws::Utils::Logging::DefaultLogSystem>(
Aws::Utils::Logging::LogLevel::Info, "performance_test");
};
Aws::InitAPI(options);
try {
std::cout << "AWS SDK C++ S3 Async Performance Test" << std::endl;
std::cout << "======================================" << std::endl;
Aws::S3Crt::ClientConfiguration clientConfig;
clientConfig.region = "us-west-2";
clientConfig.throughputTargetGbps = 10.0; // Set high throughput target
Aws::S3Crt::S3CrtClient s3CrtClient(clientConfig); // fail on initialization
} catch (const std::exception& e) {
std::cerr << "Error: " << e.what() << std::endl;
}
// Cleanup AWS SDK
Aws::ShutdownAPI(options);
return 0;
}
And the core dump shows fail on tls_conncection
(gdb) bt
#0 0x00005f925235e69b in aws_atomic_fetch_sub_explicit (var=0x7e804f220850, n=1, order=aws_memory_order_seq_cst)
at /home/ubuntu/.conan/data/aws-c-common/0.8.2/_/_/build/8195a35861d31648ad56bd0bc2c72f28f18aa363/src/include/aws/common/atomics_gnu.inl:174
#1 0x00005f925235e5c9 in aws_atomic_fetch_sub (var=0x7e804f220850, n=1)
at /home/ubuntu/.conan/data/aws-c-common/0.8.2/_/_/build/8195a35861d31648ad56bd0bc2c72f28f18aa363/src/include/aws/common/atomics.inl:101
#2 0x00005f925235e75e in aws_ref_count_release (ref_count=0x7e804f220850)
at /home/ubuntu/.conan/data/aws-c-common/0.8.2/_/_/build/8195a35861d31648ad56bd0bc2c72f28f18aa363/src/source/ref_count.c:26
#3 0x00005f9252169809 in aws_tls_ctx_release (ctx=0x7e804f220840)
at /home/ubuntu/.conan/data/aws-c-io/0.10.20/_/_/build/58786ffa3d53ee64ae3a2ad335880d076e925582/src/source/tls_channel_handler.c:739
#4 0x00005f92521694b9 in aws_tls_connection_options_clean_up (connection_options=0x7ffeff1b61a0)
at /home/ubuntu/.conan/data/aws-c-io/0.10.20/_/_/build/58786ffa3d53ee64ae3a2ad335880d076e925582/src/source/tls_channel_handler.c:546
#5 0x00005f9252169397 in aws_tls_connection_options_copy (to=0x7ffeff1b61a0, from=0x5f9253cee060)
at /home/ubuntu/.conan/data/aws-c-io/0.10.20/_/_/build/58786ffa3d53ee64ae3a2ad335880d076e925582/src/source/tls_channel_handler.c:518
#6 0x00005f9251d69a9d in Aws::S3Crt::S3CrtClient::init (this=0x7ffeff1b68b0, config=..., credentials=0x0)
at /home/ubuntu/.conan/data/aws-sdk-cpp/1.9.234/_/_/build/2a9d00df7caf4d987be5474c4bd9fc846a512ccc/src/aws-cpp-sdk-s3-crt/source/S3CrtClient.cpp:235
Possible Solution
No response
Additional Information/Context
I am using conan to manage the aws-sdk-cpp dependency.
AWS CPP SDK version used
1.9.234
Compiler and Version used
gcc-12
Operating System and version
ubuntu 22.04