Skip to content

Commit ecb5efe

Browse files
committed
cmk-agent-ctl: disable OpenSSL config auto-load to fix sles-16 register hang
The vendored OpenSSL (native-tls) auto-loaded the distro-supplied /etc/ssl/openssl.cnf at init because SUP-28810 pointed OPENSSLDIR at /etc/ssl. On SLES 16 that config enables provider auto-loading, which deadlocks OpenSSL 3.x's recursive rwlock under musl during DRBG seeding in SSL_CTX_new -- so `cmk-agent-ctl register` hangs forever (e.g. robotmk test_linux_deployment), draining the integration-test session timeout. We neither ship nor need an openssl.cnf for the agent controller, so build the vendored OpenSSL with `no-autoload-config`. This keeps SUP-28810's path stabilisation intact and restores the controller's "never read openssl config files" invariant in fact, not just by intent. Verified in a SLES 16.0 container: the shipped binary hangs 3/3, the rebuilt binary completes 3/3 (even with OPENSSL_CONF=/etc/ssl/openssl.cnf forced) and TLS still works. CMK-35950 Change-Id: Ibe963a3f3a3717baee72e3205659d8e8b5c0d678
1 parent 1cde3a0 commit ecb5efe

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

packages/host/patches/openssl-src-stable-paths.patch

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@
1717
# libcrypto.so loaded at runtime inside a site; the agent binaries ship to
1818
# monitored hosts that have no /omd tree, so FHS is the correct choice.
1919
#
20+
# CMK-35950: with OPENSSLDIR pointed at /etc/ssl, the vendored OpenSSL would
21+
# otherwise auto-load the *distro-supplied* /etc/ssl/openssl.cnf at init. On
22+
# SLES 16 that config enables provider auto-loading, which deadlocks OpenSSL
23+
# 3.x's recursive rwlock under musl (benign on glibc) during DRBG seeding in
24+
# SSL_CTX_new -- so `cmk-agent-ctl register` hangs forever. We neither ship nor
25+
# need an openssl.cnf, so the configure hunk below adds `no-autoload-config` to
26+
# keep the "never read openssl config files" invariant true in fact, not just
27+
# by intent.
28+
#
2029
# Applied to a build-time copy of the locked openssl-src crate by
2130
# patch-vendored-openssl-src.sh. The hunks are anchored on src/lib.rs context; a
2231
# crate upgrade that moves them makes `patch` fail loudly rather than silently
@@ -32,6 +41,16 @@
3241
}
3342

3443
// Specify that openssl directory where things are loaded at runtime is
44+
@@ -202,6 +202,9 @@
45+
.arg("no-ssl3")
46+
// No need to build tests, we won't run them anyway
47+
.arg("no-tests")
48+
+ // CMK-35950: do not auto-load the (distro-supplied) openssl.cnf at init.
49+
+ // SLES16's provider config deadlocks OpenSSL 3.x's recursive rwlock under musl.
50+
+ .arg("no-autoload-config")
51+
// Nothing related to zlib please
52+
.arg("no-comp")
53+
.arg("no-zlib")
3554
@@ -610,7 +610,7 @@
3655

3756
let mut install =

0 commit comments

Comments
 (0)