WARNING in __btrfs_alloc_chunk

9 views
Skip to first unread message

syzbot

unread,
Sep 16, 2020, 2:22:21 AM9/16/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: a87f9628 Linux 4.19.145
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13ad341d900000
kernel config: https://syzkaller.appspot.com/x/.config?x=6c1d3a90df2d2f09
dashboard link: https://syzkaller.appspot.com/bug?extid=ceefa0328e4284615345
compiler: gcc (GCC) 10.1.0-syz 20200507

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ceefa0...@syzkaller.appspotmail.com

BTRFS error (device loop0): superblock checksum mismatch
------------[ cut here ]------------
BTRFS error (device loop0): open_ctree failed
__btrfs_alloc_chunk: found more than 0 devices
BTRFS error (device loop2): unsupported checksum algorithm 2
WARNING: CPU: 0 PID: 6490 at fs/btrfs/volumes.c:4743 __btrfs_alloc_chunk+0x1604/0x1a80 fs/btrfs/volumes.c:4743
BTRFS error (device loop2): superblock checksum mismatch
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 6490 Comm: syz-executor.5 Not tainted 4.19.145-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2fe lib/dump_stack.c:118
panic+0x26a/0x50e kernel/panic.c:186
__warn.cold+0x20/0x61 kernel/panic.c:541
report_bug+0x262/0x2b0 lib/bug.c:186
fixup_bug arch/x86/kernel/traps.c:178 [inline]
fixup_bug arch/x86/kernel/traps.c:173 [inline]
do_error_trap+0x1d7/0x310 arch/x86/kernel/traps.c:296
invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:1038
RIP: 0010:__btrfs_alloc_chunk+0x1604/0x1a80 fs/btrfs/volumes.c:4743
Code: 8b bc 24 8c 00 00 00 4c 89 0c 24 e8 86 8c 90 fe 4c 8b 0c 24 48 c7 c6 e0 d4 be 87 48 c7 c7 c0 b1 be 87 4c 89 ca e8 97 82 64 fe <0f> 0b 8b 9c 24 88 00 00 00 4c 8b 0c 24 f7 db 23 5c 24 08 e9 b8 f1
RSP: 0018:ffff8880605b7258 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff888085856000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8154d001 RDI: ffffed100c0b6e3d
RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000008000000 R14: 0000000005800000 R15: 0000000000000001
do_chunk_alloc+0x4e8/0xb70 fs/btrfs/extent-tree.c:4524
find_free_extent+0x223f/0x3b20 fs/btrfs/extent-tree.c:7659
btrfs_reserve_extent+0x296/0x440 fs/btrfs/extent-tree.c:7817
btrfs_alloc_tree_block+0x3f2/0x15f0 fs/btrfs/extent-tree.c:8276
alloc_tree_block_no_bg_flush+0x1b6/0x250 fs/btrfs/ctree.c:1036
__btrfs_cow_block+0x3cb/0x1010 fs/btrfs/ctree.c:1091
btrfs_cow_block+0x276/0x840 fs/btrfs/ctree.c:1526
commit_cowonly_roots+0x129/0xc30 fs/btrfs/transaction.c:1160
btrfs_commit_transaction+0x94a/0x2480 fs/btrfs/transaction.c:2215
btrfs_commit_super+0xc1/0x100 fs/btrfs/disk-io.c:3932
close_ctree+0x618/0x850 fs/btrfs/disk-io.c:3992
generic_shutdown_super+0x144/0x370 fs/super.c:456
kill_anon_super+0x36/0x60 fs/super.c:1032
btrfs_kill_super+0x49/0x550 fs/btrfs/super.c:2213
deactivate_locked_super+0x94/0x160 fs/super.c:329
deactivate_super+0x174/0x1a0 fs/super.c:360
cleanup_mnt+0x1a8/0x290 fs/namespace.c:1098
task_work_run+0x148/0x1c0 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:193 [inline]
exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x460027
Code: 64 89 04 25 d0 02 00 00 58 5f ff d0 48 89 c7 e8 2f be ff ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 fd 89 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fff8d367748 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000460027
RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007fff8d3677f0
RBP: 000000000000214b R08: 0000000000000000 R09: 000000000000000c
R10: 0000000000000005 R11: 0000000000000246 R12: 00007fff8d368880
R13: 0000000001da7a60 R14: 0000000000000000 R15: 00007fff8d368880
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Sep 16, 2020, 10:35:23 PM9/16/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: cbfa1702 Linux 4.14.198
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12ac11b5900000
kernel config: https://syzkaller.appspot.com/x/.config?x=3990958d85b55e59
dashboard link: https://syzkaller.appspot.com/bug?extid=526dca5ff79b9b1ef242
compiler: gcc (GCC) 10.1.0-syz 20200507

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+526dca...@syzkaller.appspotmail.com

