Re: mds crashes upon access to some snapshotted files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Feb 16, 2013, Alexandre Oliva <oliva@xxxxxxx> wrote:

> I suppose this might be the result of some filesystem corruption, but I
> have some files in my ceph tree that, when accessed, crash the mds.

Here's another patch from my mds crash avoidance series.

With it, instead of a crash, I get a message like this in the mds log:

  2013-02-16 13:49:16.360480 7f0e7a0f1700  0 mds.0.cache  hmm, 82 is not the first in old_inodes; 2 is

mds: relax p-not-first assert within first>last

From: Alexandre Oliva <oliva@xxxxxxx>

Instead of crashing, just warn about p not being the initial entry in
old_inodes.

Signed-off-by: Alexandre Oliva <oliva@xxxxxxx>
---
 src/mds/MDCache.cc |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc
index 58a8b8a..32faf396 100644
--- a/src/mds/MDCache.cc
+++ b/src/mds/MDCache.cc
@@ -1763,7 +1763,13 @@ void MDCache::project_rstat_frag_to_inode(nest_info_t& rstat, nest_info_t& accou
 	first = p->second.first;
 	if (first > last) {
 	  dout(10) << " oldest old_inode is [" << first << "," << p->first << "], done." << dendl;
-	  assert(p == pin->old_inodes.begin());
+	  if (p != pin->old_inodes.begin())
+	    dout(0) << " hmm, " << p->first
+		    << " is not the first in old_inodes; "
+		    << (pin->old_inodes.begin() != pin->old_inodes.end()
+			? pin->old_inodes.begin()->first
+			: snapid_t (CEPH_NOSNAP))
+		    << " is" << dendl;
 	  break;
 	}
 	if (p->first > last) {

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux