Azure / azure-sdk-for-cpp

This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
MIT License
181 stars 126 forks source link

During test discovery using gtest (within the cmake build all test), there is a segmentation fault only Ubuntu 20, with OpenSSL 1.1 #4485

Open ahsonkhan opened 1 year ago

ahsonkhan commented 1 year ago

From an unrelated PR: https://github.com/Azure/azure-sdk-for-cpp/pull/4467, failing on Validate Ubuntu20_openssl_111n

https://dev.azure.com/azure-sdk/29ec6040-b234-4e31-b139-33dc4287b756/_apis/build/builds/2658413/logs/651

2023-03-27T19:15:24.5201507Z [ 50%] Building CXX object sdk/storage/azure-storage-blobs/CMakeFiles/azure-storage-blobs.dir/src/blob_lease_client.cpp.o
2023-03-27T19:15:25.4613283Z CMake Error at /usr/local/share/cmake-3.26/Modules/GoogleTestAddTests.cmake:112 (message):
2023-03-27T19:15:25.4615990Z   Error running test executable.
2023-03-27T19:15:25.4618697Z 
2023-03-27T19:15:25.4620939Z     Path: '/mnt/vss/_work/1/s/build/sdk/keyvault/azure-security-keyvault-administration/test/ut/azure-security-keyvault-administration-test'
2023-03-27T19:15:25.4622868Z     Result: Segmentation fault
2023-03-27T19:15:25.4623814Z     Output:
2023-03-27T19:15:25.4624688Z       
2023-03-27T19:15:25.4625228Z 
2023-03-27T19:15:25.4626076Z Call Stack (most recent call first):
2023-03-27T19:15:25.4627706Z   /usr/local/share/cmake-3.26/Modules/GoogleTestAddTests.cmake:225 (gtest_discover_tests_impl)
2023-03-27T19:15:25.4628673Z 
2023-03-27T19:15:25.4630529Z 
2023-03-27T19:15:25.4632944Z make[2]: *** [sdk/keyvault/azure-security-keyvault-administration/test/ut/CMakeFiles/azure-security-keyvault-administration-test.dir/build.make:128: sdk/keyvault/azure-security-keyvault-administration/test/ut/azure-security-keyvault-administration-test] Error 1
2023-03-27T19:15:25.4635629Z make[2]: *** Deleting file 'sdk/keyvault/azure-security-keyvault-administration/test/ut/azure-security-keyvault-administration-test'
2023-03-27T19:15:25.4638066Z make[1]: *** [CMakeFiles/Makefile2:1999: sdk/keyvault/azure-security-keyvault-administration/test/ut/CMakeFiles/azure-security-keyvault-administration-test.dir/all] Error 2
2023-03-27T19:15:25.4639761Z make[1]: *** Waiting for unfinished jobs....
2023-03-27T19:15:25.4924432Z [ 50%] Building CXX object sdk/storage/azure-storage-blobs/CMakeFiles/azure-storage-blobs.dir/src/blob_options.cpp.o
2023-03-27T19:15:26.2639469Z [ 51%] Building CXX object sdk/storage/azure-storage-blobs/CMakeFiles/azure-storage-blobs.dir/src/blob_responses.cpp.o
2023-03-27T19:15:27.4047149Z [ 51%] Building CXX object sdk/storage/azure-storage-blobs/CMakeFiles/azure-storage-blobs.dir/src/blob_sas_builder.cpp.o
2023-03-27T19:15:29.5126166Z [ 51%] Building CXX object sdk/storage/azure-storage-blobs/CMakeFiles/azure-storage-blobs.dir/src/blob_service_client.cpp.o
2023-03-27T19:15:30.3415697Z [ 52%] Building CXX object sdk/storage/azure-storage-blobs/CMakeFiles/azure-storage-blobs.dir/src/block_blob_client.cpp.o
2023-03-27T19:15:32.3518844Z [ 52%] Building CXX object sdk/storage/azure-storage-blobs/CMakeFiles/azure-storage-blobs.dir/src/page_blob_client.cpp.o
2023-03-27T19:15:33.2920134Z [ 52%] Building CXX object sdk/storage/azure-storage-blobs/CMakeFiles/azure-storage-blobs.dir/src/private/avro_parser.cpp.o
2023-03-27T19:15:33.9682243Z [ 52%] Building CXX object sdk/storage/azure-storage-blobs/CMakeFiles/azure-storage-blobs.dir/src/rest_client.cpp.o
2023-03-27T19:15:40.8327363Z [ 53%] Linking CXX executable azure-security-keyvault-certificates-test
2023-03-27T19:15:41.5443782Z [ 53%] Linking CXX static library libazure-storage-queues.a
2023-03-27T19:15:41.6838207Z [ 53%] Built target azure-storage-queues
2023-03-27T19:15:42.1149751Z CMake Error at /usr/local/share/cmake-3.26/Modules/GoogleTestAddTests.cmake:112 (message):
2023-03-27T19:15:42.1170136Z   Error running test executable.
2023-03-27T19:15:42.1171527Z 
2023-03-27T19:15:42.1174845Z     Path: '/mnt/vss/_work/1/s/build/sdk/keyvault/azure-security-keyvault-certificates/test/ut/azure-security-keyvault-certificates-test'
2023-03-27T19:15:42.1178350Z     Result: Segmentation fault
2023-03-27T19:15:42.1179571Z     Output:
2023-03-27T19:15:42.1180591Z       
2023-03-27T19:15:42.1181228Z 
2023-03-27T19:15:42.1182156Z Call Stack (most recent call first):
2023-03-27T19:15:42.1183860Z   /usr/local/share/cmake-3.26/Modules/GoogleTestAddTests.cmake:225 (gtest_discover_tests_impl)
2023-03-27T19:15:42.1185123Z 
2023-03-27T19:15:42.1185724Z 
2023-03-27T19:15:42.1188016Z make[2]: *** [sdk/keyvault/azure-security-keyvault-certificates/test/ut/CMakeFiles/azure-security-keyvault-certificates-test.dir/build.make:128: sdk/keyvault/azure-security-keyvault-certificates/test/ut/azure-security-keyvault-certificates-test] Error 1
2023-03-27T19:15:42.1190744Z make[2]: *** Deleting file 'sdk/keyvault/azure-security-keyvault-certificates/test/ut/azure-security-keyvault-certificates-test'
2023-03-27T19:15:42.1193314Z make[1]: *** [CMakeFiles/Makefile2:1912: sdk/keyvault/azure-security-keyvault-certificates/test/ut/CMakeFiles/azure-security-keyvault-certificates-test.dir/all] Error 2
2023-03-27T19:15:46.3408533Z [ 54%] Linking CXX static library libazure-storage-files-shares.a
2023-03-27T19:15:46.3702696Z [ 54%] Built target azure-storage-files-shares
2023-03-27T19:15:57.6203853Z [ 55%] Linking CXX static library libazure-storage-blobs.a
2023-03-27T19:15:57.6543997Z [ 55%] Built target azure-storage-blobs
2023-03-27T19:15:57.6552549Z make: *** [Makefile:146: all] Error 2
2023-03-27T19:15:57.6613283Z ##[error]Bash exited with code '2'.
2023-03-27T19:15:57.6633919Z ##[section]Finishing: cmake build All

cc @LarryOsterman, @danieljurek

ahsonkhan commented 1 year ago

Updating to the latest gtest version doesn't resolve the issue. https://github.com/Azure/azure-sdk-for-cpp/pull/4486

https://dev.azure.com/azure-sdk/public/_build/results?buildId=2658953&view=logs&j=23363245-6a5f-5e4d-1f27-b9a78bed083f&t=53ef76ab-cc2b-5463-1fc8-2e4013fa03f0&l=332

[ 66%] Linking CXX executable azure-core-test
files'
CMake Error at /usr/local/share/cmake-3.26/Modules/GoogleTestAddTests.cmake:112 (message):
  Error running test executable.

    Path: '/mnt/vss/_work/1/s/build/sdk/core/azure-core/test/ut/azure-core-test'
    Result: Segmentation fault
    Output:

Call Stack (most recent call first):
  /usr/local/share/cmake-3.26/Modules/GoogleTestAddTests.cmake:225 (gtest_discover_tests_impl)