Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seg Fault during a PutRecordRequest when KinesisClient created with AWSCredentials. #221

Closed
micelic opened this issue Jun 27, 2016 · 5 comments
Labels
help wanted We are asking the community to submit a PR to resolve this issue.

Comments

@micelic
Copy link

micelic commented Jun 27, 2016

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff6787520 (LWP 15159)]
0x00007ffff7d58495 in Aws::Utils::Crypto::Sha256OpenSSLImpl::Calculate(std::basic_istream<char, std::char_traits >&) () from /usr/local/lib/libaws-cpp-sdk-core.so
(gdb) bt
#0 0x00007ffff7d58495 in Aws::Utils::Crypto::Sha256OpenSSLImpl::Calculate(std::basic_istream<char, std::char_traits >&) () from /usr/local/lib/libaws-cpp-sdk-core.so
#1 0x00007ffff7d3b507 in Aws::Utils::Crypto::Sha256::Calculate(std::basic_istream<char, std::char_traits >&) () from /usr/local/lib/libaws-cpp-sdk-core.so
#2 0x00007ffff7d2889c in Aws::Client::AWSAuthV4Signer::ComputePayloadHash(Aws::Http::HttpRequest&) const () from /usr/local/lib/libaws-cpp-sdk-core.so
#3 0x00007ffff7d26587 in Aws::Client::AWSAuthV4Signer::SignRequest(Aws::Http::HttpRequest&) const () from /usr/local/lib/libaws-cpp-sdk-core.so
#4 0x00007ffff7d2d0d3 in Aws::Client::AWSClient::AttemptOneRequest(std::basic_string<char, std::char_traits, Aws::Allocator > const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const () from /usr/local/lib/libaws-cpp-sdk-core.so
#5 0x00007ffff7d2ca80 in Aws::Client::AWSClient::AttemptExhaustively(std::basic_string<char, std::char_traits, Aws::Allocator > const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const () from /usr/local/lib/libaws-cpp-sdk-core.so
#6 0x00007ffff7d2e282 in Aws::Client::AWSJsonClient::MakeRequest(std::basic_string<char, std::char_traits, Aws::Allocator > const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const () from /usr/local/lib/libaws-cpp-sdk-core.so
#7 0x00007ffff78a74ac in Aws::Kinesis::KinesisClient::PutRecord(Aws::Kinesis::Model::PutRecordRequest const&) const () from /usr/local/lib/libaws-cpp-sdk-kinesis.so

@micelic
Copy link
Author

micelic commented Jun 27, 2016

clientPtr(Aws::New("AFT_Client",AWSCredentials(ACCESS_KEY_ID,SECRET_ACCESS_KEY)) )

In class initializer. clientPtr is KinesisClient* type. Does anyone have any idea ? This initializer works fine but later one when used to do a put record seg fault. I make this call in the main... SDKOptions options;
Aws::InitAPI(options);

@micelic
Copy link
Author

micelic commented Jun 27, 2016

If I just use default call

clientPtr(Aws::New("AFT_Client" ))

