kernel BUG at fs/btrfs/relocation.c:2502!
Hi,
While running my tool(attachment), I would encounter the BUG_ON, and I FAILED to find where went wrong :(
The tool is with inode_cache option, and mainly do three things:
a. run Chris's synctest in BACKGROUND
b. create 100 snapshots
c. after b, run "btrfs fi balance"
You can follow these tips to reproduce the bug:
1) untar the attachment,
2) prepare 4 partitions, the mount point is default to /mnt,
3) $ ./2_while.sh /dev/sdb1 /dev/sdb2 /dev/sdb3 /dev/sdb4
4) then just wait several minutes and you will get the bug.
NOTE:
You MAY hit a warning and I've fixed it with this patch:
http://marc.info/?l=linux-btrfs&m=131547325515336&w=2
===
kernel BUG at fs/btrfs/relocation.c:2502!
[...]
Call Trace: [<ffffffffa03d7a6b>] ? block_rsv_add_bytes+0x2b/0x70 [btrfs] [<ffffffffa043292f>] relocate_tree_blocks+0x60f/0x6d0 [btrfs] [<ffffffffa0433498>] ? add_data_references+0x248/0x260 [btrfs] [<ffffffffa0433722>] relocate_block_group+0x272/0x620 [btrfs] [<ffffffffa0433c83>] btrfs_relocate_block_group+0x1b3/0x2d0 [btrfs] [<ffffffffa0413163>] btrfs_relocate_chunk+0x93/0x6a0 [btrfs] [<ffffffff8103bfb3>] ? __wake_up+0x53/0x70 [<ffffffffa041db42>] ? btrfs_tree_read_unlock_blocking+0x42/0x70 [btrfs] [<ffffffffa04144d2>] btrfs_balance+0x212/0x2a0 [btrfs] [<ffffffff81152459>] ? path_openat+0x109/0x3e0 [<ffffffffa041d398>] btrfs_ioctl+0x798/0xd20 [btrfs] [<ffffffff81112ec3>] ? handle_mm_fault+0x143/0x260 [<ffffffff81474504>] ? do_page_fault+0x1d4/0x440 [<ffffffff8115562a>] do_vfs_ioctl+0x9a/0x540 [<ffffffff81155b71>] sys_ioctl+0xa1/0xb0 [<ffffffff8147896b>] system_call_fastpath+0x16/0x1b Code: 00 00 00 00 00 eb f6 0f 0b eb fe 0f 0b 0f 1f 84 00 00 00 00 00 eb f6 0f 0b eb fe 0f 0b 0f 1f 84 00 00 00 00 00 eb f6 0f 0b eb fe <0f> 0b 0f 1f 84 00 00 00 00 00 eb f6 48 83 7a 68 00 0f 84 eb fa RIP [<ffffffffa0430c26>] do_relocation+0x546/0x570 [btrfs] RSP <ffff88003c0859a8> ---[ end trace 6a4328153ff7ff17 ]---
On Wed, Sep 21, 2011 at 6:06 PM, Liu Bo <[email protected]> wrot= e:
Quoted 4 lines
Hi,
While running my tool(attachment), I would encounter the
BUG_ON, and =
I FAILED to find where went wrong :(
Quoted 21 lines
The tool is with
inode_cacheoption, and mainly do three things:
a. run Chris's synctest in BACKGROUND
b. create 100 snapshots
c. after b, run "btrfs fi balance"You can follow these tips to reproduce the bug:
1) untar the attachment,
2) prepare 4 partitions, the mount point is default to /mnt,
3) $ ./2_while.sh/dev/sdb1/dev/sdb2/dev/sdb3/dev/sdb4
4) then just wait several minutes and you will get the bug.NOTE:
You MAY hit a warning and I've fixed it with this patch:
http://marc.info/?l=3Dlinux-btrfs&m=3D131547325515336&w=3D2=3D=3D=3D
kernel BUG atfs/btrfs/relocation.c:2502!
[...]
Quoted 6 lines
Call Trace: =A0[<ffffffffa03d7a6b>] ? block_rsv_add_bytes+0x2b/0x70 [btrfs] =A0[<ffffffffa043292f>] relocate_tree_blocks+0x60f/0x6d0 [btrfs] =A0[<ffffffffa0433498>] ? add_data_references+0x248/0x260 [btrfs] =A0[<ffffffffa0433722>] relocate_block_group+0x272/0x620 [btrfs] =A0[<ffffffffa0433c83>] btrfs_relocate_block_group+0x1b3/0x2d0 [btrfs=
]
Quoted 3 lines
=A0[<ffffffffa0413163>]
btrfs_relocate_chunk+0x93/0x6a0[btrfs] =A0[<ffffffff8103bfb3>] ?__wake_up+0x53/0x70=A0[<ffffffffa041db42>] ?btrfs_tree_read_unlock_blocking+0x42/0x70[=
btrfs]
Quoted 9 lines
=A0[<ffffffffa04144d2>]
btrfs_balance+0x212/0x2a0[btrfs] =A0[<ffffffff81152459>] ?path_openat+0x109/0x3e0=A0[<ffffffffa041d398>]btrfs_ioctl+0x798/0xd20[btrfs] =A0[<ffffffff81112ec3>] ?handle_mm_fault+0x143/0x260=A0[<ffffffff81474504>] ?do_page_fault+0x1d4/0x440=A0[<ffffffff8115562a>]do_vfs_ioctl+0x9a/0x540=A0[<ffffffff81155b71>]sys_ioctl+0xa1/0xb0=A0[<ffffffff8147896b>]system_call_fastpath+0x16/0x1bCode: 00 00 00 00 00 eb f6 0f 0b eb fe 0f 0b 0f 1f 84 00 00 00 00 00 =
eb f6 0f 0b eb fe 0f 0b 0f 1f 84 00 00 00 00 00 eb f6 0f 0b eb fe <0f> = 0b 0f 1f 84 00 00 00 00 00 eb f6 48 83 7a 68 00 0f 84 eb fa
Quoted 5 lines
RIP =A0[<ffffffffa0430c26>]
do_relocation+0x546/0x570[btrfs] =A0RSP <ffff88003c0859a8>---[ end trace 6a4328153ff7ff17 ]---
call btrfs_save_ino_cache in commit_fs_roots is completely wrong. modification to fs trees is not allowed after create_pending_snapshots(= )
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 1 line · Zheng
modification to fs trees is not allowed after
create_pending_snapshots()
Do you have an idea whether there is a reasonable way to catch this in code? (even if only under a config option).
david
Quoted 6 lines · David Sterba
Quoted 1 line · Zheng
modification to fs trees is not allowed after
create_pending_snapshots()Do you have an idea whether there is a reasonable way to catch this in code? (even if only under a config option).
no idea