aws/aws-sdk-cpp

Error Init hash

atharvapaladin opened this issue · 8 comments

Describe the bug

While initializing AWS API in C++ code I get this error
"s2n_init() failed: 335544335 (error initializing hash)
Fatal error condition occurred in /home/ubuntu/aws-sdk-cpp/crt/aws-crt-cpp/crt/aws-c-io/source/s2n/s2n_tls_channel_handler.c:203: 0 && "s2n_init() failed"
Exiting Application
################################################################################
Stack trace:
################################################################################
"

Expected Behavior

Initialize AWS API and start S3 bucket upload

Current Behavior

git

Reproduction Steps

Initailize AWSAPI for uploading to S3 bucket

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.11

Compiler and Version used

gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0

Operating System and version

Ubuntu 20.04

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

jmklix commented

How are you trying to initialize this sdk? You need to make sure that you are making sdk calls within brackets {}:

    Aws::SDKOptions options;
    Aws::InitAPI(options);
    {
        //sdk calls here
    }
    Aws::ShutdownAPI(options);

You can also find a complete example for how to use put_object here.

If that doesn't help you please provide a minimal code sample that reproduces the error you are seeing.

Trying a few things on my end based on your response. Thank you. I'll make sure to get back to you soon if this works for us. This is all we do during init, and it gives the error. Error is stemming from this call Aws::InitAPI(options);

image
image

Hi @atharvapaladin ,

It is quite complicated for us to triage this issue.

Could you please provide full reproduction steps, including:

  • OS (provided) and any particular config/customization on the OS running;
  • Host type (cpu type / arch);
  • SDK version used and how you have built it (cmake configure and cmake build/install commands used);

Another option would be to simply ask you to debug step by step the s2n_init function... The function is not that long and frankly speaking it would be much easier to get to the root cause.

Best regards,
Sergey

Will try the option where we'll debug the s2n_init function. Thanks for the tip. Will post what we find soon.

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.