Conversation
| #if USE_SSL | ||
| if (ref_count++ == 0) | ||
| { | ||
| // Disable OpenSSL atexit hook. |
There was a problem hiding this comment.
If I read #80132 correctly, then we crashed when the atexit handler is installed, not when it runs at the end of the program. Also, https://docs.openssl.org/3.2/man3/OPENSSL_init_crypto/#description says that `OPENSSL_INIT_NO_ATEXIT By default OpenSSL will attempt to clean itself up when the process exits via an "atexit" handler. Using this option suppresses that behaviour. This means that the application will have to clean up OpenSSL explicitly using OPENSSL_cleanup().
My question is if we should call OPENSSL_cleanup in the dtor?
There was a problem hiding this comment.
Should we cleanup on shutdown?
There was a problem hiding this comment.
OPENSSL_cleanup can be called only once according to their docs, so yes: we ideally call it during database shutdown and not here (dtor).
|
BTW shouldn't we backport? I.e. here it fails for 25.5 - https://s3.amazonaws.com/clickhouse-test-reports/PRs/80987/7a563403d26f031052dd036de570ccbc3bd9262a//integration_tests_tsan_1_6/integration_run_test_host_regexp_multiple_ptr_records_test_py_0.log |
Changelog category (leave one):
Closes #80132