Bug 852836 - btrfsck crashes and dumps core
Summary: btrfsck crashes and dumps core
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: btrfs-progs
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Josef Bacik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-29 17:56 UTC by kuchiman
Modified: 2013-08-01 01:29 UTC (History)
5 users (show)

Fixed In Version:
Clone Of: 682865
Environment:
Last Closed: 2013-08-01 01:29:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description kuchiman 2012-08-29 17:56:19 UTC
+++ This bug was initially created as a clone of Bug #682865 +++

Created attachment 482781 [details]
xz'ed core file of btrfsck run

I've had a number of oopses from btrfs related problems lately on 2.6.38, so I booted my laptop up to a live cd, installed btrfs-progs and ran btrfsck on the partition to see if it was corrupt.

Here's what I get:

# btrfsck /dev/sda3
bad key ordering 22 23
bad block 6571188224
btrfsck: btrfsck.c:2390: process_extent_item: Assertion `!(item_size != sizeof(*ei0))' failed.
Aborted (core dumped)

...sadly, I'm going to have to rebuild the filesystem as I really need my laptop, but I saved off the core for analysis.

The btrfs-progs version is:

    btrfs-progs-0.19-12.fc14.x86_64

--- Additional comment from jvillain on 2011-08-06 17:12:38 EDT ---

Some thing similar in rawhide


I have a luks encrypted /home dir that is formatted with btrfs. My laptop just crashes when it tries to mount my home dir. To see what was going on I remarked my /home dir in my fstab and then went through the steps preparing the partition for mounting (unlock luks, prep the logical volume etc) . Then just before mounting I ran a btrfs on the partition. It accepted that there was a btrfs file system there and checked for about 15 seconds before crashing. There may or may not be an issue with the filesystem but we shouldn't crash while checking it. Let me know if you want the core or any more info.

____________________________________________________________________

  [root@pete ~]# btrfsck /dev/mapper/luks-5a12356f-3fc6-4685-8ee0-39da541a481f 
root 5 inode 66842 errors 400
root 5 inode 73393 errors 400
root 5 inode 73418 errors 400
root 5 inode 73433 errors 400
root 5 inode 73447 errors 400
root 5 inode 73482 errors 400
root 5 inode 73499 errors 400
root 5 inode 73511 errors 400
root 5 inode 73532 errors 400
root 5 inode 73544 errors 400
root 5 inode 120158 errors 400
root 5 inode 120160 errors 400
root 5 inode 120168 errors 400
root 5 inode 122203 errors 400
root 5 inode 122205 errors 400
root 5 inode 122213 errors 400
root 5 inode 298064 errors 400
root 258 root dir 256 error
*** glibc detected *** btrfsck: double free or corruption (!prev): 0x0000000001dcfb10 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x78666)[0x7f919c087666]
btrfsck[0x40c703]
btrfsck[0x40164e]
/lib64/libc.so.6(__libc_start_main+0xed)[0x7f919c03050d]
btrfsck[0x401a19]
======= Memory map: ========
00400000-00425000 r-xp 00000000 00:13 1102343                            /sbin/btrfsck
00624000-00625000 rw-p 00024000 00:13 1102343                            /sbin/btrfsck
01dc0000-01dec000 rw-p 00000000 00:00 0                                  [heap]
3d74e00000-3d74e15000 r-xp 00000000 00:13 862823                         /lib64/libgcc_s-4.6.1-20110715.so.1
3d74e15000-3d75014000 ---p 00015000 00:13 862823                         /lib64/libgcc_s-4.6.1-20110715.so.1
3d75014000-3d75015000 rw-p 00014000 00:13 862823                         /lib64/libgcc_s-4.6.1-20110715.so.1
7f919c00f000-7f919c1b3000 r-xp 00000000 00:13 944887                     /lib64/libc-2.14.90.so
7f919c1b3000-7f919c3b3000 ---p 001a4000 00:13 944887                     /lib64/libc-2.14.90.so
7f919c3b3000-7f919c3b7000 r--p 001a4000 00:13 944887                     /lib64/libc-2.14.90.so
7f919c3b7000-7f919c3b8000 rw-p 001a8000 00:13 944887                     /lib64/libc-2.14.90.so
7f919c3b8000-7f919c3be000 rw-p 00000000 00:00 0 
7f919c3be000-7f919c3c2000 r-xp 00000000 00:13 1060366                    /lib64/libuuid.so.1.3.0
7f919c3c2000-7f919c5c1000 ---p 00004000 00:13 1060366                    /lib64/libuuid.so.1.3.0
7f919c5c1000-7f919c5c2000 r--p 00003000 00:13 1060366                    /lib64/libuuid.so.1.3.0
7f919c5c2000-7f919c5c3000 rw-p 00004000 00:13 1060366                    /lib64/libuuid.so.1.3.0
7f919c5c3000-7f919c5e4000 r-xp 00000000 00:13 944880                     /lib64/ld-2.14.90.so
7f919c7c4000-7f919c7c7000 rw-p 00000000 00:00 0 
7f919c7e2000-7f919c7e4000 rw-p 00000000 00:00 0 
7f919c7e4000-7f919c7e5000 r--p 00021000 00:13 944880                     /lib64/ld-2.14.90.so
7f919c7e5000-7f919c7e6000 rw-p 00022000 00:13 944880                     /lib64/ld-2.14.90.so
7f919c7e6000-7f919c7e7000 rw-p 00000000 00:00 0 
7ffffe3f9000-7ffffe41a000 rw-p 00000000 00:00 0                          [stack]
7ffffe51b000-7ffffe51c000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)
_____________________________________________________________________________

3.1.0-0.rc0.git21.1.fc17.x86_64 #1 SMP Fri Aug 5 15:35:52 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

I have tried with 3 different kernels I have also tried with both 

btrfs-progs-0.19-14.fc17.x86_64
btrfs-progs-0.19-16.fc17.x86_64

--- Additional comment from jvillain on 2011-08-06 17:15:56 EDT ---

Forgot glibc-2.14.90-4.x86_64

--- Additional comment from jvillain on 2011-08-06 17:43:38 EDT ---

I found the thread on the mailing list about running  btrfs-zero-log and the first time I ran it I got the following. I ran it again and it completed sucessfully. 

[root@pete ~]# btrfs-zero-log  /dev/mapper/luks-5a12356f-3fc6-4685-8ee0-39da541a481f 
*** glibc detected *** btrfs-zero-log: double free or corruption (!prev): 0x00000000024f9b10 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x78666)[0x7fc1792a8666]
btrfs-zero-log[0x407863]
btrfs-zero-log[0x4013df]
/lib64/libc.so.6(__libc_start_main+0xed)[0x7fc17925150d]
btrfs-zero-log[0x4014a1]
======= Memory map: ========
00400000-0041f000 r-xp 00000000 00:13 1103203                            /sbin/btrfs-zero-log
0061e000-0061f000 rw-p 0001e000 00:13 1103203                            /sbin/btrfs-zero-log
024ea000-028dd000 rw-p 00000000 00:00 0                                  [heap]
3d74e00000-3d74e15000 r-xp 00000000 00:13 862823                         /lib64/libgcc_s-4.6.1-20110715.so.1
3d74e15000-3d75014000 ---p 00015000 00:13 862823                         /lib64/libgcc_s-4.6.1-20110715.so.1
3d75014000-3d75015000 rw-p 00014000 00:13 862823                         /lib64/libgcc_s-4.6.1-20110715.so.1
7fc179230000-7fc1793d4000 r-xp 00000000 00:13 944887                     /lib64/libc-2.14.90.so
7fc1793d4000-7fc1795d4000 ---p 001a4000 00:13 944887                     /lib64/libc-2.14.90.so
7fc1795d4000-7fc1795d8000 r--p 001a4000 00:13 944887                     /lib64/libc-2.14.90.so
7fc1795d8000-7fc1795d9000 rw-p 001a8000 00:13 944887                     /lib64/libc-2.14.90.so
7fc1795d9000-7fc1795df000 rw-p 00000000 00:00 0 
7fc1795df000-7fc1795e3000 r-xp 00000000 00:13 1060366                    /lib64/libuuid.so.1.3.0
7fc1795e3000-7fc1797e2000 ---p 00004000 00:13 1060366                    /lib64/libuuid.so.1.3.0
7fc1797e2000-7fc1797e3000 r--p 00003000 00:13 1060366                    /lib64/libuuid.so.1.3.0
7fc1797e3000-7fc1797e4000 rw-p 00004000 00:13 1060366                    /lib64/libuuid.so.1.3.0
7fc1797e4000-7fc179805000 r-xp 00000000 00:13 944880                     /lib64/ld-2.14.90.so
7fc1799e5000-7fc1799e8000 rw-p 00000000 00:00 0 
7fc179a03000-7fc179a05000 rw-p 00000000 00:00 0 
7fc179a05000-7fc179a06000 r--p 00021000 00:13 944880                     /lib64/ld-2.14.90.so
7fc179a06000-7fc179a07000 rw-p 00022000 00:13 944880                     /lib64/ld-2.14.90.so
7fc179a07000-7fc179a08000 rw-p 00000000 00:00 0 
7fff480ce000-7fff480ef000 rw-p 00000000 00:00 0                          [stack]
7fff481ff000-7fff48200000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)
----------------------------------------------------------------------------

After that I was able to run an fsck with out crashing. But with lots of errors detected.

_________________________________________________________________________

[root@pete ~]# btrfsck /dev/mapper/luks-5a12356f-3fc6-4685-8ee0-39da541a481f 
root 5 inode 66842 errors 400
root 5 inode 73393 errors 400
root 5 inode 73418 errors 400
root 5 inode 73433 errors 400
root 5 inode 73447 errors 400
root 5 inode 73482 errors 400
root 5 inode 73499 errors 400
root 5 inode 73511 errors 400
root 5 inode 73532 errors 400
root 5 inode 73544 errors 400
root 5 inode 120158 errors 400
root 5 inode 120160 errors 400
root 5 inode 120168 errors 400
root 5 inode 122203 errors 400
root 5 inode 122205 errors 400
root 5 inode 122213 errors 400
root 5 inode 298064 errors 400
root 258 root dir 256 error
found 94704238592 bytes used err is 1
total csum bytes: 92282384
total tree bytes: 198377472
total fs tree bytes: 74080256
btree space waste bytes: 34120034
file data blocks allocated: 95459762176
 referenced 94206832640
Btrfs Btrfs v0.19

___________________________________________________________________

But at least I can now mount my /home dir

--- Additional comment from endoflife on 2012-08-16 09:38:06 EDT ---

This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 1 kuchiman 2012-08-29 17:57:53 UTC
[root@localhost ~]# btrfsck /dev/sdb5
checking extents
checking fs roots
root 5 inode 253687 errors 400
root 5 inode 318445 errors 400
root 5 inode 525323 errors 400
root 5 inode 530413 errors 400
root 5 inode 544667 errors 400
root 5 inode 544668 errors 400
root 5 inode 544670 errors 400
root 5 inode 544671 errors 400
root 5 inode 545239 errors 400
root 5 inode 545240 errors 400
root 5 inode 545241 errors 400
root 5 inode 545242 errors 400
root 5 inode 545243 errors 400
root 5 inode 545244 errors 400
root 5 inode 545245 errors 400
root 5 inode 545246 errors 400
root 5 inode 545247 errors 400
root 5 inode 545248 errors 400
root 5 inode 545249 errors 400
root 5 inode 545250 errors 400
root 5 inode 545251 errors 400
root 5 inode 545252 errors 400
root 5 inode 545253 errors 400
root 5 inode 545254 errors 400
root 5 inode 545255 errors 400
root 5 inode 545256 errors 400
root 5 inode 545258 errors 400
root 5 inode 545259 errors 400
root 5 inode 545260 errors 400
root 5 inode 545261 errors 400
root 5 inode 545262 errors 400
root 5 inode 545264 errors 400
root 5 inode 545265 errors 400
root 5 inode 545266 errors 400
root 5 inode 545267 errors 400
root 5 inode 545269 errors 400
root 5 inode 545270 errors 400
root 5 inode 545271 errors 400
root 5 inode 545272 errors 400
root 5 inode 545273 errors 400
root 5 inode 545274 errors 400
root 5 inode 545275 errors 400
root 5 inode 545276 errors 400
root 5 inode 545277 errors 400
root 5 inode 545278 errors 400
root 5 inode 545279 errors 400
root 5 inode 545280 errors 400
root 5 inode 545312 errors 400
root 5 inode 623313 errors 400
root 5 inode 630869 errors 400
root 5 inode 630912 errors 400
root 5 inode 630955 errors 400
root 5 inode 630986 errors 400
root 5 inode 631940 errors 400
root 5 inode 632077 errors 400
root 5 inode 632086 errors 400
root 5 inode 632088 errors 400
root 5 inode 640852 errors 400
root 5 inode 653097 errors 400
root 5 inode 653098 errors 400
root 5 inode 663961 errors 400
*** glibc detected *** btrfsck: double free or corruption (!prev): 0x0000000001623c00 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3372a7bfee]
btrfsck[0x40de46]
btrfsck[0x401a2d]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x3372a21735]
btrfsck[0x401e81]
======= Memory map: ========
00400000-00429000 r-xp 00000000 08:05 154496                             /usr/sbin/btrfsck
00628000-0062a000 rw-p 00028000 08:05 154496                             /usr/sbin/btrfsck
01610000-05344000 rw-p 00000000 00:00 0                                  [heap]
3372600000-3372620000 r-xp 00000000 08:05 134506                         /usr/lib64/ld-2.15.so
337281f000-3372820000 r--p 0001f000 08:05 134506                         /usr/lib64/ld-2.15.so
3372820000-3372821000 rw-p 00020000 08:05 134506                         /usr/lib64/ld-2.15.so
3372821000-3372822000 rw-p 00000000 00:00 0 
3372a00000-3372bac000 r-xp 00000000 08:05 134507                         /usr/lib64/libc-2.15.so
3372bac000-3372dac000 ---p 001ac000 08:05 134507                         /usr/lib64/libc-2.15.so
3372dac000-3372db0000 r--p 001ac000 08:05 134507                         /usr/lib64/libc-2.15.so
3372db0000-3372db2000 rw-p 001b0000 08:05 134507                         /usr/lib64/libc-2.15.so
3372db2000-3372db7000 rw-p 00000000 00:00 0 
3376e00000-3376e15000 r-xp 00000000 08:05 135641                         /usr/lib64/libgcc_s-4.7.0-20120507.so.1
3376e15000-3377014000 ---p 00015000 08:05 135641                         /usr/lib64/libgcc_s-4.7.0-20120507.so.1
3377014000-3377015000 rw-p 00014000 08:05 135641                         /usr/lib64/libgcc_s-4.7.0-20120507.so.1
337c600000-337c604000 r-xp 00000000 08:05 135362                         /usr/lib64/libuuid.so.1.3.0
337c604000-337c803000 ---p 00004000 08:05 135362                         /usr/lib64/libuuid.so.1.3.0
337c803000-337c804000 r--p 00003000 08:05 135362                         /usr/lib64/libuuid.so.1.3.0
337c804000-337c805000 rw-p 00004000 08:05 135362                         /usr/lib64/libuuid.so.1.3.0
7f9ecd4d4000-7f9ecd4d7000 rw-p 00000000 00:00 0 
7f9ecd4e6000-7f9ecd4e8000 rw-p 00000000 00:00 0 
7fff3bb35000-7fff3bb56000 rw-p 00000000 00:00 0                          [stack]
7fff3bbff000-7fff3bc00000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted

Comment 2 Josef Bacik 2012-11-01 19:59:49 UTC
Just pushed 0.20 out, can you give that a shot and see if the same problem happens?

Comment 3 Fedora End Of Life 2013-07-03 23:07:03 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2013-08-01 01:29:31 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.