]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Objecter: failed assert(tick_event==NULL) at osdc/Objecter.cc 4175/head
authorZhiqiang Wang <zhiqiang.wang@intel.com>
Wed, 25 Mar 2015 08:32:44 +0000 (16:32 +0800)
committerZhiqiang Wang <zhiqiang.wang@intel.com>
Thu, 26 Mar 2015 00:17:04 +0000 (08:17 +0800)
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 <zhiqiang.wang@intel.com>
src/osdc/Objecter.cc

index 3b93a1e520d2918279f54320c8e39fa5cebd246e..3e1756d1cf70c5350e7c4cf2fae87502da51c9a8 100644 (file)
@@ -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);