Skip to contentSkip to conversation

Segfault when transid verify fails

DISCUSSION Michal Hrusecky 1 participant 2 messages Dec 4, 2009 – Dec 5, 2009 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hi,

I'm trying to use btrfs on my other Linux installation as a root filesystem. Somehow I cannot boot any longer and I've got dmesg full of repeating error lines. So I booted up my other Linux system and tried to run btrfsck, but it segfaults after producing similar error message:

# btrfsck /dev/disk/by-label/suse
parent transid verify failed on 67510272 wanted 352 found 394
Segmentation fault

I tried both btrfs-progs 0.19 and current git of btrfs-progs. I'm running 2.6.32 vanilla kernel. I can provide strace and probably try to obtain some backtrace, but I guess as I cannot boot system with this rootfs that the error will be somewhere deeper...

Best Regards,
Michal HRUSECKY

#1 lore raw
Quoted 7 lines · Michal Hrusecky - 13:28 4.12.09 wrote:

Hi,

I'm trying to use btrfs on my other Linux installation as a root filesystem. Somehow I cannot boot any longer and I've got dmesg full of repeating error lines. So I booted up my other Linux system and tried to run btrfsck, but it segfaults after producing similar error message:

Quoted 8 lines
# btrfsck /dev/disk/by-label/suse
parent transid verify failed on 67510272 wanted 352 found 394
Segmentation fault

I tried both btrfs-progs 0.19 and current git of btrfs-progs. I'm running 2.6.32 vanilla kernel. I can provide strace and probably try to obtain some backtrace, but I guess as I cannot boot system with this rootfs that the error will be somewhere deeper...

Attaching backtrace.

My guess is that this is a bug and kernel shouldn't be stuck in endless loop and btrfsck shouldn't crash, but suggest some solution. Didn't found btrfs bugzilla so reporting via mailing list.

Bets Regards,
Michal Hrusecky

GNU gdb (Gentoo 7.0 p1) 7.0
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /sbin/btrfsck...done.
(gdb) run /dev/sda3
Starting program: /sbin/btrfsck /dev/sda3

Program received signal SIGSEGV, Segmentation fault.
find_first_block_group (root=0x6231b0, path=0x624650, key=0x7fffffffdbe0) at ctree.h:1411
in ctree.h
(gdb) bt full
#0 find_first_block_group (root=0x6231b0, path=0x624650, key=0x7fffffffdbe0) at ctree.h:1411
ret = <value optimized out>
leaf = 0x0
slot = 0
#1 0x000000000040e6d0 in btrfs_read_block_groups (root=<value optimized out>) at extent-tree.c:3072

        path = 0x624650
        ret = 506462208
        bit = 4
        cache = 0x624e30
        info = 0x623830
        space_info = 0x624eb0
        block_group_cache = 0x623908
        key = {objectid = 540016640, type = 192 '\300', offset = 0}
        found_key = {objectid = 33554432, type = 192 '\300', offset = 506462208}
        leaf = <value optimized out>
        __PRETTY_FUNCTION__ = "btrfs_read_block_groups"
#2  0x000000000040c3a5 in open_ctree_fd (fp=<value optimized out>, path=<value optimized out>, sb_bytenr=<value optimized out>, 
    writes=<value optimized out>) at disk-io.c:760
        sectorsize = <value optimized out>
        nodesize = 4096
        leafsize = 4096
        blocksize = <value optimized out>
        stripesize = <value optimized out>
        generation = <value optimized out>
        key = {objectid = 0, type = 53 '5', offset = 549755281190}
        tree_root = 0x623010
        extent_root = 0x6231b0
        chunk_root = <value optimized out>
        dev_root = 0x6234f0
        csum_root = 0x623690
        fs_info = 0x623830
        ret = <value optimized out>
        fs_devices = 0x6255e0
        total_devs = 1
        features = <value optimized out>
        __PRETTY_FUNCTION__ = "open_ctree_fd"

#3 0x000000000040c469 in open_ctree (filename=0x7fffffffe1b1 "/dev/sda3", sb_bytenr=0, writes=0) at disk-io.c:587
fp = 0
root = <value optimized out>
flags = <value optimized out>
#4 0x0000000000405b1f in main (ac=<value optimized out>, av=0x7fffffffde78) at btrfsck.c:2824
root_cache = {root = {rb_node = 0x0, rotate_notify = 0x41a745 <__libc_csu_init+69>}} root = <value optimized out>
ret = <value optimized out>
(gdb) quit
A debugging session is active.

Inferior 1 [process 28846] will be killed.

Quit anyway? (y or n)