Details
-
Bug
-
Resolution: Fixed
-
Major
-
4.0.0
-
Security Level: Public
-
None
-
Untriaged
-
Unknown
Description
Hitting an assert when the engine is destroyed and the VBucketMemoryDeletionTask is referencing a VB. ep-engine testsuite - vbucket_destroy_restart
assertion failed [engine] at ep-engine/src/objectregistry.cc:58
|
Backtrace
0 0x00007ffff71dfcc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
|
#1 0x00007ffff71e30d8 in __GI_abort () at abort.c:89
|
#2 0x00007ffff501f403 in verifyEngine (engine=0x0) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/objectregistry.cc:58
|
#3 0x00007ffff50ed206 in verifyEngine (engine=<optimized out>) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/objectregistry.cc:55
|
#4 ObjectRegistry::onDeleteItem (pItem=pItem@entry=0x7ffff5c2f040) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/objectregistry.cc:154
|
#5 0x00007ffff5029ce6 in ~Item (this=0x7ffff5c2f040, __in_chrg=<optimized out>) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/item.h:412
|
#6 ~SingleThreadedRCPtr (this=0x7ffff5eb6c30, __in_chrg=<optimized out>) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/atomic.h:271
|
#7 ~_List_node (this=0x7ffff5eb6c20, __in_chrg=<optimized out>) at /usr/include/c++/4.8/bits/stl_list.h:106
|
#8 destroy<std::_List_node<SingleThreadedRCPtr<Item> > > (this=<optimized out>, __p=0x7ffff5eb6c20) at /usr/include/c++/4.8/ext/new_allocator.h:124
|
#9 _M_clear (this=0x7ffff5c468a8) at /usr/include/c++/4.8/bits/list.tcc:75
|
#10 ~_List_base (this=0x7ffff5c468a8, __in_chrg=<optimized out>) at /usr/include/c++/4.8/bits/stl_list.h:378
|
#11 ~list (this=0x7ffff5c468a8, __in_chrg=<optimized out>) at /usr/include/c++/4.8/bits/stl_list.h:438
|
#12 Checkpoint::~Checkpoint (this=0x7ffff5c46840, __in_chrg=<optimized out>) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/checkpoint.cc:81
|
#13 0x00007ffff502f3a9 in CheckpointManager::~CheckpointManager (this=0x7ffff5d57698, __in_chrg=<optimized out>) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/checkpoint.cc:238
|
#14 0x00007ffff50c4ad9 in VBucket::~VBucket (this=0x7ffff5d57600, __in_chrg=<optimized out>) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/vbucket.cc:118
|
#15 0x00007ffff5025144 in RCPtr<VBucket>::~RCPtr (this=0x7ffff5c39448, __in_chrg=<optimized out>) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/atomic.h:189
|
#16 0x00007ffff50644e8 in ~VBucketMemoryDeletionTask (this=0x7ffff5c39400, __in_chrg=<optimized out>) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/ep.cc:152
|
#17 VBucketMemoryDeletionTask::~VBucketMemoryDeletionTask (this=0x7ffff5c39400, __in_chrg=<optimized out>) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/ep.cc:152
|
#18 0x00007ffff5084784 in ~SingleThreadedRCPtr (this=0x7fffffffe060, __in_chrg=<optimized out>) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/atomic.h:271
|
#19 ExecutorPool::_stopTaskGroup (this=0x7ffff5e02600, e=0x7ffff5c6f000, taskType=<optimized out>) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/executorpool.cc:533
|
#20 0x00007ffff50848c0 in ExecutorPool::stopTaskGroup (this=0x7ffff5e02600, e=e@entry=0x7ffff5c6f000, taskType=taskType@entry=NONIO_TASK_IDX) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/executorpool.cc:542
|
#21 0x00007ffff505df2f in EventuallyPersistentStore::~EventuallyPersistentStore (this=0x7ffff5c4f000, __in_chrg=<optimized out>) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/ep.cc:388
|
#22 0x00007ffff507dfdd in EventuallyPersistentEngine::~EventuallyPersistentEngine (this=0x7ffff5c6f000, __in_chrg=<optimized out>) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/ep_engine.cc:6036
|
#23 0x00007ffff507e181 in EvpDestroy (handle=0x7ffff5c6f000, force=<optimized out>) at /vmhost_home/Code/sherlock_linux/source/ep-engine/src/ep_engine.cc:143
|
#24 0x0000000000403f6f in destroy_engine (force=false) at /vmhost_home/Code/sherlock_linux/source/memcached/programs/engine_testapp/engine_testapp.c:991
|
Issue is that when we request all tasks to stop and the task object is deleted and all members of VBucketMemoryDeletionTask are deleted and the RCPtr<VBucket> is looking at a VBucket (and is the only reference) chained deletion occurs and we assert in the objectregistry because the thread-local storage has no engine stashed away for accounting of the Blob deletion.
If the RCPtr has a 0 ref or > 1 refs we escape the defect.