syzbot


kernel BUG in add_new_free_space

Status: fixed on 2023/10/12 12:48
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+3ba856e07b7127889d8c@syzkaller.appspotmail.com
Fix commit: d8ccbd21918f btrfs: remove BUG_ON()'s in add_new_free_space()
First crash: 366d, last: 294d
Discussions (3)
Title Replies (including bot) Last reply
[PATCH AUTOSEL 6.1 20/47] btrfs: remove BUG_ON()'s in add_new_free_space() 1 (1) 2023/08/13 15:59
[PATCH AUTOSEL 6.4 23/54] btrfs: remove BUG_ON()'s in add_new_free_space() 1 (1) 2023/08/13 15:49
[syzbot] [btrfs?] kernel BUG in add_new_free_space 0 (2) 2023/06/30 01:12

Sample crash report:
 el0_svc_common+0x138/0x244 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:191
 el0_svc+0x4c/0x160 arch/arm64/kernel/entry-common.c:647
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:665
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591
------------[ cut here ]------------
kernel BUG at fs/btrfs/block-group.c:528!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 6029 Comm: syz-executor128 Not tainted 6.4.0-rc7-syzkaller-ge40939bbfc68 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : add_new_free_space+0x290/0x294 fs/btrfs/block-group.c:528
lr : add_new_free_space+0x290/0x294 fs/btrfs/block-group.c:528
sp : ffff800096f17440
x29: ffff800096f174e0 x28: 1ffff00012de2e94 x27: dfff800000000000
x26: 0000000000000001 x25: ffff0000de3c0190 x24: ffff800096f174a0
x23: 0000000000820000 x22: ffff800096f17480 x21: 0000000000000000
x20: 00000000007e0000 x19: 00000000fffffff4 x18: 1fffe000368447c6
x17: 0000000000000000 x16: ffff80008a443320 x15: 0000000000000001
x14: 0000000000000000 x13: 0000000000000001 x12: 0000000000000001
x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
x8 : ffff0000c74f3780 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff800096f16978 x4 : ffff80008df9ee80 x3 : ffff800082cfd768
x2 : 0000000000000001 x1 : 00000000fffffff4 x0 : 0000000000000000
Call trace:
 add_new_free_space+0x290/0x294 fs/btrfs/block-group.c:528
 btrfs_make_block_group+0x32c/0x858 fs/btrfs/block-group.c:2700
 create_chunk fs/btrfs/volumes.c:5440 [inline]
 btrfs_create_chunk+0x13a0/0x1e5c fs/btrfs/volumes.c:5526
 reserve_chunk_space+0x148/0x2a0 fs/btrfs/block-group.c:4083
 check_system_chunk fs/btrfs/block-group.c:4132 [inline]
 btrfs_inc_block_group_ro+0x4e8/0x570 fs/btrfs/block-group.c:2854
 scrub_enumerate_chunks+0x79c/0x1330 fs/btrfs/scrub.c:2536
 btrfs_scrub_dev+0x5f0/0xb84 fs/btrfs/scrub.c:2928
 btrfs_ioctl_scrub+0x1f4/0x3e8 fs/btrfs/ioctl.c:3177
 btrfs_ioctl+0x6a4/0xb08 fs/btrfs/ioctl.c:4626
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x244 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:191
 el0_svc+0x4c/0x160 arch/arm64/kernel/entry-common.c:647
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:665
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591
Code: 956f741e 97875f26 d4210000 97875f24 (d4210000) 
---[ end trace 0000000000000000 ]---

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/30 01:11 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e40939bbfc68 7b33cf8f .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 kernel BUG in add_new_free_space
2023/06/30 00:26 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e40939bbfc68 7b33cf8f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in add_new_free_space
2023/04/18 11:31 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 327bf9bb94cf 436577a9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in add_new_free_space
* Struck through repros no longer work on HEAD.