Project

General

Profile

Actions

Bug #61627

closed

Mds crash and fails with assert on prepare_new_inode

Added by guihua pan 11 months ago. Updated 11 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Correctness/Safety
Target version:
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS, libcephfs
Labels (FS):
crash
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

As following code: When mdr->session->info.prealloc_inos is empty, mds will crash.

inodeno_t take_ino(inodeno_t ino = 0) {
ceph_assert(!info.prealloc_inos.empty());
.....
}
// assign ino
do {
if (allow_prealloc_inos && (mdr->used_prealloc_ino = _inode->ino = mdr->session->take_ino(_useino))) {
if (mdcache->test_and_clear_taken_inos(_inode->ino)) {
_inode->ino = 0;
dout(10) << "prepare_new_inode used_prealloc " << mdr->used_prealloc_ino
<< " (" << mdr->session->info.prealloc_inos.size() << " left)"
<< " but has been taken, will try again!" << dendl;
} else {
mds->sessionmap.mark_projected(mdr->session);
dout(10) << "prepare_new_inode used_prealloc " << mdr->used_prealloc_ino
<< " (" << mdr->session->info.prealloc_inos.size() << " left)"
<< dendl;
}
}
....
}

The crash stack:
2023-06-08 16:21:09.823 7f9a812ea700 -1 /workspace/pgh/rpmbuild/BUILD/infinity-4.2.18/src/mds/SessionMap.h: In function 'inodeno_t Session::take_ino(inodeno_t)' thread 7f9a812ea700 time 2023-06-08 16:21:09.823979
/workspace/pgh/rpmbuild/BUILD/infinity-4.2.18/src/mds/SessionMap.h: 220: FAILED ceph_assert(!info.prealloc_inos.empty())

ceph version 14.2.8 (2d095e947a02261ce61424021bb43bd3022d35cb) nautilus (stable)
1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x150) [0x7f9a90816771]
2: (()+0x25eb72) [0x7f9a90816b72]
3: (Server::prepare_new_inode(boost::intrusive_ptr&lt;MDRequestImpl&gt;&, CDir*, inodeno_t, unsigned int, file_layout_t*)+0x345a) [0x55b67b33101a]
4: (Server::handle_client_openc(boost::intrusive_ptr&lt;MDRequestImpl&gt;&)+0x1eb0) [0x55b67b351f20]
5: (Server::dispatch_client_request(boost::intrusive_ptr&lt;MDRequestImpl&gt;&)+0x1583) [0x55b67b39b383]
6: (MDCache::dispatch_request(boost::intrusive_ptr&lt;MDRequestImpl&gt;&)+0x2e) [0x55b67b4815fe]
7: (MDSContext::complete(int)+0x7b) [0x55b67b6c120b]
8: (MDSRank::_advance_queues()+0xb3) [0x55b67b2bc443]
9: (MDSRank::ProgressThread::entry()+0x3d) [0x55b67b2bd46d]
10: (()+0x7ea5) [0x7f9a8e6caea5]
11: (clone()+0x6d) [0x7f9a8d37796d]
[ceph::__ceph_assert_fail:64]
Actions #1

Updated by guihua pan 11 months ago

Please don't care this; I merge the fix of https://tracker.ceph.com/issues/52280 to 14.2.8; but not following the modification of take_ino function

Actions #2

Updated by Greg Farnum 11 months ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF