]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/pg_scrubber: do not print log in dtors 38860/head
authorKefu Chai <kchai@redhat.com>
Tue, 12 Jan 2021 05:48:53 +0000 (13:48 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 12 Jan 2021 14:38:04 +0000 (22:38 +0800)
commitda338250f5647c866989396d6a0f9d4ba52aa426
treebb8d3864d6d533bf664d4a649ce7b67e967baf05
parent40dac2cbac49eadfceb0aec5a5667846264be928
osd/pg_scrubber: do not print log in dtors

PG::recovery_state is defined after PG::m_scrubber, while
PG::gen_prefix() retrieves the osdmap from recovery_state. in
PgScrubber::~PgScrubber(), we print out the osdmap by dereferencing
recovery_state for the prefix of the logging message. in other words,
PgScrubber's destructor is referencing "recovery_state" which is
already destroyed.

in this change, the logging messages are removed from dtors. we can
print out the pgid in a follow-up PR if it helps.

Fixes: https://tracker.ceph.com/issues/48777
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/pg_scrubber.cc
src/osd/scrub_machine.cc