Skip to content

Segmentation fault in libaws-cpp-sdk-core.so on creation of Aws::Client::ClientConfiguration  #1925

Closed
@gi12345

Description

@gi12345

Describe the bug

Segmentation fault in libaws-cpp-sdk-core.so on creation of Aws::Client::ClientConfiguration.

Stack trace and reproduction steps see below.

Expected Behavior

No segmentation fault

Current Behavior

Crash Trace:

03/05/2022 15:57:58.394 [WARNING]Catch dump signal [11]Segmentation fault
Obtained 10 stack frames:
[0]./VIGILCameraServer(_Z4dumpi+0x28) [0x4e4cb8]
[1]linux-vdso.so.1(__kernel_rt_sigreturn+0) [0x7f89faf5e4]
[2]/mnt/plugin/vigilcamera/lib/libaws-cpp-sdk-core.so(_ZN3Aws5Utils9Threading16ReaderWriterLock10LockReaderEv+0) [0x7f897f14a8]
[3]/mnt/plugin/vigilcamera/lib/libaws-cpp-sdk-core.so(_ZNK3Aws6Config32ConfigAndCredentialsCacheManager9GetConfigERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_+0x34) [0x7f898017d4]
[4]/mnt/plugin/vigilcamera/lib/libaws-cpp-sdk-core.so(_ZN3Aws6Config20GetCachedConfigValueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x58) [0x7f89801958]
[5]/mnt/plugin/vigilcamera/lib/libaws-cpp-sdk-core.so(_ZN3Aws6Client38setLegacyClientConfigurationParametersERNS0_19ClientConfigurationE+0x2a0) [0x7f89801c40]
[6]/mnt/plugin/vigilcamera/lib/libaws-cpp-sdk-core.so(_ZN3Aws6Client19ClientConfigurationC1Ev+0x114) [0x7f89802204]
[7]./VIGILCameraServer(_ZN15CMotionUploaderC1Ev+0x44) [0x59713c]
[8]./VIGILCameraServer(_ZN18CVIGILCameraServer12CreateServerEv+0xb7c) [0x4e3364]
[9]./VIGILCameraServer(_ZN18CVIGILCameraServer10InitializeEv+0x64) [0x4e2134]

Reproduction Steps

---- MotionUploader.h file ---------------------

using namespace std;
class CMotionUploader : public Runable
{
public:
	CMotionUploader();
	~CMotionUploader();

public:
	virtual bool run();

private:
    Aws::SDKOptions m_awsSDKoptions;
    Aws::Client::ClientConfiguration m_cfg;
}

---- MotionUploader.cpp file --------------------

CMotionUploader::CMotionUploader()
{
    Aws::InitAPI(m_awsSDKoptions);
}
main()
{
CMotionUploader*    m_pMotionUploader;
m_pMotionUploader = new CMotionUploader();
}

Possible Solution

No response

Additional Information/Context

This code has been working before running daily for a couple of years. The AWS SDK used was about 2018.
The bug is most likely triggered by a design change inside AWS-SDK.
See also likely similar issue, but not for C++: Segmentation fault at Aws::Utils::Threading::ReaderWriterLock::LockReader () #1716

AWS CPP SDK version used

AWS-SDK-C++ version: new checkout and default build "S3-only" on April 18, 2022 OS: Built on Ubuntu-20 AARM64, run on AARM64-device

Compiler and Version used

Ubuntu20-gcc

Operating System and version

Ubuntu-20 AARM64

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.closed-for-stalenessneeds-reproductionThis issue needs reproduction.p2This is a standard priority issueresponse-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions