New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mds/StrayManager: avoid reusing deleted inode in StrayManager::_purge_stray_logged #13347

Merged
merged 1 commit into from Feb 14, 2017

Conversation

Projects
None yet
3 participants
@david-z
Member

david-z commented Feb 10, 2017

This issue was found by testing another PR (#12792), which makes MDS directly uses TCMALLOC, not boost::pool. When the version of TCMALLOC is 4.2.6 or above, removing directory will cause MDS crash.

assert((o->lru_list == & lru_pintail) || (o->lru_list ==&lru_top) || (o->lru_list == &lru_b))

The root cause is that in StrayManager::_purge_stray_logged, inode will delete itself firstly, then it tries to drop dentry via this deleted inode. I think it should be the new version of TCMALLOC to expose this issue more easily and obviously.

The fix here is to reorder the dropping sequence. Tests have passed with following test cases:

  1. boost::pool with TCMALLOC 4.2.6
  2. only TCMALLOC 4.2.6
  3. boost::pool with TCMALLOC 4.1.2
  4. only TCMALLOC 4.1.2

Fixes: http://tracker.ceph.com/issues/18877

Signed-off-by: Zhi Zhang zhangz.david@outlook.com

Zhi Zhang
mds/StrayManager: aviod reusing deleted inode in StrayManager::_purge…
…_stray_logged

Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>

@david-z david-z changed the title from mds/StrayManager: aviod reusing deleted inode in StrayManager::_purge_stray_logged to mds/StrayManager: avoid reusing deleted inode in StrayManager::_purge_stray_logged Feb 10, 2017

@david-z

This comment has been minimized.

Member

david-z commented Feb 10, 2017

@jcsp pls take a look, thanks.

@jcsp

This comment has been minimized.

Contributor

jcsp commented Feb 10, 2017

Looks correct at first glance, will test.

@jcsp

jcsp approved these changes Feb 14, 2017

@jcsp jcsp merged commit feec28d into ceph:master Feb 14, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment