aws-sdk-cpp
aws-sdk-cpp copied to clipboard
Memory Leak detected by asan in Aws::InitAPI
asan detects a memory leak in Aws::InitAPI
Direct leak of 336 byte(s) in 2 object(s) allocated from:
#0 0x7f3be3804bcf in __interceptor_malloc /gcc-11.1.0/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x7f3bdd8bc02f in CRYPTO_malloc crypto/mem.c:222
#2 0x7f3bdd8bc062 in CRYPTO_zalloc crypto/mem.c:230
#3 0x7f3bdd8a58ad in EVP_CIPHER_CTX_new crypto/evp/evp_enc.c:43
#4 0x7f3bdfaf2532 in s2n_drbg_instantiate (/usr/local/lib64/libaws-cpp-sdk-core.so+0x1bc532)
Indirect leak of 528 byte(s) in 2 object(s) allocated from:
#0 0x7f3be3804bcf in __interceptor_malloc /gcc-11.1.0/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x7f3bdd8bc02f in CRYPTO_malloc crypto/mem.c:222
#2 0x7f3bdd8bc062 in CRYPTO_zalloc crypto/mem.c:230
#3 0x7f3bdd8a5b10 in EVP_CipherInit_ex crypto/evp/evp_enc.c:129
#4 0x7f3bdd8a602c in EVP_EncryptInit_ex crypto/evp/evp_enc.c:245
#5 0x7f3bdfaf2767 in s2n_drbg_instantiate (/usr/local/lib64/libaws-cpp-sdk-core.so+0x1bc767)
SDK version number
1.9.88
Platform/OS/Hardware/Device
$ cmake .. -DBUILD_ONLY:STRING="s3" -DCMAKE_BUILD_TYPE:STRING=Release -DOPENSSL_ROOT_DIR:PATH=/usr/local/
-- TARGET_ARCH not specified; inferring host OS to be platform compilation target
-- Building AWS libraries as shared objects
-- Generating linux build config
-- Building project version: 1.9.88
-- The CXX compiler identification is GNU 11.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/gcc-11.1.0/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")
-- Zlib library: /usr/lib64/libz.so
-- Encryption: Openssl
-- Found OpenSSL: /usr/local/lib64/libcrypto.so (found version "1.1.1k")
-- Openssl include directory: /usr/local/include
-- Openssl library: /usr/local/lib64/libssl.so;/usr/local/lib64/libcrypto.so
-- Http client: Curl
-- Found CURL: /usr/lib64/libcurl.so (found version "7.61.1")
-- Curl include directory: /usr/include
-- Curl library: /usr/lib64/libcurl.so
-- Performing Test HAVE_ATOMICS_WITHOUT_LIBATOMIC
-- Performing Test HAVE_ATOMICS_WITHOUT_LIBATOMIC - Success
-- The C compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/gcc-11.1.0/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- AWS CRT C++ 1.9.88
CMake Warning (dev) at crt/aws-crt-cpp/crt/aws-c-common/CMakeLists.txt:5 (option):
Policy CMP0077 is not set: option() honors normal variables. Run "cmake
--help-policy CMP0077" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
For compatibility with older versions of CMake, option is clearing the
normal variable 'STATIC_CRT'.
This warning is for project developers. Use -Wno-dev to suppress it.
-- CMake 3.20.2
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS - Success
-- Performing Test AWS_HAVE_MSVC_MULX
-- Performing Test AWS_HAVE_MSVC_MULX - Failed
-- Performing Test AWS_HAVE_WINAPI_DESKTOP
-- Performing Test AWS_HAVE_WINAPI_DESKTOP - Failed
-- Performing Test AWS_ARCH_INTEL
-- Performing Test AWS_ARCH_INTEL - Success
-- Performing Test AWS_ARCH_ARM64
-- Performing Test AWS_ARCH_ARM64 - Failed
-- Performing Test AWS_ARCH_ARM32
-- Performing Test AWS_ARCH_ARM32 - Failed
-- Performing Test AWS_HAVE_GCC_INLINE_ASM
-- Performing Test AWS_HAVE_GCC_INLINE_ASM - Success
-- Performing Test AWS_HAVE_AUXV
-- Performing Test AWS_HAVE_AUXV - Success
-- Performing Test AWS_HAVE_EXECINFO
-- Performing Test AWS_HAVE_EXECINFO - Success
-- Performing Test AWS_SHOULD_DISABLE_STRINGOP_OVERFLOW
-- Performing Test AWS_SHOULD_DISABLE_STRINGOP_OVERFLOW - Success
-- Performing Test HAVE_M_AVX2_FLAG
-- Performing Test HAVE_M_AVX2_FLAG - Success
-- Performing Test HAVE_AVX2_INTRINSICS
-- Performing Test HAVE_AVX2_INTRINSICS - Success
-- Performing Test HAVE_MM256_EXTRACT_EPI64
-- Performing Test HAVE_MM256_EXTRACT_EPI64 - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Performing Test HAS_MOUTLINE_ATOMICS
-- Performing Test HAS_MOUTLINE_ATOMICS - Failed
-- Performing Test HAS_64BIT_FILE_OFFSET_BY_DEFAULT
-- Performing Test HAS_64BIT_FILE_OFFSET_BY_DEFAULT - Success
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Performing Test HAS_WGNU
-- Performing Test HAS_WGNU - Failed
-- Performing Test HAVE_SYSCONF
-- Performing Test HAVE_SYSCONF - Success
-- Looking for pthread_attr_setaffinity_np
-- Looking for pthread_attr_setaffinity_np - found
-- Performing Test HAS_SANITIZERS
-- Performing Test HAS_SANITIZERS - Failed
-- Building SIMD base64 decoder
-- The ASM compiler identification is GNU
-- Found assembler: /opt/gcc-11.1.0/bin/cc
-- Enabling SIKEP434R3 assembly code
-- Enabling BIKE_R3 x86_64 optimizations
-- Support for ADX assembly instructions detected
-- Found LibCrypto: /usr/local/lib64/libcrypto.so
-- LibCrypto Include Dir: /usr/local/include
-- LibCrypto Shared Lib: /usr/local/lib64/libcrypto.so
-- LibCrypto Static Lib: /usr/local/lib64/libcrypto.so
-- Using libcrypto from system: /usr/local/lib64/libcrypto.so
-- Add s3-crt:s3 to C2J_SPECIAL_NAME_LIST
-- Considering s3
-- Looking for pathconf
-- Looking for pathconf - found
-- Looking for umask
-- Looking for umask - found
-- Updating version info to 1.9.88
-- Custom memory management disabled
-- Performing Test CURL_HAS_H2
-- Performing Test CURL_HAS_H2 - Failed
-- Performing Test CURL_HAS_TLS_PROXY
-- Performing Test CURL_HAS_TLS_PROXY - Failed
-- Configuring done
-- Generating done
do you know what the problem might be? I can fix it myself but I don't know where to start!
You might want to check if Aws::InitAPI is called more than one?
@theShmoo are you calling Aws::InitAPI more than once
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.
@jmklix Thanks for the response! No I am not calling it more than once!
But this issue is a duplicate of https://github.com/aws/aws-sdk-cpp/issues/1706
Which should be addressed!
No!
Joseph Klix @.***> schrieb am Fr., 27. Mai 2022, 01:00:
@theShmoo https://github.com/theShmoo are you calling Aws::InitAPI more than once
— Reply to this email directly, view it on GitHub https://github.com/aws/aws-sdk-cpp/issues/1757#issuecomment-1139128261, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABK7ANYGYXFCVRPMZER7S7TVL77BHANCNFSM5DGBDKFQ . You are receiving this because you were mentioned.Message ID: @.***>
This PR fixed a memory leak with our openssl implementation. Can you get the latest updates from head or wait for tomorrow's release to see if that fixes your memory leak?
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.