Details
Description
When using kudu_client library compiled against OpenSSL 1.0.x with OpenSSL 1.1.x run-time, Kudu client applications might report 'Runtime error: Locking callback not initialized' error.
For example, kudu-python based applications on RHEL/CentOS 7.7, if using kudu-client of versions 1.9, 1.10, 1.11 in Python environment with OpenSSL 1.1.1d might report an error like below:
Traceback (most recent call last): File "kudu-python-app.py", line 22, in <module> client = kudu.connect(host=args.masters, port=args.ports) File "/opt/lib/python3.6/site-packages/kudu/__init__.py", line 96, in connect rpc_timeout_ms=rpc_timeout_ms) File "kudu/client.pyx", line 297, in kudu.client.Client.__cinit__ File "kudu/errors.pyx", line 62, in kudu.errors.check_status kudu.errors.KuduBadStatus: b'Runtime error: Locking callback not initialized'
The issue is that the code libkudu_client compiled against OpenSSL 1.0.x uses initialization code path specific for OpenSSL 1.0.x version, and the post-condition requires presence of thread-safe callbacks installed after the initialization is done. However, those functions do not install the expected locking callbacks in OpenSSL 1.1.x since OpenSSL uses different approach w.r.t. locking callbacks since 1.1.0 version: the callbacks are not required since the multi-threading model was revamped in the newer versions of the library.