BTRFS - btrfsck: Segmentation fault (core dumped)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
btrfs-tools (Ubuntu) |
Fix Released
|
High
|
Dimitri John Ledkov | ||
Trusty |
Fix Released
|
High
|
Dimitri John Ledkov |
Bug Description
[Impact]
* fsck fails and uses incorrect sector size
[Test Case]
* see below
[Regression Potential]
* low, upstream patch used and tested in all later releases
== Comment: #0 - ABDUL HALEEM <email address hidden> - 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.
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_
export SCRATCH_
5. run the test : ./check btrfs/060
6. test failed with errors in dmesg and the command btrfsck core dumped.
root@ubuntu:
QA output created by 060
Silence is golden
./common/rc: line 1932: 3378 Segmentation fault btrfsck $device > $tmp.fsck 2>&1
_check_
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 <email address hidden> - 2015-02-18 10:11:23 ==
The following upstream commit will fix the issue:
2c0e02a568c7db9
Author: David Sterba <email address hidden>
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 <email address hidden>
Without this patch, In io_ctl_check_crc(), we end up passing an incorrect "length" value to the crc32c_le() function.
The patch (2c0e02a568c7db
affects: | ubuntu → btrfs (Ubuntu) |
Changed in btrfs (Ubuntu): | |
assignee: | Taco Screen team (taco-screen-team) → Dimitri John Ledkov (xnox) |
tags: |
added: verification-done removed: verification-needed |
tags: |
added: targetmilestone-inin1604 removed: targetmilestone-inin--- |
Default Comment by Bridge