Bug 591055 - Btrfs online balancing crash the kernel
Btrfs online balancing crash the kernel
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Josef Bacik
Red Hat Kernel QE team
:
Depends On:
Blocks: 584197
  Show dependency treegraph
 
Reported: 2010-05-11 06:43 EDT by Eryu Guan
Modified: 2010-11-11 11:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 11:11:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eryu Guan 2010-05-11 06:43:15 EDT
Description of problem:
Btrfs online balancing would crash kernel

Version-Release number of selected component (if applicable):
kernel: 2.6.32-23.el6.x86_64
btrfs-progs: btrfs-progs-0.19-10.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
mkdir -p /mnt/btrfs
dd if=/dev/null of=/home/img0 bs=1G seek=5
dd if=/dev/null of=/home/img1 bs=1G seek=3

for i in 0 1;do losetup /dev/loop$i /home/img$i;done

mkfs.btrfs /dev/loop0
mkfs.btrfs /dev/loop1

mount /dev/loop0 /mnt/btrfs
cp -a /etc /mnt/btrfs
sync

# Add a device
btrfs-vol -a /dev/loop1 /mnt/btrfs
# Balace between devices
btrfs-vol -b /mnt/btrfs
  
Actual results:
Kernel panic

Log from console
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process btrfs-vol (pid: 16970, threadinfo ffff88105ae8a000, task ffff88105b4cca80)
Stack:
 ffff88105ae8bae8 ffffffffa02bf5a9 000000005ae8bad8 ffff88103aa63ad8
<0> 0000000011c00000 0000000011c00001 0000000000000b08 ffff88105c633e80
<0> 0000000000000243 ffff88103aa63890 000000005ae8bb18 0000000000000244
Call Trace:
 [<ffffffffa02bf5a9>] relocate_file_extent_cluster+0x3b9/0x430 [btrfs]
 [<ffffffffa02bf6db>] relocate_data_extent+0xbb/0xe0 [btrfs]
 [<ffffffffa02c5498>] relocate_block_group+0x278/0x480 [btrfs]
 [<ffffffffa02a113b>] ? btrfs_wait_ordered_extents+0x3b/0x1b0 [btrfs]
 [<ffffffffa02c5800>] btrfs_relocate_block_group+0x160/0x35c [btrfs]
 [<ffffffffa02b2a00>] ? btrfs_wake_function+0x0/0x20 [btrfs]
 [<ffffffffa02aae8b>] btrfs_relocate_chunk+0x8b/0x650 [btrfs]
 [<ffffffffa02a7ee0>] ? map_extent_buffer+0xb0/0xc0 [btrfs]
 [<ffffffffa02970b4>] ? btrfs_item_offset+0xe4/0xf0 [btrfs]
 [<ffffffffa02abfcf>] btrfs_balance+0x1ff/0x290 [btrfs]
 [<ffffffffa02b2400>] btrfs_ioctl+0x500/0xa20 [btrfs]
 [<ffffffff8112f3d7>] ? handle_pte_fault+0xf7/0x990
 [<ffffffff8114a307>] ? alloc_pages_current+0x87/0xd0
 [<ffffffff811769d2>] vfs_ioctl+0x22/0xa0
 [<ffffffff81176b74>] do_vfs_ioctl+0x84/0x580
 [<ffffffff811770f1>] sys_ioctl+0x81/0xa0
 [<ffffffff81013132>] system_call_fastpath+0x16/0x1b
Code: 0f 1f 00 48 8b 41 28 83 e0 08 eb ad 0f 1f 80 00 00 00 00 55 48 89 e5 0f 1f 44 00 00 44 8b 4e 10 48 89 d0 48 89 ca 45 85 c9 74 16 <f6> 40 3d 10 75 12 4d 89 c1 48 89 c2 49 89 c8 31 c9 e8 d2 fc ff
RIP  [<ffffffff81112038>] page_cache_sync_readahead+0x18/0x40
 RSP <ffff88105ae8ba48>
