Bug 72151
Summary: | Btrfs is corrupted and "brtfs check" craches during recovery | ||
---|---|---|---|
Product: | File System | Reporter: | ar.fahrutdinov |
Component: | btrfs | Assignee: | Josef Bacik (josef) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | dpisklov, dsterba, leho, mail |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.13 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
dmesg and strace btrfs check logs
btrfs rescue chunk-recover -v /dev/sda1 |
Description
ar.fahrutdinov
2014-03-15 12:40:21 UTC
Created attachment 129501 [details]
btrfs rescue chunk-recover -v /dev/sda1
btrfsck --repair --init-extent-tree --init-csum-tree /dev/sda1 enabling repair mode Creating a new CRC tree Check tree block failed, want=54231040, have=18446744073709551615 Check tree block failed, want=54231040, have=18446744073709551615 Check tree block failed, want=54231040, have=18446744073709551615 Check tree block failed, want=54231040, have=18446744073709551615 Check tree block failed, want=54231040, have=18446744073709551615 read block failed check_tree_block Couldn't setup log root tree Checking filesystem on /dev/sda1 UUID: 77de157d-afb1-4774-b944-6cd086b42a7c Creating a new extent tree btrfsck: ctree.c:297: __btrfs_cow_block: Assertion `!(!(buf->flags & (1 << 10)) && btrfs_header_generation(buf) > trans->transid)' failed. zsh: abort btrfsck --repair --init-extent-tree --init-csum-tree /dev/sda1 I had that exact same behaviour yesterday after a powerloss. Nearly every rescue method in described in the btrfs wiki failed (either errord out, segfaulted or failed an assertion) with either btrfs-progs 3.14, 3.16 or git. The only thing that helped was following this post: http://www.spinics.net/lists/linux-btrfs/msg36714.html Shouldn't that "patch" be made into some sort of option to btrfs-zero-log? Oh and, I wasn't able to btrfs image the filesystem because that also segfaulted. Sorry... (In reply to Max Liebkies from comment #4) > Oh and, I wasn't able to btrfs image the filesystem because that also > segfaulted. Sorry... @Max I've got exacly same thing but didn't try patching yet, will try now. I created https://bugzilla.kernel.org/show_bug.cgi?id=88181 bug but seems it can be closed as duplicate of this one. Also found another one that seems exactly same issue: https://bugzilla.kernel.org/show_bug.cgi?id=87021 *** Bug 88181 has been marked as a duplicate of this bug. *** (In reply to Max Liebkies from comment #3) > I had that exact same behaviour yesterday after a powerloss. Nearly every > rescue method in described in the btrfs wiki failed (either errord out, > segfaulted or failed an assertion) with either btrfs-progs 3.14, 3.16 or > git. > > The only thing that helped was following this post: > http://www.spinics.net/lists/linux-btrfs/msg36714.html > > Shouldn't that "patch" be made into some sort of option to btrfs-zero-log? I absolutely agree, it also solved my problem. That needs to be runtime option or better just delete relevant code path... That's effectively what these patches do (enhance zero-log to fix broken log tree pointer): https://patchwork.kernel.org/patch/5206241/ https://patchwork.kernel.org/patch/5206221/ I'm going to add them to btrfs-progs 3.17.2 release. The bug 87021 is a bit different and the patches will not help (it's not the log tree), though the underlying bug seems to be the same. Fixed in progs 3.17.2 |