ceph-mirror/qa/lsan.supp
Kefu Chai 320a3a0529 qa/lsan.supp: suppress CPython 3.12/3.13 interpreter leaks
The python binaries on some CI images and dev boxes ship stripped, so the
allocator frames in an interpreter-shutdown leak come through unsymbolised
(/usr/bin/python3.13+0x...) and the function-name matches above cannot apply.
leak:python3.10 already handled this for 3.10, and a stale comment claimed 3.12
does not leak.

Add leak:python3.12 and leak:python3.13, mirroring the 3.10 entry, so the
interpreter globals are suppressed whatever CPython the build uses.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2026-06-23 23:02:05 +08:00

77 lines
2.6 KiB
Plaintext

# leak suppressions needed to run vstart.sh with WITH_ASAN=ON
# to enable, add this to the environment:
# LSAN_OPTIONS="suppressions=../qa/lsan.supp"
# export ASAN_OPTIONS="detect_odr_violation=0"
# gperftools allocates a singleton of MallocExtension and never frees it
leak:^MallocExtension::Initialize
# from perfglue/heap_profiler.cc
# gperftools allocates a singleton and never frees it
leak:^InitModule
# from src/ceph.in
# python3.6
leak:^_PyObject_Alloc
leak:^_PyObject_GC_Resize
leak:^PyBytes_FromStringAndSize
leak:^PyType_GenericAlloc
leak:^set_table_resize
# python3.7
leak:^_PyObject_Realloc
leak:^PyObject_Malloc
# python3.8
leak:^_PyBytes_FromSize
leak:^_PyObject_GC_Alloc
leak:^PyMem_Calloc
leak:^PyUnicode_New
# python3.9, 3.10, 3.11
leak:^PyMem_Malloc
leak:^PyDict_Copy
leak:^_PyObject_GC_NewVar
# Catch unsymbolised interpreter frames in the standalone python binary used by
# the bin/ceph wrapper and in the libpython embedded by C++ unittests such as
# unittest_mgr_pyformatter / unittest_mgr_pyutil. Not all CPython internal
# helpers are exported in .dynsym, so the function-name matches above don't
# cover everything; this substring-matches the module path in the stack frame.
leak:python3.10
leak:python3.12
leak:python3.13
# python3.13
leak:^PyModule_ExecDef
# following suppression mirrors qa/valgrind.supp
# ignore ec plugin factory (FIXME SOMEDAY)
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
# unittest-seastore stops the seastar reactor (SeastarRunner, on its own thread)
# without draining its pending tasks, so a few cached extents those tasks still
# held are leaked at shutdown. Three anchors for the three seastore subsystems
# they come from.
leak:crimson::os::seastore::Cache::
leak:crimson::os::seastore::omap_manager
leak:crimson::os::seastore::FixedKVBtree