CR2: 000000000000003d
---[ end trace d0d0921d39603c1c ]---
Kernel panic - not syncing: Fatal exception
Pid: 16970, comm: btrfs-vol Tainted: G      D    2.6.32-23.el6.x86_64 #1
Call Trace:
 [<ffffffff814c6944>] panic+0x78/0x137
 [<ffffffff814ca8fc>] oops_end+0xdc/0xf0
 [<ffffffff8104226b>] no_context+0xfb/0x260
 [<ffffffff810424f5>] __bad_area_nosemaphore+0x125/0x1e0
 [<ffffffffa02a2147>] ? free_extent_state+0x37/0x60 [btrfs]
 [<ffffffff8104261e>] bad_area+0x4e/0x60
 [<ffffffff814cc476>] do_page_fault+0x3d6/0x3e0
 [<ffffffff814c9c55>] page_fault+0x25/0x30
 [<ffffffff81112038>] ? page_cache_sync_readahead+0x18/0x40
 [<ffffffffa02bf5a9>] relocate_file_extent_cluster+0x3b9/0x430 [btrfs]
 [<ffffffffa02bf6db>] relocate_data_extent+0xbb/0xe0 [btrfs]
 [<ffffffffa02c5498>] relocate_block_group+0x278/0x480 [btrfs]
 [<ffffffffa02a113b>] ? btrfs_wait_ordered_extents+0x3b/0x1b0 [btrfs]
 [<ffffffffa02c5800>] btrfs_relocate_block_group+0x160/0x35c [btrfs]
 [<ffffffffa02b2a00>] ? btrfs_wake_function+0x0/0x20 [btrfs]
 [<ffffffffa02aae8b>] btrfs_relocate_chunk+0x8b/0x650 [btrfs]
 [<ffffffffa02a7ee0>] ? map_extent_buffer+0xb0/0xc0 [btrfs]
 [<ffffffffa02970b4>] ? btrfs_item_offset+0xe4/0xf0 [btrfs]
 [<ffffffffa02abfcf>] btrfs_balance+0x1ff/0x290 [btrfs]
 [<ffffffffa02b2400>] btrfs_ioctl+0x500/0xa20 [btrfs]
 [<ffffffff8112f3d7>] ? handle_pte_fault+0xf7/0x990
[<ffffffff8114a307>] ? alloc_pages_current+0x87/0xd0
 [<ffffffff811769d2>] vfs_ioctl+0x22/0xa0
 [<ffffffff81176b74>] do_vfs_ioctl+0x84/0x580
 [<ffffffff811770f1>] sys_ioctl+0x81/0xa0
 [<ffffffff81013132>] system_call_fastpath+0x16/0x1b

Log from terminal
Message from syslogd@sapqe-01 at May 10 04:20:39 ...
 kernel:Oops: 0000 [#1] SMP 

Message from syslogd@sapqe-01 at May 10 04:20:39 ...
 kernel:last sysfs file: /sys/devices/virtual/block/loop1/range

Message from syslogd@sapqe-01 at May 10 04:20:39 ...
 kernel:Stack:

Message from syslogd@sapqe-01 at May 10 04:20:39 ...
 kernel:Call Trace:

Message from syslogd@sapqe-01 at May 10 04:20:39 ...
 kernel:Code: 0f 1f 00 48 8b 41 28 83 e0 08 eb ad 0f 1f 80 00 00 00 00 55 48 89 e5 0f 1f 44 00 00 44 8b 4e 10 48 89 d0 48 89 ca 45 85 c9 74 16 <f6> 40 3d 10 75 12 4d 89 c1 48 89 c2 49 89 c8 31 c9 e8 d2 fc ff 

Message from syslogd@sapqe-01 at May 10 04:20:39 ...
 kernel:CR2: 000000000000003d

Message from syslogd@sapqe-01 at May 10 04:20:39 ...
 kernel:Kernel panic - not syncing: Fatal exception

Expected results:
no panic, balancing work correctly

Additional info:
# uname -a
Linux sapqe-01.rhts.eng.bos.redhat.com 2.6.32-23.el6.x86_64 #1 SMP Tue Apr 27 21:17:28 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

And there is a similar bug 584068 report to fedora.
Comment 2 RHEL Product and Program Management 2010-05-11 08:02:02 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 4 Aristeu Rozanski 2010-05-18 11:04:11 EDT
Patch(es) available on kernel-2.6.32-26.el6
Comment 7 Eryu Guan 2010-05-22 14:32:16 EDT
Verified

Schedule rh-tests-kernel-filesystems-btrfs-online-balance-1.0-0.noarch, test passed and kernel didn't panic

[root@amd-drachma-01 online-balance]# uname -a
Linux amd-drachma-01.lab.bos.redhat.com 2.6.32-27.el6.x86_64 #1 SMP Tue May 18 12:25:26 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
Comment 8 releng-rhel@redhat.com 2010-11-11 11:11:43 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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