]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common: CephContext::_refresh_perf_values() checks for null _mempool_perf
authorCasey Bodley <cbodley@redhat.com>
Wed, 9 Apr 2025 19:26:51 +0000 (15:26 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 16 Apr 2025 19:50:35 +0000 (15:50 -0400)
commit2972b204b3595617281463b7bd7d17c2d7a05fc3
treee791b9ba77e0a09380f8a997a2ede5365951f7f3
parent4344faee0ae7a3e384a6ba71dea1ab865b8df987
common: CephContext::_refresh_perf_values() checks for null _mempool_perf

test_perf_counters_cache.cc initializes the CephContext with flag
CINIT_FLAG_NO_CCT_PERF_COUNTERS which leaves both _cct_perf and
_mempool_perf as nullptrs

the CephContextServiceThread calls _refresh_perf_values() regularly,
which guards _cct_perf->set() calls with a nullptr check, but the
_mempool_perf->set() calls were unguarded

this led to occasional unittest_perf_counters_cache segfaults in make
check

Fixes: https://tracker.ceph.com/issues/64895
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 76b3f0118cad36aa522802b181b03cdc0cdd3942)
src/common/ceph_context.cc