Abhishek Chennaka has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/23265


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]>
(cherry picked from commit bda99a38bb7da12959a99ffc9a79de02acdacf2a)
---
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(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/65/23265/1
--
To view, visit http://gerrit.cloudera.org:8080/23265
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib08310d66a7eabb1996bde901f39f36f54bff483
Gerrit-Change-Number: 23265
Gerrit-PatchSet: 1
Gerrit-Owner: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>

Reply via email to