syzbot


kernel BUG in __set_extent_bit

Status: upstream: reported C repro on 2023/01/11 10:51
Reported-by: syzbot+89700d262ed1fb9f9351@syzkaller.appspotmail.com
First crash: 58d, last: 1d13h

Cause bisection: failed (bisect log)

Sample crash report:
RBP: 00007ffcf7999630 R08: 0000000000000002 R09: 00007ffcf7999640
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006
R13: 00007ffcf7999670 R14: 00007ffcf7999650 R15: 0000000000000002
 </TASK>
------------[ cut here ]------------
kernel BUG at fs/btrfs/extent-io-tree.c:379!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 5117 Comm: syz-executor237 Not tainted 6.2.0-rc3-syzkaller-00021-g7dd4b804e080 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:set_state_bits fs/btrfs/extent-io-tree.c:379 [inline]
RIP: 0010:__set_extent_bit+0x1c2f/0x1c90 fs/btrfs/extent-io-tree.c:1042
Code: 48 c7 c6 4a b6 cc 8c ba 47 01 00 00 89 e9 49 c7 c0 00 1b 3c 8b 31 c0 e8 ff 8e fb 06 0f 0b e8 68 84 d7 fd 0f 0b e8 61 84 d7 fd <0f> 0b e8 5a 84 d7 fd 49 83 c4 08 4c 89 e5 49 c1 ec 03 43 80 3c 34
RSP: 0018:ffffc90003dcf468 EFLAGS: 00010293
RAX: ffffffff83b456ff RBX: 00000000fffffff4 RCX: ffff888019d80000
RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000
RBP: 0000000000000800 R08: ffffffff83b4419e R09: 00000000ffffffff
R10: fffffbfff1a8331b R11: 1ffffffff1a8331a R12: 0000000000000000
R13: ffff888020fd9900 R14: 1ffff110041fb32f R15: ffff888020fd997c
FS:  0000555555596300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc24bf23140 CR3: 000000007ea4d000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 set_record_extent_bits+0x52/0x80 fs/btrfs/extent-io-tree.c:1690
 qgroup_reserve_data+0x27b/0x6f0 fs/btrfs/qgroup.c:3758
 btrfs_qgroup_reserve_data+0x2a/0xc0 fs/btrfs/qgroup.c:3801
 btrfs_zero_range+0xb78/0x1300 fs/btrfs/file.c:2997
 btrfs_fallocate+0xb73/0x2020 fs/btrfs/file.c:3114
 vfs_fallocate+0x515/0x670 fs/open.c:323
 do_vfs_ioctl+0x2163/0x2980 fs/ioctl.c:849
 __do_sys_ioctl fs/ioctl.c:868 [inline]
 __se_sys_ioctl+0x83/0x170 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fc24beabb49
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcf7999608 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fc24beabb49
RDX: 0000000020000000 RSI: 0000000040305839 RDI: 0000000000000005
RBP: 00007ffcf7999630 R08: 0000000000000002 R09: 00007ffcf7999640
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006
R13: 00007ffcf7999670 R14: 00007ffcf7999650 R15: 0000000000000002
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:set_state_bits fs/btrfs/extent-io-tree.c:379 [inline]
RIP: 0010:__set_extent_bit+0x1c2f/0x1c90 fs/btrfs/extent-io-tree.c:1042
Code: 48 c7 c6 4a b6 cc 8c ba 47 01 00 00 89 e9 49 c7 c0 00 1b 3c 8b 31 c0 e8 ff 8e fb 06 0f 0b e8 68 84 d7 fd 0f 0b e8 61 84 d7 fd <0f> 0b e8 5a 84 d7 fd 49 83 c4 08 4c 89 e5 49 c1 ec 03 43 80 3c 34
RSP: 0018:ffffc90003dcf468 EFLAGS: 00010293
RAX: ffffffff83b456ff RBX: 00000000fffffff4 RCX: ffff888019d80000
RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000
RBP: 0000000000000800 R08: ffffffff83b4419e R09: 00000000ffffffff
R10: fffffbfff1a8331b R11: 1ffffffff1a8331a R12: 0000000000000000
R13: ffff888020fd9900 R14: 1ffff110041fb32f R15: ffff888020fd997c
FS:  0000555555596300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc24bf23140 CR3: 000000007ea4d000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-fs 2023/01/11 16:34 upstream 7dd4b804e080 96166539 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] kernel BUG in __set_extent_bit
ci-upstream-gce-arm64 2023/01/11 10:51 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 358a161a6a9e 1dac8c7a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] kernel BUG in __set_extent_bit
ci2-upstream-fs 2023/02/03 21:40 upstream 66a87fff1a87 1b2f701a .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in __set_extent_bit
ci2-upstream-fs 2023/01/30 23:07 upstream 6d796c50f84c b68fb8d6 .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in __set_extent_bit
ci2-upstream-fs 2023/01/30 17:48 upstream 6d796c50f84c b68fb8d6 .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in __set_extent_bit
ci-upstream-gce-arm64 2023/01/27 02:06 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1dc22be1f91f 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in __set_extent_bit
ci-upstream-gce-arm64 2023/01/11 10:33 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 358a161a6a9e 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in __set_extent_bit
ci-upstream-gce-arm64 2022/12/08 15:03 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 1034e5fa .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in __set_extent_bit
* Struck through repros no longer work on HEAD.