linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* btrfs unmountable, any btrfs tool segfaults
@ 2014-08-23 16:39 Nikolay Shtabel
  2014-08-24  1:21 ` Duncan
  0 siblings, 1 reply; 4+ messages in thread
From: Nikolay Shtabel @ 2014-08-23 16:39 UTC (permalink / raw)
  To: linux-btrfs

Hello,

I'm using archinux with btrfs as root filesystem, kernel 3.15.2, btrfs 3.14.2.

System was working fine for more than year, but suddenly
after large pacman update filesystem came to
unrecoverable error (remounted root ro).

I've decided to reboot, and after that btrfs failed to mount:

[ 1673.285020] BTRFS: bad tree block start 0 471748608
[ 1673.285071] BTRFS: bad tree block start 0 471748608
[ 1673.317384] BTRFS: open_ctree failed

When trying to mount with -o ro, recovery:

[ 1788.777081] BTRFS info (device sdc2): enabling auto recovery
[ 1788.777088] BTRFS info (device sdc2): disk space caching is enabled
[ 1788.778502] BTRFS: bad tree block start 0 471748608
[ 1788.778577] BTRFS: bad tree block start 0 471748608
[ 1788.778657] BTRFS: bad tree block start 0 471748608
[ 1788.778774] BTRFS: bad tree block start 0 471748608
[ 1788.778990] BTRFS: bad tree block start 0 260931584
[ 1788.779221] BTRFS: bad tree block start 0 260931584
[ 1788.779236] BTRFS: failed to read tree root on sdc2
[ 1788.779563] parent transid verify failed on 260562944 wanted 427348
found 427351
[ 1788.779907] parent transid verify failed on 260562944 wanted 427348
found 427351
[ 1788.779908] BTRFS: failed to read tree root on sdc2
[ 1788.780288] parent transid verify failed on 260358144 wanted 427347
found 427351
[ 1788.780571] parent transid verify failed on 260358144 wanted 427347
found 427351
[ 1788.780575] BTRFS: failed to read tree root on sdc2
[ 1788.844215] BTRFS: open_ctree failed

Then, i've tried to btrfs check:

Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
read block failed check_tree_block
Couldn't setup extent tree
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
read block failed check_tree_block
Couldn't setup csum tree
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
read block failed check_tree_block
Checking filesystem on /dev/sdc2
UUID: 9b5edd54-b3cb-4882-b8d5-ede68717e0aa
Critical roots corrupted, unable to fsck the FS
Segmentation fault
(btrfs[5049]: segfault at 1d3 ip 000000000042e35d sp 00007fff6b317870
error 4 in btrfs[400000+6b000])

As there are errors with csum and extent tree i've tried to reinit them also:

btrfs check --init-csum-tree:

Creating a new CRC tree
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
read block failed check_tree_block
Couldn't setup extent tree
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
read block failed check_tree_block
Couldn't setup csum tree
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
read block failed check_tree_block
Checking filesystem on /dev/sdc2
UUID: 9b5edd54-b3cb-4882-b8d5-ede68717e0aa
Reinit crc root
Unable to find block group for 0
btrfs: extent-tree.c:288: find_search_start: Assertion `!(1)' failed.
Aborted

btrfs check --init-extent-tree:

Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
read block failed check_tree_block
Couldn't setup extent tree
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
read block failed check_tree_block
Couldn't setup csum tree
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
read block failed check_tree_block
Checking filesystem on /dev/sdc2
UUID: 9b5edd54-b3cb-4882-b8d5-ede68717e0aa
Creating a new extent tree
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
read block failed check_tree_block
Error reading root block
error pinning down used bytes
Segmentation fault
([ 2816.659245] btrfs[5068]: segfault at 1d3 ip 000000000042e35d sp
00007fffc2052420 error 4 in btrfs[400000+6b000])

After all, the last step is to use btrfs restore:

btrfs restore -iv /dev/sdc2 /mnt/restore/
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
read block failed check_tree_block
Couldn't setup extent tree
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
read block failed check_tree_block
Couldn't setup csum tree
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
read block failed check_tree_block
Segmentation fault
[ 3324.252370] btrfs[32022]: segfault at fffffffffffffffb ip
000000000042a763 sp 00007fff14488690 error 5 in btrfs[400000+6b000]

I've tried this with latest btrfs-progs built from git.

Can you please suggest any method to restore files from filesystem?

Thanks!

Nikolay Shtabel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-24 15:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-23 16:39 btrfs unmountable, any btrfs tool segfaults Nikolay Shtabel
2014-08-24  1:21 ` Duncan
2014-08-24  3:07   ` Marc MERLIN
2014-08-24 15:48   ` Nikolay Shtabel

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).