syzbot


kernel BUG in clear_state_bit

Status: upstream: reported C repro on 2022/11/25 09:46
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+78dbea1c214b5413bdd3@syzkaller.appspotmail.com
First crash: 544d, last: 10d
Cause bisection: introduced by (bisect log) :
commit 4444a06981af66a49cf0cd08fec9759e8dd0a0fc
Author: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Date: Thu Sep 1 02:23:32 2022 +0000

  hwmon: (emc2305) Remove unused including <linux/version.h>

Crash: kernel BUG in close_ctree (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] kernel BUG in clear_state_bit 0 (2) 2022/11/25 17:49
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 kernel BUG in clear_state_bit origin:upstream missing-backport C inconclusive 4 72d 333d 0/3 upstream: reported C repro on 2023/06/24 17:54
linux-5.15 kernel BUG in clear_state_bit origin:upstream missing-backport C error 2 107d 333d 0/3 upstream: reported C repro on 2023/06/24 20:08
Last patch testing requests (10)
Created Duration User Patch Repo Result
2024/04/26 21:31 15m retest repro upstream report log
2024/04/26 21:31 15m retest repro upstream report log
2024/04/26 21:31 15m retest repro upstream report log
2024/04/12 14:29 19m retest repro linux-next report log
2024/04/12 14:29 15m retest repro linux-next report log
2024/04/12 14:29 26m retest repro upstream error OK
2024/04/12 14:29 18m retest repro linux-next report log
2024/04/11 09:06 22m retest repro upstream error OK
2024/04/11 09:06 39m retest repro upstream error OK
2024/04/11 09:06 21m retest repro upstream error OK

Sample crash report:
RDX: 0000000020000100 RSI: 0000000040305829 RDI: 0000000000000005
RBP: 00007ffefa85bdd0 R08: 0000000000000001 R09: 00007ffefa85bde0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006
R13: 00007ffefa85be10 R14: 00007ffefa85bdf0 R15: 0000000000000002
 </TASK>
