Project

General

Profile

Bug #18877

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

Added by Zhi Zhang 9 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
02/10/2017
Due date:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
jewel, kraken
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Release:
Component(FS):
MDS
Needs Doc:
No

Description

This issue was found by testing another PR (https://github.com/ceph/ceph/pull/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


Related issues

Copied to fs - Backport #18949: jewel: mds/StrayManager: avoid reusing deleted inode in StrayManager::_purge_stray_logged Resolved
Copied to fs - Backport #18950: kraken: mds/StrayManager: avoid reusing deleted inode in StrayManager::_purge_stray_logged Resolved

History

#2 Updated by Zhi Zhang 9 months ago

  • Subject changed from mds/StrayManager: aviod reusing deleted inode in StrayManager::_purge_stray_logged to mds/StrayManager: avoid reusing deleted inode in StrayManager::_purge_stray_logged

#3 Updated by John Spray 8 months ago

  • Backport changed from jewel to jewel, kraken

#4 Updated by John Spray 8 months ago

  • Status changed from New to Pending Backport

#5 Updated by Loic Dachary 8 months ago

  • Copied to Backport #18949: jewel: mds/StrayManager: avoid reusing deleted inode in StrayManager::_purge_stray_logged added

#6 Updated by Loic Dachary 8 months ago

  • Copied to Backport #18950: kraken: mds/StrayManager: avoid reusing deleted inode in StrayManager::_purge_stray_logged added

#7 Updated by Nathan Cutler about 2 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF