From: Sage Weil Date: Wed, 19 Jun 2019 19:20:32 +0000 (-0500) Subject: osd/PG: do not queue scrub if PG is not active when unblock X-Git-Tag: v14.2.3~43^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7f2aa85af50c8604728b0467c4b7d2c258ca6e75;p=ceph.git osd/PG: do not queue scrub if PG is not active when unblock - we are scrubbing - we block scrub on an object - we have an interval reset on epoch X - we unblock and queue scrub in epoch X - we finish the reset (we are no longer scrubbing) - we process the PGScrub on epoch X, it is still epoch X, and we are not scrubbing -> assert Fix by not queueing scrub if we are unblocking and the PG is no longer active (because we are mid-way through the peering reset). Fixes: http://tracker.ceph.com/issues/40451 Signed-off-by: Sage Weil (cherry picked from commit 7a3227e946332c0bdc983201fe4a4e83cfe6fda6) --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 18b9e2539ab..7db909d7530 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -11388,7 +11388,11 @@ void PrimaryLogPG::kick_object_context_blocked(ObjectContextRef obc) if (obc->requeue_scrub_on_unblock) { obc->requeue_scrub_on_unblock = false; - requeue_scrub(); + // only requeue if we are still active: we may be unblocking + // because we are resetting for a new peering interval + if (is_active()) { + requeue_scrub(); + } } }