[Bug 1438032] Re: BTRFS - btrfsck: Segmentation fault (core dumped)

Dimitri John Ledkov launchpad at surgut.co.uk
Fri Dec 11 13:25:34 UTC 2015


Correcting package name.

This commit is present in vivid and up, thus I understand the request is
to SRU this fix into Ubuntu 14.04 LTS (trusty).

** Package changed: btrfs (Ubuntu) => btrfs-tools (Ubuntu)

** Also affects: btrfs-tools (Ubuntu Trusty)
   Importance: Undecided
       Status: New

** Changed in: btrfs-tools (Ubuntu Trusty)
     Assignee: (unassigned) => Dimitri John Ledkov (xnox)

** Changed in: btrfs-tools (Ubuntu Trusty)
       Status: New => Confirmed

** Changed in: btrfs-tools (Ubuntu Trusty)
   Importance: Undecided => High

** Changed in: btrfs-tools (Ubuntu)
       Status: Confirmed => Fix Released

** Changed in: btrfs-tools (Ubuntu)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to btrfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1438032

Title:
  BTRFS - btrfsck: Segmentation fault (core dumped)

Status in btrfs-tools package in Ubuntu:
  Fix Released
Status in btrfs-tools source package in Trusty:
  Confirmed

Bug description:
  == Comment: #0 - ABDUL HALEEM <abdhalee at in.ibm.com> - 2015-02-13 01:50:18 ==
  *** Problem description ***
  btrfs/060 test of xfstests segfaults with unhandled signal 11 at 00003fff88820000 nip 0000000010065ac0 lr 0000000010065b18 code 30001  messages in dmesg.

  *** uname output ***
  Linux ubuntu 3.18.0-13-generic #14-Ubuntu SMP Fri Feb 6 09:57:41 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux

  *** Steps to reproduce ***
  1. Power8 Machine installed Ubuntu 15.04 on a PowerVM LPAR.
  2. Download git://oss.sgi.com/xfs/cmds/xfstests.git , compile and build
  3. create 6 loop devices with btrfs file system on it.
  4. local.config file will look like this:
  export TEST_DEV=/dev/loop0
  export TEST_DIR=/mnt/test
  export SCRATCH_DEV_POOL="/dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5"
  export SCRATCH_MNT=/mnt/scratch

  5. run the test : ./check  btrfs/060
  6. test failed with errors in dmesg and the command btrfsck core dumped.

  root at ubuntu:~/xfstests# cat /root/xfstests/results/btrfs/060.out.bad
  QA output created by 060
  Silence is golden
  ./common/rc: line 1932:  3378 Segmentation fault      btrfsck $device > $tmp.fsck 2>&1
  _check_btrfs_filesystem: filesystem on /dev/loop1 is inconsistent (see /root/xfstests/results//btrfs/060.full)

  Core file, tests logs and syslogs are attached.

  dmesg logs:
  [  717.146506] BTRFS info (device loop5): disk space caching is enabled
  [  717.150413] BTRFS: creating UUID tree
  [  717.939847] BTRFS info (device loop5): relocating block group 1676083200 flags 9
  [  720.914279] BTRFS info (device loop5): relocating block group 37683200 flags 12
  [  723.476025] BTRFS info (device loop5): found 7 extents
  [  725.093216] BTRFS info (device loop5): relocating block group 20971520 flags 10
  [  726.615751] BTRFS info (device loop5): found 1 extents
  [  727.151299] BTRFS info (device loop5): relocating block group 12582912 flags 1
  [  727.808751] BTRFS info (device loop5): relocating block group 4194304 flags 4
  [  728.294908] BTRFS info (device loop5): relocating block group 0 flags 2
  [  728.780977] BTRFS info (device loop5): found 1 extents
  [  730.204584] btrfsck[3378]: unhandled signal 11 at 00003fff88820000 nip 0000000010065ac0 lr 0000000010065b18 code 30001
  [ 1483.937916] btrfsck[3640]: unhandled signal 11 at 00003fffaa030000 nip 0000000010065ac0 lr 0000000010065b18 code 30001
  [ 1525.291669] btrfsck[3644]: unhandled signal 11 at 00003fffaf300000 nip 0000000010065ac0 lr 0000000010065b18 code 30001

  Thanks

  == Comment: #5 - Chandan B. Rajendra <chrajend at in.ibm.com> - 2015-02-18 10:11:23 ==
  The following upstream commit will fix the issue:

  2c0e02a568c7db99922e9080407f8fc22d1991bd
  Author: David Sterba <dsterba at suse.cz>
  Date:   Wed May 28 11:25:24 2014 +0200

      btrfs-progs: make free space checker work on non-4k sectorsize filesystems
      
      The value of sector for space cache was hardcoded to 4k, and used to
      calculate bitmap sizes.  In kernel, the BITS_PER_BITMAP is derived from
      PAGE_CACHE_SIZE which is not available for userspace, that can also deal
      with filesystem of varying sectorsize.
      
      Signed-off-by: David Sterba <dsterba at suse.cz>

  
  Without this patch, In io_ctl_check_crc(), we end up passing an incorrect "length" value to the crc32c_le() function.

  The patch (2c0e02a568c7db99922e9080407f8fc22d1991bd) needs to picked
  to help resolve this issue on Ubuntu.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/btrfs-tools/+bug/1438032/+subscriptions



More information about the foundations-bugs mailing list