Crashes in a different spot

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff6787520 (LWP 15551)]
0x0000003ceae261a9 in ?? () from /usr/lib64/libcurl.so.4
Missing separate debuginfos, use: debuginfo-install cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64 glibc-2.12-1.166.el6_7.7.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-42z1.el6_7.x86_64 libcom_err-1.41.12-22.el6.x86_64 libcurl-7.19.7-52.el6.x86_64 libgcc-4.4.7-17.el6.x86_64 libidn-1.18-2.el6.x86_64 libselinux-2.0.94-5.8.el6.x86_64 libssh2-1.4.2-2.el6_7.1.x86_64 libstdc++-4.4.7-17.el6.x86_64 nspr-4.11.0-0.1.el6_7.x86_64 nss-3.21.0-0.3.el6_7.x86_64 nss-softokn-freebl-3.14.3-23.el6_7.x86_64 nss-util-3.21.0-0.3.el6_7.x86_64 openldap-2.4.40-7.el6_7.x86_64 openssl-1.0.1e-42.el6_7.4.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0 0x0000003ceae261a9 in ?? () from /usr/lib64/libcurl.so.4
#1 0x0000003ceae2785f in curl_maprintf () from /usr/lib64/libcurl.so.4
#2 0x0000003ceae0f60f in Curl_resolv () from /usr/lib64/libcurl.so.4
#3 0x0000003ceae0f894 in Curl_resolv_timeout () from /usr/lib64/libcurl.so.4
#4 0x0000003ceae2443f in ?? () from /usr/lib64/libcurl.so.4
#5 0x0000003ceae245b3 in Curl_connect () from /usr/lib64/libcurl.so.4
#6 0x0000003ceae2c8c0 in Curl_perform () from /usr/lib64/libcurl.so.4
#7 0x00007ffff7d53f0a in Aws::Http::CurlHttpClient::MakeRequest(Aws::Http::HttpRequest&, Aws::Utils::RateLimits::RateLimiterInterface_, Aws::Utils::RateLimits::RateLimiterInterface_) const ()
from /usr/local/lib/libaws-cpp-sdk-core.so
#8 0x00007ffff7d32a05 in Aws::Internal::EC2MetadataClient::GetResource(char const*) const () from /usr/local/lib/libaws-cpp-sdk-core.so
#9 0x00007ffff7d324d4 in Aws::Internal::EC2MetadataClient::GetDefaultCredentials() const () from /usr/local/lib/libaws-cpp-sdk-core.so
#10 0x00007ffff7d2134d in Aws::Auth::InstanceProfileCredentialsProvider::RefreshIfExpired() () from /usr/local/lib/libaws-cpp-sdk-core.so
#11 0x00007ffff7d21194 in Aws::Auth::InstanceProfileCredentialsProvider::GetAWSCredentials() () from /usr/local/lib/libaws-cpp-sdk-core.so
#12 0x00007ffff7d1ca8b in Aws::Auth::AWSCredentialsProviderChain::GetAWSCredentials() () from /usr/local/lib/libaws-cpp-sdk-core.so
#13 0x00007ffff7d2645c in Aws::Client::AWSAuthV4Signer::SignRequest(Aws::Http::HttpRequest&) const () from /usr/local/lib/libaws-cpp-sdk-core.so
#14 0x00007ffff7d2d0d3 in Aws::Client::AWSClient::AttemptOneRequest(std::basic_string<char, std::char_traits, Aws::Allocator > const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const () from /usr/local/lib/libaws-cpp-sdk-core.so
#15 0x00007ffff7d2ca80 in Aws::Client::AWSClient::AttemptExhaustively(std::basic_string<char, std::char_traits, Aws::Allocator > const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const () from /usr/local/lib/libaws-cpp-sdk-core.so
#16 0x00007ffff7d2e282 in Aws::Client::AWSJsonClient::MakeRequest(std::basic_string<char, std::char_traits, Aws::Allocator > const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const () from /usr/local/lib/libaws-cpp-sdk-core.so
#17 0x00007ffff78a74ac in Aws::Kinesis::KinesisClient::PutRecord(Aws::Kinesis::Model::PutRecordRequest const&) const () from /usr/local/lib/libaws-cpp-sdk-kinesis.so

@JonathanHenson
Copy link
Contributor

Since this is after an upgrade to 0.12.x, did you happen to remember to do the following from the upgrade notes?

https://github.com/aws/aws-sdk-cpp#upgrading-notes
https://aws.amazon.com/blogs/developer/aws-sdk-for-c-simplified-configuration-and-initialization/

@micelic
Copy link
Author

micelic commented Jun 27, 2016

Yes.

I have followed all the upload notes.

I am downloaded the latest build to see what happens

From: Jonathan M. Henson [mailto:notifications@github.com]
Sent: Monday, June 27, 2016 9:19 AM
To: aws/aws-sdk-cpp
Cc: Miceli, Carlo J.; Author
Subject: Re: [aws/aws-sdk-cpp] Seg Fault during a PutRecordRequest when KinesisClient created with AWSCredentials. (#221)

Since this is after an upgrade to 0.12.x, did you happen to remember to do the following from the upgrade notes?

https://github.com/aws/aws-sdk-cpp#upgrading-notes
https://aws.amazon.com/blogs/developer/aws-sdk-for-c-simplified-configuration-and-initialization/


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/221#issuecomment-228742736, or mute the threadhttps://github.com/notifications/unsubscribe/AMB5q876qIwopaPBdWD95IfBS527FLKZks5qP83UgaJpZM4I_DGW.

@JonathanHenson
Copy link
Contributor

It turned out that this was caused by the stack size being set too low

@justnance justnance added help wanted We are asking the community to submit a PR to resolve this issue. and removed help wanted labels Apr 19, 2019
cobookman pushed a commit to cobookman/aws-sdk-cpp that referenced this issue Jan 17, 2022
* Customer Credential provider
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We are asking the community to submit a PR to resolve this issue.
Projects
None yet
Development

No branches or pull requests

3 participants