syzbot


kernel BUG in insert_state (2)

Status: upstream: reported C repro on 2023/08/26 04:14
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+d21c74a99c319e88007a@syzkaller.appspotmail.com
First crash: 240d, last: 7d15h
Cause bisection: failed (error log, bisect log)
  
Fix bisection: fixed by (bisect log) :
commit a1912f712188291f9d7d434fba155461f1ebef66
Author: Josef Bacik <josef@toxicpanda.com>
Date: Wed Nov 22 17:17:55 2023 +0000

  btrfs: remove code for inode_cache and recovery mount options

  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly btrfs report (Apr 2024) 0 (1) 2024/04/12 13:18
[syzbot] [btrfs?] kernel BUG in insert_state (2) 0 (2) 2024/03/12 21:43
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in insert_state btrfs 3 409d 460d 0/26 auto-obsoleted due to no activity on 2023/07/03 23:50
Last patch testing requests (5)
Created Duration User Patch Repo Result
2024/04/10 14:05 17m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2024/03/04 19:58 21m retest repro upstream OK log
2024/01/27 22:46 18m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2023/12/25 09:46 14m retest repro upstream report log
2023/09/16 03:33 13m retest repro upstream report log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2024/03/12 17:33 4h08m bisect fix upstream job log (1)
2023/10/16 07:42 1h57m bisect fix upstream job log (0) log

Sample crash report:
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
------------[ cut here ]------------
kernel BUG at fs/btrfs/extent-io-tree.c:397!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 6095 Comm: syz-executor426 Not tainted 6.7.0-rc6-syzkaller-gaafe7ad77b91 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : set_state_bits fs/btrfs/extent-io-tree.c:397 [inline]
pc : insert_state+0x9a4/0x9a8 fs/btrfs/extent-io-tree.c:427
lr : set_state_bits fs/btrfs/extent-io-tree.c:397 [inline]
lr : insert_state+0x9a4/0x9a8 fs/btrfs/extent-io-tree.c:427
sp : ffff800096ce66c0
x29: ffff800096ce6710 x28: ffff0000dbee1350 x27: dfff800000000000
x26: 0000000000000000 x25: ffff0000c7755900 x24: 0000000000000000
x23: 0000000000000fff x22: 0000000000000000 x21: 0000000000000800
x20: 0000000000000fff x19: 00000000fffffff4 x18: ffff800096ce5b00
x17: 0000000000000000 x16: ffff80008a82b138 x15: 0000000000000001
x14: 1ffff00011cf5e26 x13: 0000000000000000 x12: 0000000000000000
x11: ffff700011cf5e27 x10: 0000000000ff0100 x9 : 0000000000000000
x8 : ffff0000d1aada00 x7 : 0000000000000001 x6 : 0000000000000001
x5 : 00000000ffffffff x4 : 0000000000000820 x3 : 0000000000000820
x2 : 0000000000000038 x1 : 00000000fffffff4 x0 : 0000000000000000
Call trace:
 set_state_bits fs/btrfs/extent-io-tree.c:397 [inline]
 insert_state+0x9a4/0x9a8 fs/btrfs/extent-io-tree.c:427
 __set_extent_bit+0xf04/0x1968 fs/btrfs/extent-io-tree.c:1200
 set_record_extent_bits+0x68/0xa8 fs/btrfs/extent-io-tree.c:1793
 qgroup_reserve_data+0x214/0x874 fs/btrfs/qgroup.c:4005
 btrfs_qgroup_reserve_data+0x40/0xd8 fs/btrfs/qgroup.c:4048
 btrfs_check_data_free_space+0x130/0x20c fs/btrfs/delalloc-space.c:154
 btrfs_delalloc_reserve_space+0x4c/0x1f0 fs/btrfs/delalloc-space.c:465
 btrfs_page_mkwrite+0x368/0xcbc fs/btrfs/inode.c:8132
 do_page_mkwrite+0x140/0x2dc mm/memory.c:2944
 wp_page_shared mm/memory.c:3339 [inline]
 do_wp_page+0x1214/0x33ac mm/memory.c:3479
 handle_pte_fault mm/memory.c:5055 [inline]
 __handle_mm_fault mm/memory.c:5180 [inline]
 handle_mm_fault+0x1208/0x4a7c mm/memory.c:5345
 __do_page_fault arch/arm64/mm/fault.c:513 [inline]
 do_page_fault+0x4e8/0xa54 arch/arm64/mm/fault.c:626
 do_mem_abort+0x74/0x200 arch/arm64/mm/fault.c:846
 el1_abort+0x3c/0x5c arch/arm64/kernel/entry-common.c:398
 el1h_64_sync_handler+0x60/0xac arch/arm64/kernel/entry-common.c:458
 el1h_64_sync+0x64/0x68 arch/arm64/kernel/entry.S:590
 __arch_copy_to_user+0x190/0x234 arch/arm64/lib/copy_template.S:158
 copy_page_to_iter+0x200/0x2f8 lib/iov_iter.c:381
 copy_folio_to_iter include/linux/uio.h:181 [inline]
 filemap_read+0x698/0xbf8 mm/filemap.c:2644
 btrfs_file_read_iter+0x240/0x5b0 fs/btrfs/file.c:3823
 do_iter_read+0x668/0xa80 fs/read_write.c:795
 vfs_readv fs/read_write.c:915 [inline]
 do_preadv+0x1e4/0x324 fs/read_write.c:1007
 __do_sys_preadv fs/read_write.c:1057 [inline]
 __se_sys_preadv fs/read_write.c:1052 [inline]
 __arm64_sys_preadv+0xa0/0xb8 fs/read_write.c:1052
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
Code: aa1403e0 979737fb 17ffff4d 97842ce0 (d4210000) 
---[ end trace 0000000000000000 ]---

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/26 12:07 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci aafe7ad77b91 fb427a07 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 kernel BUG in insert_state
2023/08/22 04:10 upstream f7757129e3de 6b415825 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root kernel BUG in insert_state
2024/01/07 19:49 upstream 52b1853b080a d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state
2023/08/31 23:24 upstream b97d64c72259 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state
2023/12/26 11:44 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci aafe7ad77b91 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state
2023/11/30 01:09 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2cc14f52aeb7 6e78f9ce .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state
2023/11/17 13:10 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8de1e7afcc1c cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state
* Struck through repros no longer work on HEAD.