syzbot


kernel BUG in btrfs_free_tree_block

Status: upstream: reported C repro on 2023/07/03 03:56
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+df51e4b53e70a282bdc6@syzkaller.appspotmail.com
First crash: 468d, last: 9d01h
Fix bisection: failed (error log, bisect log)
  
Bug presence (1)
Date Name Commit Repro Result
2023/07/03 upstream (ToT) a901a3568fd2 C [report] WARNING in btrfs_space_info_update_bytes_may_use
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in btrfs_free_tree_block btrfs C error 150 61d 747d 27/28 fixed on 2024/08/14 03:44
linux-6.1 kernel BUG in btrfs_free_tree_block origin:upstream missing-backport C inconclusive 3 215d 427d 0/3 upstream: reported C repro on 2023/08/12 21:44
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/10/04 12:03 1h14m retest repro linux-5.15.y report log

Sample crash report:
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
------------[ cut here ]------------
kernel BUG at fs/btrfs/extent-tree.c:3289!
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 4004 Comm: syz-executor274 Not tainted 5.15.119-syzkaller #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 : btrfs_free_tree_block+0xc08/0xdcc fs/btrfs/extent-tree.c:3289
lr : btrfs_free_tree_block+0xc08/0xdcc fs/btrfs/extent-tree.c:3289
sp : ffff80001cf46a60
x29: ffff80001cf46b80 x28: ffff0000dc49c2c0 x27: ffff80001cf46af0
x26: 00000000fffffff4 x25: 0000000000000001 x24: ffff0000d0a75290
x23: 0000000000000005 x22: ffff0000dc49c2c0 x21: ffff0000d0a75170
x20: 0000000000000001 x19: dfff800000000000 x18: 0000000000000001
x17: ff80800008335ea8 x16: ffff80001195eeac x15: ffff800008335ea8
x14: 00000000ffffffff x13: ffffffffffffffff x12: 0000000000000000
x11: ff80800009fc0804 x10: 0000000000000000 x9 : ffff800009fc0804
x8 : ffff0000c21c9b40 x7 : 0000000000000000 x6 : 0000000000000001
x5 : ffff80001cf45db8 x4 : 00000000000000a8 x3 : 0000000000000068
x2 : 0000000000000000 x1 : 00000000fffffff4 x0 : 0000000000000000
Call trace:
 btrfs_free_tree_block+0xc08/0xdcc fs/btrfs/extent-tree.c:3289
 __btrfs_cow_block+0xd94/0x1638 fs/btrfs/ctree.c:465
 btrfs_cow_block+0x354/0x744 fs/btrfs/ctree.c:570
 btrfs_search_slot+0xb50/0x24d8
 btrfs_insert_empty_items+0x1e4/0x2ac fs/btrfs/ctree.c:3955
 btrfs_insert_empty_item fs/btrfs/ctree.h:2930 [inline]
 btrfs_insert_replace_extent+0x2fc/0xc04 fs/btrfs/file.c:2672
 btrfs_replace_file_extents+0xb3c/0x1388 fs/btrfs/file.c:2954
 btrfs_clone+0xe28/0x2318 fs/btrfs/reflink.c:492
 btrfs_clone_files+0x278/0x31c fs/btrfs/reflink.c:740
 btrfs_remap_file_range+0x4c8/0xc08 fs/btrfs/reflink.c:888
 vfs_copy_file_range+0xd9c/0x1130 fs/read_write.c:1510
 __do_sys_copy_file_range fs/read_write.c:1588 [inline]
 __se_sys_copy_file_range fs/read_write.c:1551 [inline]
 __arm64_sys_copy_file_range+0x5f8/0x9d8 fs/read_write.c:1551
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
Code: c80a7e69 35ffffaa 17ffff2b 97940b7f (d4210000) 
---[ end trace b225bffca5e8afe8 ]---

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/03 03:55 linux-5.15.y 4af60700a60c bfc47836 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 kernel BUG in btrfs_free_tree_block
2023/09/17 09:06 linux-5.15.y aff03380bda4 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 kernel BUG in btrfs_free_tree_block
* Struck through repros no longer work on HEAD.