From: Dave Chinner <david@fromorbit.com>
To: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: xfs@oss.sgi.com
Subject: Re: xfs_repair fails to repair, run under valgrind shows "Invalid read..." and XFS_CORRUPTION_ERROR
Date: Wed, 12 Feb 2014 07:43:31 +1100 [thread overview]
Message-ID: <20140211204331.GL13647@dastard> (raw)
In-Reply-To: <52FA8021.9050604@linux.vnet.ibm.com>
On Tue, Feb 11, 2014 at 11:55:13AM -0800, Cody P Schafer wrote:
> xfsprogs version: v3.2.0-alpha2-14-g6e79202
>
> uname: Linux hostname 3.11.10-301.fc20.ppc64 #1 SMP Tue Dec 10
> 00:35:15 MST 2013 ppc64 POWER8 (architected), altivec supported CHRP
> IBM,8286-42A GNU/Linux
>
> full log attached.
>
> syncop8lp7 xfsprogs # valgrind ./repair/xfs_repair -n /dev/sda5
.....
Runs fine becuase it doesn't try to fix and write changes.
> ==6601== Memcheck, a memory error detector
> ==6601== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
> ==6601== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
> ==6601== Command: ./repair/xfs_repair -n /dev/sda5
> ==6601==
> --6601-- WARNING: Serious error when reading debug info
> --6601-- When reading debug info from /usr/lib64/valgrind/memcheck-ppc64-linux:
Ok, so you're on ppc64. Big endian or little endian?
> syncop8lp7 xfsprogs # valgrind ./repair/xfs_repair /dev/sda5
....
> resetting inode 67687581 nlinks from 4 to 3
> xfs_dir3_data_write_verify: XFS_CORRUPTION_ERROR
> libxfs_writebufr: write verifer failed on bno 0x3239040/0x1000
> Invalid inode number 0xfeffffffffffffff
That's the smoking gun - the dirents in the rebuilt directory have
invalid inode numbers. They all have the same invalid inode number,
which indicates a bug in the directory reconstruction.
Can you provide a metadump of the broken filesystem to one of us fo
deeper inspection?
FWIW, the write verifiers have once again done their job - catching
corruptions caused by software bugs and preventing them from causing
further corruption to the filesystem...
> libxfs_writebufr: write verifer failed on bno 0x3298f38/0x1000
> ==6700== Syscall param pwrite64(buf) points to uninitialised byte(s)
> ==6700== at 0x40F810C: pwrite64 (pwrite64.c:51)
> ==6700== by 0x1003ABDB: __write_buf (rdwr.c:801)
> ==6700== by 0x1003C1B7: libxfs_writebufr (rdwr.c:863)
> ==6700== by 0x10036C4F: cache_flush (cache.c:600)
> ==6700== by 0x1003C77B: libxfs_bcache_flush (rdwr.c:994)
> ==6700== by 0x10004C6B: main (xfs_repair.c:886)
> ==6700== Address 0xbeb0622 is 34 bytes inside a block of size 4,096 alloc'd
> ==6700== at 0x406631C: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-ppc64-linux.so)
> ==6700== by 0x1003ADEF: __initbuf (rdwr.c:367)
> ==6700== by 0x1003B797: libxfs_getbufr_map (rdwr.c:416)
> ==6700== by 0x100365C3: cache_node_get (cache.c:273)
> ==6700== by 0x1003A8DB: __cache_lookup (rdwr.c:519)
> ==6700== by 0x1003BA6F: libxfs_getbuf_map (rdwr.c:601)
> ==6700== by 0x1003D333: libxfs_trans_get_buf_map (trans.c:525)
> ==6700== by 0x10059A3B: xfs_da_get_buf (xfs_da_btree.c:2580)
> ==6700== by 0x10060E27: xfs_dir3_data_init (xfs_dir2_data.c:558)
> ==6700== by 0x1006407F: xfs_dir2_leaf_addname (xfs_dir2_leaf.c:826)
> ==6700== by 0x1005D59B: xfs_dir_createname (xfs_dir2.c:233)
> ==6700== by 0x100290D3: mv_orphanage (phase6.c:1205)
And that looks kinda related. This has been triggered by the write
of a directory buffer that was created during lost+found processing,
and is a prime candidate for incorrect reconstruction. What is the
head commit of the repo you built this xfs_repair binary from, and
what version of gcc did you use?
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-02-11 20:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-11 19:55 xfs_repair fails to repair, run under valgrind shows "Invalid read..." and XFS_CORRUPTION_ERROR Cody P Schafer
2014-02-11 20:11 ` Eric Sandeen
2014-02-11 20:18 ` Cody P Schafer
2014-02-11 20:43 ` Dave Chinner [this message]
2014-02-11 21:06 ` Cody P Schafer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140211204331.GL13647@dastard \
--to=david@fromorbit.com \
--cc=cody@linux.vnet.ibm.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.