BTRFS info (device loop4): checking UUID tree
__btrfs_alloc_chunk: found more than 0 devices
------------[ cut here ]------------
WARNING: CPU: 1 PID: 12546 at fs/btrfs/volumes.c:4724 __btrfs_alloc_chunk.cold+0x23/0x50 fs/btrfs/volumes.c:4724
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 12546 Comm: syz-executor.4 Not tainted 4.14.198-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1b2/0x283 lib/dump_stack.c:58
panic+0x1f9/0x42d kernel/panic.c:183
__warn.cold+0x20/0x4b kernel/panic.c:547
report_bug+0x208/0x249 lib/bug.c:186
fixup_bug arch/x86/kernel/traps.c:177 [inline]
fixup_bug arch/x86/kernel/traps.c:172 [inline]
do_error_trap+0x195/0x2d0 arch/x86/kernel/traps.c:295
invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:964
RIP: 0010:__btrfs_alloc_chunk.cold+0x23/0x50 fs/btrfs/volumes.c:4724
RSP: 0018:ffff888087f374a0 EFLAGS: 00010282
RAX: 000000000000002e RBX: ffff88808707fb40 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff86ac12c0 RDI: ffffed1010fe6e8a
RBP: dffffc0000000000 R08: 000000000000002e R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88808dd19868
R13: 0000000008000000 R14: 0000000001b00000 R15: 0000000005800000
do_chunk_alloc+0x2fa/0x800 fs/btrfs/extent-tree.c:4708
find_free_extent+0x1a66/0x32a0 fs/btrfs/extent-tree.c:7996
btrfs_reserve_extent+0x14b/0x3b0 fs/btrfs/extent-tree.c:8110
btrfs_alloc_tree_block+0x371/0x1400 fs/btrfs/extent-tree.c:8552
__btrfs_cow_block+0x36b/0xe50 fs/btrfs/ctree.c:1110
btrfs_cow_block+0x207/0x6d0 fs/btrfs/ctree.c:1543
commit_cowonly_roots+0xf2/0xa40 fs/btrfs/transaction.c:1168
btrfs_commit_transaction+0x7e2/0x2210 fs/btrfs/transaction.c:2217
btrfs_sync_fs+0xe9/0x430 fs/btrfs/super.c:1217
__sync_filesystem fs/sync.c:39 [inline]
sync_filesystem fs/sync.c:67 [inline]
sync_filesystem+0x185/0x230 fs/sync.c:48
generic_shutdown_super+0x70/0x370 fs/super.c:432
kill_anon_super+0x36/0x90 fs/super.c:1006
btrfs_kill_super+0x49/0x540 fs/btrfs/super.c:2155
deactivate_locked_super+0x6c/0xd0 fs/super.c:319
deactivate_super+0x7f/0xa0 fs/super.c:350
cleanup_mnt+0x186/0x2c0 fs/namespace.c:1183
task_work_run+0x11f/0x190 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:191 [inline]
exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164
prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
syscall_return_slowpath arch/x86/entry/common.c:270 [inline]
do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x460027
RSP: 002b:00007fff582aa8f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000460027
RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007fff582aa9a0
RBP: 00000000000002a9 R08: 0000000000000000 R09: 000000000000000b
R10: 0000000000000005 R11: 0000000000000246 R12: 00007fff582aba30
R13: 0000000001ab5a60 R14: 0000000000000000 R15: 00007fff582aba30

syzbot

unread,
Jan 26, 2021, 11:26:15 AM1/26/21
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.

syzbot

unread,
Jul 7, 2021, 4:33:16 PM7/7/21
to syzkaller...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages