aws / aws-sdk-cpp

AWS SDK for C++
Apache License 2.0
1.94k stars 1.05k forks source link

AWSClient::AttemptOneRequest nullptr access #2138

Open pdc-tstream opened 1 year ago

pdc-tstream commented 1 year ago

I've run into the closed issue #2109

Segmentation fault with Transcribe Streaming #2109

As I cannot re-open I think the correct thing to do is create a new issue.

Sorry if that's not the way...

Anyway:

Crash due to nullptr access in AWSClient::AttemptOneRequest auto signer = GetSignerByName(signerName); returns nullptr.

I looked over the new example and it seems to be the same structure i'm using.

OK, I believe I've tracked it back.

It works on 1.9.334, and fails on 1.9.335

I think this is the change that causes the problem: Looking at TranscribeStreamingServiceClient::TranscribeStreamingServiceClient:

The old version had

Aws::MakeShared<Aws::Auth::DefaultAuthSignerProvider>(...)

The new version has

Aws::MakeShared<AWSAuthV4Signer>(...)

The same for all 3 CTORs

So as part of re-formatting the CTORs, they were changed slightly.

I am going to run with 1.9.334 for my current work.

Let me know if you have any questions.

Cheers

Originally posted by @pdc-tstream in https://github.com/aws/aws-sdk-cpp/issues/2109#issuecomment-1276240544

jmklix commented 1 year ago

You said that you seem to using the same structure as the new transcribe streaming example. Can you confirm that you see this error when running the exact same sample or can you provide a minimal code sample that does reproduce it?

pdc-tstream commented 1 year ago

I have reproduced with the transcribe streaming example.

I am building against aws static libs if that makes a difference.

I am enclosing a zip file containing the various bits to build a docker container (which builds aws into /musl) and then CMakeLists.txt etc to build the example file.

aws-debug.zip

pdc-tstream commented 1 year ago

If you change the docker file to do --branch 1.9.334 instead of --branch 1.9.335 then it will work (if you install credentials)

jmklix commented 1 week ago

Can you update to the latest version of this sdk and see if you are still running into a nullptr access? We have updated the transcribe streaming since this issue was opened.