syzbot


WARNING in __btrfs_alloc_chunk (2)

Status: upstream: reported syz repro on 2022/03/05 22:10
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+1bc032a1cfc410708b73@syzkaller.appspotmail.com
First crash: 993d, last: 640d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 WARNING in __btrfs_alloc_chunk 2 1516d 1529d 0/1 auto-closed as invalid on 2021/01/26 16:26
linux-4.14 WARNING in __btrfs_alloc_chunk 4 1354d 1528d 0/1 auto-closed as invalid on 2021/07/07 20:33
Fix bisection attempts (4)
Created Duration User Patch Repo Result
2022/10/29 15:50 27m bisect fix linux-4.14.y OK (0) job log log
2022/07/30 12:46 22m bisect fix linux-4.14.y OK (0) job log log
2022/06/21 12:30 21m bisect fix linux-4.14.y OK (0) job log log
2022/05/22 12:03 21m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
BTRFS error (device loop2): bad tree block start 0 30420992
BTRFS info (device loop2): read error corrected: ino 0 off 30420992 (dev /dev/loop3 sector 75800)
BTRFS info (device loop2): creating free space tree
__btrfs_alloc_chunk: found more than 0 devices
------------[ cut here ]------------
WARNING: CPU: 1 PID: 9589 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: 1 PID: 9589 Comm: syz-executor.2 Not tainted 4.14.294-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
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:183
 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:ffff88809a1af010 EFLAGS: 00010286
RAX: 000000000000002e RBX: ffff88809c1c4480 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff87cd0640 RDI: ffffed1013435df8
RBP: dffffc0000000000 R08: 000000000000002e R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880aa321868
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/0x1410 fs/btrfs/extent-tree.c:8551
 btrfs_create_tree+0x1f3/0x910 fs/btrfs/disk-io.c:1273
 btrfs_create_free_space_tree+0xd9/0xc40 fs/btrfs/free-space-tree.c:1169
 open_ctree+0x6324/0x7530 fs/btrfs/disk-io.c:3002
 btrfs_fill_super fs/btrfs/super.c:1147 [inline]
 btrfs_mount+0x1915/0x1fe0 fs/btrfs/super.c:1631
 mount_fs+0x92/0x2a0 fs/super.c:1237
 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
 vfs_kern_mount+0x3c/0x60 fs/namespace.c:1036
 mount_subvol fs/btrfs/super.c:1398 [inline]
 btrfs_mount+0x42a/0x1fe0 fs/btrfs/super.c:1569
 mount_fs+0x92/0x2a0 fs/super.c:1237
 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
 vfs_kern_mount fs/namespace.c:1036 [inline]
 do_new_mount fs/namespace.c:2572 [inline]
 do_mount+0xe65/0x2a30 fs/namespace.c:2905
 SYSC_mount fs/namespace.c:3121 [inline]
 SyS_mount+0xa8/0x120 fs/namespace.c:3098
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7f541c03fb9a
RSP: 002b:00007f541b7b1f88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007f541c03fb9a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f541b7b1fe0
RBP: 00007f541b7b2020 R08: 00007f541b7b2020 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000
R13: 0000000020000100 R14: 00007f541b7b1fe0 R15: 0000000020000140
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/09/25 05:01 linux-4.14.y 4edbf74132a4 0042f2b4 .config console log report syz [disk image] [vmlinux] ci2-linux-4-14 WARNING in __btrfs_alloc_chunk
2022/03/06 00:04 linux-4.14.y e853993d29aa 7bdd8b2c .config console log report syz ci2-linux-4-14 WARNING in __btrfs_alloc_chunk
2023/02/22 11:36 linux-4.14.y a8ad60f2af58 42a4d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 WARNING in __btrfs_alloc_chunk
2023/02/01 21:46 linux-4.14.y 3949d1610004 9a6f477c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 WARNING in __btrfs_alloc_chunk
2022/09/25 04:48 linux-4.14.y 4edbf74132a4 0042f2b4 .config console log report info [disk image] [vmlinux] ci2-linux-4-14 WARNING in __btrfs_alloc_chunk
2022/08/30 13:38 linux-4.14.y e548869f356f 4a380809 .config console log report info ci2-linux-4-14 WARNING in __btrfs_alloc_chunk
2022/06/30 12:46 linux-4.14.y f051383ef03b 1434eec0 .config console log report info ci2-linux-4-14 WARNING in __btrfs_alloc_chunk
2022/04/22 06:00 linux-4.14.y 15a1c6b6f516 2738b391 .config console log report info ci2-linux-4-14 WARNING in __btrfs_alloc_chunk
2022/03/24 11:28 linux-4.14.y 004bfaafc45c 89bc8608 .config console log report info ci2-linux-4-14 WARNING in __btrfs_alloc_chunk
2022/03/05 22:10 linux-4.14.y e853993d29aa 7bdd8b2c .config console log report info ci2-linux-4-14 WARNING in __btrfs_alloc_chunk
* Struck through repros no longer work on HEAD.