From 9f1f35546e00e8f1ecbce0697d59b64f3537facf Mon Sep 17 00:00:00 2001 From: Zhiqiang Wang Date: Wed, 25 Mar 2015 16:32:44 +0800 Subject: [PATCH] Objecter: failed assert(tick_event==NULL) at osdc/Objecter.cc When the Objecter timer erases the tick_event from its events queue and calls tick() to dispatch it, if the Objecter::rwlock is held by shutdown(), it waits there to get the rwlock. However, inside the shutdown function, it checks the tick_event and tries to cancel it. The cancel_event function returns false since tick_event is already removed from the events queue. Thus tick_event is not set to NULL in shutdown(). Later the tick function return ealier and doesn't set tick_event to NULL as well. This leads to the assertion failure. This is a regression introduced by an incorrect conflict resolution when d790833 was backported. Fixes: #11183 Signed-off-by: Zhiqiang Wang --- src/osdc/Objecter.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 3b93a1e520d29..3e1756d1cf70c 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -1548,8 +1548,6 @@ void Objecter::tick() RWLock::RLocker rl(rwlock); ldout(cct, 10) << "tick" << dendl; - if (!initialized.read()) - return; // we are only called by C_Tick assert(tick_event); -- 2.39.5