syzbot


WARNING in __btrfs_alloc_chunk

Status: auto-closed as invalid on 2021/07/07 20:33
Reported-by: syzbot+526dca5ff79b9b1ef242@syzkaller.appspotmail.com
First crash: 650d, last: 477d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 WARNING in __btrfs_alloc_chunk (2) syz 4 8d09h 115d 0/1 upstream: reported syz repro on 2022/03/05 22:10
linux-4.19 WARNING in __btrfs_alloc_chunk 2 639d 651d 0/1 auto-closed as invalid on 2021/01/26 16:26

Sample crash report:
__btrfs_alloc_chunk: found more than 0 devices
------------[ cut here ]------------
WARNING: CPU: 0 PID: 7982 at fs/btrfs/volumes.c:4726 __btrfs_alloc_chunk.cold+0x23/0x50 fs/btrfs/volumes.c:4726
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 7982 Comm: syz-executor.3 Not tainted 4.14.224-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/0x281 lib/dump_stack.c:58
 panic+0x1f9/0x42d kernel/panic.c:183
 __warn.cold+0x20/0x44 kernel/panic.c:547
 report_bug+0x208/0x250 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:4726
RSP: 0018:ffff88805ac2f410 EFLAGS: 00010286
RAX: 000000000000002e RBX: ffff8880b3935680 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff878bbb80 RDI: ffffed100b585e78
RBP: dffffc0000000000 R08: 000000000000002e R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880aab04b68
R13: 0000000008000000 R14: 0000000001b00000 R15: 0000000005800000
 do_chunk_alloc+0x2fa/0x800 fs/btrfs/extent-tree.c:4707
 find_free_extent+0x1a66/0x3320 fs/btrfs/extent-tree.c:7995
 btrfs_reserve_extent+0x14b/0x3b0 fs/btrfs/extent-tree.c:8109
 btrfs_alloc_tree_block+0x371/0x1400 fs/btrfs/extent-tree.c:8551
 __btrfs_cow_block+0x367/0xfd0 fs/btrfs/ctree.c:1113
 btrfs_cow_block+0x207/0x6d0 fs/btrfs/ctree.c:1552
 commit_cowonly_roots+0xf2/0xa40 fs/btrfs/transaction.c:1168
 btrfs_commit_transaction+0x7e2/0x2210 fs/btrfs/transaction.c:2217
 btrfs_commit_super+0xb1/0xf0 fs/btrfs/disk-io.c:3688
 close_ctree+0x622/0x840 fs/btrfs/disk-io.c:3749
 generic_shutdown_super+0x144/0x370 fs/super.c:446
 kill_anon_super+0x36/0x90 fs/super.c:1006
 btrfs_kill_super+0x49/0x540 fs/btrfs/super.c:2163
 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:0x4673c7
RSP: 002b:00007ffe3e67e048 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000004673c7
RDX: 00007ffe3e67e11c RSI: 0000000000000002 RDI: 00007ffe3e67e110
RBP: 00007ffe3e67e110 R08: 00000000ffffffff R09: 00007ffe3e67dee0
R10: 0000000001e718ab R11: 0000000000000246 R12: 00000000004beb32
R13: 00007ffe3e67f1e0 R14: 0000000001e71810 R15: 00007ffe3e67f220
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2021/03/09 20:33 linux-4.14.y 1d177c0872ab 26967e35 .config log report info WARNING in __btrfs_alloc_chunk
ci2-linux-4-14 2020/12/25 20:22 linux-4.14.y 3f2ecb86cb90 b982b3ea .config log report info
ci2-linux-4-14 2020/11/15 23:50 linux-4.14.y 27ce4f2a6817 1bf9a662 .config log report info
ci2-linux-4-14 2020/09/17 02:34 linux-4.14.y cbfa1702aaf6 8247808b .config log report info