Project

General

Profile

Actions

Bug #4248

closed

mds: replay does not correctly update CInode::first and ::last members

Added by Greg Farnum about 11 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

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

Description

This came in over the mailing list.

2013-02-21 19:10:51.606584 7fc59f036700 10 mds.0.journal EMetaBlob.replay dir 600
2013-02-21 19:10:51.606586 7fc59f036700 10 mds.0.journal EMetaBlob.replay updated dir [dir 600 ~mds0/stray0/ [2,head] auth v=1843468 cv=0/0 state=1610612736 f(v2 m2013-02-14 14:32:31.832960 4=1+3) 
n(v2 rc2013-02-14 14:32:31.832960 b4289386496 4=1+3) hs=1+2735,ss=0+0 dirty=2736 | child dirty 0x1ca2fa0]
2013-02-21 19:10:51.606601 7fc59f036700 12 mds.0.cache.dir(600) add_null_dentry [dentry #100/stray0/10000070420 [4,head] auth NULL (dversion lock) pv=0 v=1843468 inode=0 0xd0a8168]
2013-02-21 19:10:51.606606 7fc59f036700 10 mds.0.journal EMetaBlob.replay added [dentry #100/stray0/10000070420 [4,head] auth NULL (dversion lock) v=1843467 inode=0 | dirty 0xd0a8168]
2013-02-21 19:10:51.606610 7fc59f036700 10 mds.0.journal EMetaBlob.replay unlinking [inode 10000070420 [2,head] /trompete/CentOS-6.3-x86_64-bin-DVD1.iso auth v1843466 s=4289386496 n(v0 b4289386496 
1=1+0) (iversion lock) | dirty 0x9245fa0]
2013-02-21 19:10:51.606616 7fc59f036700 12 mds.0.cache.dir(10000000000) unlink_inode [dentry #1/trompete/CentOS-6.3-x86_64-bin-DVD1.iso [2,head] auth (dversion lock) v=1843466 inode=0x9245fa0 | ino
depin dirty 0xd0a7db8] [inode 10000070420 [2,head] /trompete/CentOS-6.3-x86_64-bin-DVD1.iso auth v1843466 s=4289386496 n(v0 b4289386496 1=1+0) (iversion lock) | dirty 0x9245fa0]
2013-02-21 19:10:51.606624 7fc59f036700 12 mds.0.cache.dir(600) link_primary_inode [dentry #100/stray0/10000070420 [4,head] auth NULL (dversion lock) v=1843467 inode=0 | dirty 0xd0a8168] [inode 100
00070420 [2,head] #10000070420 auth v1843467 s=4289386496 nl=0 n(v0 b4289386496 1=1+0) (iversion lock) | dirty 0x9245fa0]
2013-02-21 19:10:51.606634 7fc59f036700 10 mds.0.journal EMetaBlob.replay linked [inode 10000070420 [2,head] ~mds0/stray0/10000070420 auth v1843467 s=4289386496 nl=0 n(v0 b4289386496 1=1+0) (iversion lock) | dirty 0x9245fa0]
2013-02-21 19:10:51.607281 7fc59f036700 -1 mds/journal.cc: In function 'void EMetaBlob::replay(MDS*, LogSegment*, MDSlaveUpdate*)' thread 7fc59f036700 time 2013-02-21 19:10:51.606653
mds/journal.cc: 597: FAILED assert(in->first == p->dnfirst || (in->is_multiversion() && in->first > p->dnfirst))

 ceph version 0.57 (9a7a9d06c0623ccc116a1d3b71c765c20a17e98e)
 1: (EMetaBlob::replay(MDS*, LogSegment*, MDSlaveUpdate*)+0x1e34) [0x4e0d94]
 2: (EUpdate::replay(MDS*)+0x3a) [0x4e8e1a]
 3: (MDLog::_replay_thread()+0x438) [0x6ad448]
 4: (MDLog::ReplayThread::entry()+0xd) [0x4cc0ad]
 5: (()+0x7e9a) [0x7fc5a7132e9a]
 6: (clone()+0x6d) [0x7fc5a5fd3cbd]
 NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.

It turns out to be because the CInode already existed in the cache with a first of 2, and the replay function didn't update that. The fix is of course to update it — doing so based on the old_inodes values should be safe. I'm about to push a fix for testing.

Actions

Also available in: Atom PDF