Abhishek Chennaka has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/23222 )
Change subject: KUDU-3635 call OPENSSL_cleanup() explicitly ...................................................................... KUDU-3635 call OPENSSL_cleanup() explicitly With this changelist, the global state of the OpenSSL library is now explicitly cleaned up when shutting down a process. The rationale for this is outlined in [1]. This is applicable to the code linked against OpenSSL library of versions 1.1.1 and newer. IIUC, that covers all the contemporary Linux distributions at the time of writing. It worked for me at EOL Ubuntu 18.04 LTS as well (in particular, I tested it on Ubuntu 18.04.1 LTS). As for testing, I verified that the issue is gone after observing its manifestation with the frequency of about 1 in 10 runs of the kudu CLI tool with RELEASE bits on RHEL8.8 and RHEL9.2 (both of x86_64 arch) without the patch. For reproduction and verification, I ran the following 100rep test run multiple times (and 1000rep just for verification): ./bin/kudu-tool-test --gtest_repeat=100 Without the patch, I saw many core files left by the kudu CLI binary during every 100rep run, where many of the core files had stack traces similar to the one described in the JIRA item. With this patch, no such core files were observed when running Kudu RELEASE bits. However, there were still crashes with core files having stack traces attributable to KUDU-2439. That's addressed in a follow-up patch. [1] https://developers.redhat.com/articles/2022/10/31/best-practices-application-shutdown-openssl Change-Id: Ib08310d66a7eabb1996bde901f39f36f54bff483 Reviewed-on: http://gerrit.cloudera.org:8080/23222 Tested-by: Alexey Serbin <[email protected]> Reviewed-by: Abhishek Chennaka <[email protected]> --- M src/kudu/master/master_main.cc M src/kudu/tools/tool_main.cc M src/kudu/tserver/tablet_server_main.cc A src/kudu/util/before_and_after_main.h A src/kudu/util/entry_exit_wrapper.h M src/kudu/util/openssl_util.cc M src/kudu/util/openssl_util.h M src/kudu/util/process_memory.cc M src/kudu/util/test_main.cc M thirdparty/build-definitions.sh 10 files changed, 326 insertions(+), 25 deletions(-) Approvals: Alexey Serbin: Verified Abhishek Chennaka: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/23222 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib08310d66a7eabb1996bde901f39f36f54bff483 Gerrit-Change-Number: 23222 Gerrit-PatchSet: 9 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Attila Bukor <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]>