------------[ cut here ]------------
kernel BUG at fs/btrfs/extent-io-tree.c:515!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 5045 Comm: syz-executor310 Not tainted 6.4.0-rc7-syzkaller-00072-gdad9774deaf1 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
RIP: 0010:clear_state_bit+0x31b/0x3a0 fs/btrfs/extent-io-tree.c:515
Code: 14 02 4c 89 f0 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 33 44 8b 7d 7c e9 af fe ff ff e8 ee 41 f8 fd 0f 0b eb 97 e8 e5 41 f8 fd <0f> 0b 4c 89 f7 e8 3b 16 4a fe e9 72 fd ff ff 4c 89 f7 e8 2e 16 4a
RSP: 0018:ffffc900035bece8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 00000000fffffff4 RCX: 0000000000000000
RDX: ffff8880797de080 RSI: ffffffff838b25fb RDI: 0000000000000005
RBP: ffff888029424e40 R08: 0000000000000005 R09: 0000000000000000
R10: 00000000fffffff4 R11: 0000000000000001 R12: ffff888071f1e300
R13: 0000000000000000 R14: ffff888029424ebc R15: 000000000000ffff
FS:  0000555555e9e300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020010000 CR3: 000000002bb0a000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __clear_extent_bit+0x560/0xba0 fs/btrfs/extent-io-tree.c:674
 clear_record_extent_bits+0x58/0x90 fs/btrfs/extent-io-tree.c:1703
 __btrfs_qgroup_release_data+0x19b/0x8f0 fs/btrfs/qgroup.c:3910
 btrfs_alloc_ordered_extent+0x76c/0x1000 fs/btrfs/ordered-data.c:193
 btrfs_add_ordered_extent+0x49/0xa0 fs/btrfs/ordered-data.c:278
 cow_file_range+0x4c0/0xd30 fs/btrfs/inode.c:1314
 btrfs_run_delalloc_range+0x53e/0x12d0 fs/btrfs/inode.c:2244
 writepage_delalloc+0x1a6/0x3e0 fs/btrfs/extent_io.c:1330
 __extent_writepage+0xf8d/0x15e0 fs/btrfs/extent_io.c:1609
 extent_write_cache_pages+0x465/0xd10 fs/btrfs/extent_io.c:2477
 extent_writepages+0x20c/0x4a0 fs/btrfs/extent_io.c:2599
 do_writepages+0x1a8/0x640 mm/page-writeback.c:2551
 filemap_fdatawrite_wbc mm/filemap.c:390 [inline]
 filemap_fdatawrite_wbc+0x147/0x1b0 mm/filemap.c:380
 __filemap_fdatawrite_range+0xb8/0xf0 mm/filemap.c:423
 btrfs_fdatawrite_range+0x4a/0x110 fs/btrfs/file.c:3862
 btrfs_wait_ordered_range+0x75/0x290 fs/btrfs/ordered-data.c:802
 btrfs_punch_hole fs/btrfs/file.c:2609 [inline]
 btrfs_fallocate+0xab6/0x27f0 fs/btrfs/file.c:3063
 vfs_fallocate+0x48b/0xe40 fs/open.c:324
 ioctl_preallocate+0x18e/0x200 fs/ioctl.c:290
 file_ioctl fs/ioctl.c:333 [inline]
 do_vfs_ioctl+0x1306/0x1670 fs/ioctl.c:849
 __do_sys_ioctl fs/ioctl.c:868 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __x64_sys_ioctl+0x10c/0x210 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f7c617abac9
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:00007ffefa85bda8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f7c617abac9
RDX: 0000000020000100 RSI: 0000000040305829 RDI: 0000000000000005
RBP: 00007ffefa85bdd0 R08: 0000000000000001 R09: 00007ffefa85bde0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006
R13: 00007ffefa85be10 R14: 00007ffefa85bdf0 R15: 0000000000000002
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:clear_state_bit+0x31b/0x3a0 fs/btrfs/extent-io-tree.c:515
Code: 14 02 4c 89 f0 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 33 44 8b 7d 7c e9 af fe ff ff e8 ee 41 f8 fd 0f 0b eb 97 e8 e5 41 f8 fd <0f> 0b 4c 89 f7 e8 3b 16 4a fe e9 72 fd ff ff 4c 89 f7 e8 2e 16 4a
RSP: 0018:ffffc900035bece8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 00000000fffffff4 RCX: 0000000000000000
RDX: ffff8880797de080 RSI: ffffffff838b25fb RDI: 0000000000000005
RBP: ffff888029424e40 R08: 0000000000000005 R09: 0000000000000000
R10: 00000000fffffff4 R11: 0000000000000001 R12: ffff888071f1e300
R13: 0000000000000000 R14: ffff888029424ebc R15: 000000000000ffff
FS:  0000555555e9e300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020010000 CR3: 000000002bb0a000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (54):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/22 06:47 upstream dad9774deaf1 09ffe269 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root kernel BUG in clear_state_bit
2023/05/03 00:27 upstream 865fdb08197e 48e0a81d .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root kernel BUG in clear_state_bit
2023/03/31 04:17 upstream 8bb95a1662f8 f325deb0 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root kernel BUG in clear_state_bit
2023/03/19 12:07 upstream a3671bd86a97 7939252e .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root kernel BUG in clear_state_bit
2022/12/25 05:22 upstream 72a85e2b0a1e 9da18ae8 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root kernel BUG in clear_state_bit
2022/12/20 22:36 upstream 6feb57c2fd7c d3e76707 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root kernel BUG in clear_state_bit
2022/12/10 15:04 upstream 3ecc37918c80 67be1ae7 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root kernel BUG in clear_state_bit
2022/12/02 19:34 upstream a4412fdd49dc e080de16 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in clear_state_bit
2022/12/01 05:53 upstream 04aa64375f48 4c2a66e8 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root kernel BUG in clear_state_bit
2022/11/30 21:40 upstream 01f856ae6d0c 4c2a66e8 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in clear_state_bit
2022/11/25 08:39 upstream c3eb11fbb826 74a66371 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in clear_state_bit
2023/01/21 09:39 linux-next d514392f17fd 559a440a .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root kernel BUG in clear_state_bit
2023/01/16 23:48 linux-next c12e2e5b76b2 a63719e7 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root kernel BUG in clear_state_bit
2023/01/07 08:41 linux-next cc3c08b41a9c 1dac8c7a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root kernel BUG in clear_state_bit
2024/05/13 01:34 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci fda5695d692c 9026e142 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2022/11/30 12:12 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci cdb931b58ff5 4c2a66e8 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2022/11/26 08:34 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 6d464646530f 74a66371 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2023/11/18 18:39 upstream 791c8ab095f7 cb976f63 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root kernel BUG in clear_state_bit
2023/07/29 14:18 upstream ffabf7c73176 92476829 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root kernel BUG in clear_state_bit
2023/06/24 19:17 upstream a92b7d26c743 79782afc .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in clear_state_bit
2023/09/03 20:12 linux-next a47fc304d2b6 696ea0d2 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root kernel BUG in clear_state_bit
2023/06/24 18:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e40939bbfc68 09ffe269 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2023/10/01 14:30 upstream e402b08634b3 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in clear_state_bit
2023/09/22 00:41 upstream b5cbe7c00aa0 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in clear_state_bit
2023/09/14 10:49 upstream aed8aee11130 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in clear_state_bit
2023/09/14 07:22 upstream aed8aee11130 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in clear_state_bit
2023/12/30 07:44 upstream f016f7547aee fb427a07 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in clear_state_bit
2023/12/05 02:24 upstream bee0e7762ad2 f819d6f7 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in clear_state_bit
2023/10/10 16:38 upstream 94f6f0550c62 83165b57 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in clear_state_bit
2023/06/01 06:39 upstream 929ed21dfdb6 babc4389 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in clear_state_bit
2023/05/29 10:20 upstream 7877cb91f108 cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in clear_state_bit
2023/04/28 07:52 upstream 91ec4b0d11fe 70a605de .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in clear_state_bit
2023/04/22 22:34 upstream 2caeeb9d4a1b 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in clear_state_bit
2023/04/09 08:32 upstream a79d5c76f705 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in clear_state_bit
2023/04/09 07:40 upstream a79d5c76f705 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in clear_state_bit
2023/02/28 02:46 upstream 982818426a0f 95aee97a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in clear_state_bit
2023/01/02 13:34 upstream 88603b6dc419 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in clear_state_bit
2022/11/25 08:16 upstream c3eb11fbb826 74a66371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in clear_state_bit
2024/05/13 01:14 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci fda5695d692c 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2024/02/19 06:54 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 905b00721763 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2024/02/19 05:49 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 905b00721763 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2024/01/18 03:32 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 0802e17d9aca 915053c7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2023/12/15 07:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci d5b235ec8eab 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2023/08/29 06:31 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci fe4469582053 7ba13a15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2023/08/01 13:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2642b8a18760 2a0d0f29 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2023/04/09 07:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9a03cbd79d3a 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2023/03/20 13:43 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci fe15c26ee26e 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2023/02/15 07:58 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2d3827b3f393 1d6b4af7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2023/02/06 05:56 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ca72d58361ee be607b78 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2023/01/30 18:14 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c62c88e05937 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2023/01/30 01:11 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c62c88e05937 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2022/12/15 08:07 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 b18f0a64 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2022/12/01 20:37 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci cdb931b58ff5 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
2022/11/30 03:08 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci cdb931b58ff5 05dc7993 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in clear_state_bit
* Struck through repros no longer work on HEAD.