From: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
To: Robert Krig <robert.krig@render-wahnsinn.de>,
linux-btrfs@vger.kernel.org
Subject: Re: Need some help: "BTRFS critical (device sda): corrupt leaf, slot offset bad: block"
Date: Mon, 3 Apr 2017 16:08:41 +0200 [thread overview]
Message-ID: <c304c651-88fc-4699-3518-c4e83095d9c0@mendix.com> (raw)
In-Reply-To: <635a5ca8-9fa5-6cd4-21b5-97f9f3db93d3@render-wahnsinn.de>
On 04/03/2017 12:11 PM, Robert Krig wrote:
> Hi guys, I seem to have run into a spot of trouble with my btrfs partition.
>
> I've got 4 x 8TB in a RAID1 BTRFS configuration.
>
> I'm running Debian Jessie 64 Bit, 4.9.0-0.bpo.2-amd64 kernel. Btrfs
> progs version v4.7.3
>
> Server has 8GB of Ram.
>
>
> I was running duperemove using a hashfile, which seemed to have run out
> space and aborted. Then I tried a balance operation, with -dusage
> progressively set to 0 1 5 15 30 50, which then aborted, I presume that
> this caused the fs to mount readonly. I only noticed it somewhat later.
The balance probably did not cause the issue, but it ran across the
invalid metadata page, while digging around in the filesyste and then
choked on it.
> I've since rebooted, and I can mount the filesystem OK, but after some
> time (I presume caused by reads or writes) it once again switches to
> readonly.
>
> I tried unmounting/remounting again and running a scrub, but the scrub
> aborts after some time.
>
>
> Here is the output from the kernel when the partition crashes:
>
> Apr 03 11:32:57 atlas kernel: BTRFS info (device sda): The free space
> cache file (37732863967232) is invalid. skip it
> Apr 03 11:33:46 atlas kernel: BTRFS critical (device sda): corrupt leaf,
> slot offset bad: block=38666170826752, root=1, slot=157
> [...]
Note: The root=1 is a lie? Looking at the output of btrfs-debug-tree
below, this is definitely a tree block of tree 2, not 1. I have seen
this more often, but not looked at the code yet. Maybe some bug in
assembling the error message?
> I tried running a btrfs-debug-tree -b 38666170826752 /dev/sda
>
> btrfs-progs
> v4.7.3
>
> leaf 38666170826752 items 199 free space 1506 generation 1248226 owner
> 2
>
> fs uuid
> 8c4f8e26-3442-463f-ad8a-668dfef02593
>
> chunk uuid
> 1f04f64e-0ec8-4b39-83d9-a2df75179d3e
>
> item 0 key (23416295448576 EXTENT_ITEM 36864) itemoff 16230
> itemsize
> 53
>
> extent refs 1 gen 671397 flags
> DATA
>
> extent data backref root 5 objectid 4959957 offset 0
> count
> 1
>
> [...]
The corruption is at item 157. Can you attach all of the output, or
pastebin it?
> this goes on and on. I can provide the entire output if thats helpful.
Yes. The corruption is in item 157, and then from the point of the
itemoff value. This is the offset of the item data in the metadata page.
See https://btrfs.wiki.kernel.org/index.php/On-disk_Format#Leaf_Node
> Any ideas on what I could do to fix the partition? Is it fixable, or is
> it a lost cause?
Memory corruption, not on disk corruption.
So, either a bitflip, or garbage which ended up on this memory location
for whatever reason or a bug in whatever part of the kernel, a pointer
in another module gone wonky, etc, which we might learn more about after
seeing more of the output.
--
Hans van Kranenburg
next prev parent reply other threads:[~2017-04-03 14:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 10:11 Need some help: "BTRFS critical (device sda): corrupt leaf, slot offset bad: block" Robert Krig
2017-04-03 13:50 ` Robert Krig
2017-04-03 14:09 ` Hans van Kranenburg
2017-04-03 14:08 ` Hans van Kranenburg [this message]
2017-04-03 14:20 ` Robert Krig
2017-04-03 14:25 ` Robert Krig
2017-04-04 4:02 ` Robert Krig
2017-04-04 13:29 ` Brian B
2017-04-04 13:48 ` Hugo Mills
2017-04-04 13:52 ` Austin S. Hemmelgarn
2017-04-04 16:52 ` Chris Murphy
2017-04-04 16:55 ` Chris Murphy
2017-04-05 6:07 ` Robert Krig
2017-04-03 14:44 ` Hans van Kranenburg
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=c304c651-88fc-4699-3518-c4e83095d9c0@mendix.com \
--to=hans.van.kranenburg@mendix.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=robert.krig@render-wahnsinn.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).