From: Sun Yuechi Date: Mon, 22 Jun 2026 06:52:22 +0000 (+0800) Subject: qa/lsan.supp: suppress still-reachable third-party leaks X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e35cdb71232c69d20ddb5e2f0104f48c20fa5d86;p=ceph.git qa/lsan.supp: suppress still-reachable third-party leaks Several unittests fail LeakSanitizer on still-reachable allocations that belong to third-party libraries, not to Ceph. These are boost.thread's main-thread TLS, OpenSSL's one-time init (the ForkDeathTest children _exit() before it is freed), and the cipher, DRBG and error-stack state that OpenSSL and libcryptsetup keep behind the librbd encryption and migration unittests. None get freed without OPENSSL_cleanup(), so suppress them by their allocation entry points. Signed-off-by: Sun Yuechi --- diff --git a/qa/lsan.supp b/qa/lsan.supp index 329389e5b5f..8dd1faa5e81 100644 --- a/qa/lsan.supp +++ b/qa/lsan.supp @@ -48,3 +48,22 @@ leak:^ceph::ErasureCodePluginRegistry::load # SQLite internal allocations # These are indirect leaks from SQLite's internal memory management leak:libsqlite3.so + +# boost.thread main-thread TLS; freed only when a boost-created thread exits, so +# still reachable at exit. Benign. +leak:boost::detail::make_external_thread_data + +# OpenSSL one-time init; ForkDeathTest children _exit() without OPENSSL_cleanup. +leak:^OPENSSL_init_crypto + +# Still-reachable OpenSSL / libcryptsetup state with no API to free at exit; +# seen in the librbd encryption and migration unittests under ASan. +# +# libcryptsetup OpenSSL cipher/per-thread state that survives crypt_free(). +leak:libcryptsetup +# OpenSSL DRBG global state, freed only by OPENSSL_cleanup (never called here). +leak:^RAND_bytes_ex +leak:^RAND_priv_bytes_ex +# OpenSSL per-thread error stack/strings, freed only by OPENSSL_thread_stop. +leak:^ossl_err_get_state_int +leak:^ERR_add_error_vdata