syzbot


WARNING in __btrfs_run_delayed_refs

Status: upstream: reported C repro on 2023/01/25 16:04
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+cd962715b0cb6dd8d8e2@syzkaller.appspotmail.com
First crash: 701d, last: 668d
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2023/02/27 03:33 33m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
 sync_fs_one_sb fs/sync.c:80 [inline]
 sync_fs_one_sb+0xb1/0xe0 fs/sync.c:77
 iterate_supers+0x124/0x490 fs/super.c:613
 sys_sync+0x9a/0x130 fs/sync.c:115
------------[ cut here ]------------
WARNING: CPU: 1 PID: 7966 at fs/btrfs/free-space-tree.c:856 remove_from_free_space_tree.cold+0x14/0x37 fs/btrfs/free-space-tree.c:856
Kernel panic - not syncing: panic_on_warn set ...

 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7fcb18396659
RSP: 002b:00007fffe30060f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a2
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fcb18396659
RDX: 0000000000000110 RSI: 000000000000fbfe RDI: 00007fffe3006110
RBP: 00007fffe3006110 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003
R13: 00007fffe3006130 R14: 00007fffe300610c R15: 00007fffe3006120
CPU: 1 PID: 7966 Comm: syz-executor364 Not tainted 4.14.304-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 panic+0x1f9/0x42d kernel/panic.c:183
BTRFS: error (device loop3) in remove_from_free_space_tree:856: errno=-12 Out of memory
 __warn.cold+0x20/0x44 kernel/panic.c:547
 report_bug+0x208/0x250 lib/bug.c:183
BTRFS info (device loop3): forced readonly
 fixup_bug arch/x86/kernel/traps.c:177 [inline]
 fixup_bug arch/x86/kernel/traps.c:172 [inline]
 do_error_trap+0x195/0x2d0 arch/x86/kernel/traps.c:295
 invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:967
RIP: 0010:remove_from_free_space_tree.cold+0x14/0x37 fs/btrfs/free-space-tree.c:856
RSP: 0018:ffff888094d8fa68 EFLAGS: 00010286
RAX: 0000000000000026 RBX: 0000000000504000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff878bd020 RDI: ffffed10129b1f43
RBP: ffff88808e3aef78 R08: 0000000000000026 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88808e3aef18
BTRFS: error (device loop3) in btrfs_run_delayed_refs:3088: errno=-12 Out of memory
R13: 00000000fffffff4 R14: 0000000000000000 R15: ffff888097cacbe0
 alloc_reserved_tree_block fs/btrfs/extent-tree.c:8321 [inline]
 run_delayed_tree_ref fs/btrfs/extent-tree.c:2473 [inline]
 run_one_delayed_ref fs/btrfs/extent-tree.c:2549 [inline]
 __btrfs_run_delayed_refs+0x2834/0x3d10 fs/btrfs/extent-tree.c:2767
BTRFS: error (device loop3) in add_to_free_space_tree:1052: errno=-12 Out of memory
BTRFS: error (device loop3) in __btrfs_free_extent:7199: errno=-12 Out of memory
 btrfs_run_delayed_refs+0x19f/0x630 fs/btrfs/extent-tree.c:3086
 btrfs_commit_transaction+0x158/0x2210 fs/btrfs/transaction.c:1974
BTRFS: error (device loop3) in btrfs_run_delayed_refs:3088: errno=-12 Out of memory
 btrfs_sync_fs+0xe9/0x430 fs/btrfs/super.c:1217
 sync_fs_one_sb fs/sync.c:80 [inline]
 sync_fs_one_sb+0xb1/0xe0 fs/sync.c:77
 iterate_supers+0x124/0x490 fs/super.c:613
 sys_sync+0x9a/0x130 fs/sync.c:115
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7fcb18396659
RSP: 002b:00007fffe30060f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a2
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fcb18396659
RDX: 0000000000000110 RSI: 000000000000fbfe RDI: 00007fffe3006110
RBP: 00007fffe3006110 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003
R13: 00007fffe3006130 R14: 00007fffe300610c R15: 00007fffe3006120
CPU: 0 PID: 7964 Comm: syz-executor364 Not tainted 4.14.304-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 fail_dump lib/fault-inject.c:51 [inline]
 should_fail.cold+0x10a/0x149 lib/fault-inject.c:149
 should_failslab+0xd6/0x130 mm/failslab.c:32
 slab_pre_alloc_hook mm/slab.h:421 [inline]
 slab_alloc mm/slab.c:3376 [inline]
 kmem_cache_alloc+0x28e/0x3c0 mm/slab.c:3550
 alloc_reserved_tree_block fs/btrfs/extent-tree.c:8272 [inline]
 run_delayed_tree_ref fs/btrfs/extent-tree.c:2473 [inline]
 run_one_delayed_ref fs/btrfs/extent-tree.c:2549 [inline]
 __btrfs_run_delayed_refs+0x260e/0x3d10 fs/btrfs/extent-tree.c:2767
 btrfs_run_delayed_refs+0x19f/0x630 fs/btrfs/extent-tree.c:3086
 btrfs_commit_transaction+0x158/0x2210 fs/btrfs/transaction.c:1974
 btrfs_sync_fs+0xe9/0x430 fs/btrfs/super.c:1217
 sync_fs_one_sb fs/sync.c:80 [inline]
 sync_fs_one_sb+0xb1/0xe0 fs/sync.c:77
 iterate_supers+0x124/0x490 fs/super.c:613
 sys_sync+0x9a/0x130 fs/sync.c:115
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7fcb18396659
RSP: 002b:00007fffe30060f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a2
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fcb18396659
RDX: 0000000000000110 RSI: 000000000000fbfe RDI: 00007fffe3006110
RBP: 00007fffe3006110 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003
R13: 00007fffe3006130 R14: 00007fffe300610c R15: 00007fffe3006120
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/25 16:04 linux-4.14.y 3949d1610004 9dfcf09c .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 WARNING in __btrfs_run_delayed_refs
* Struck through repros no longer work on HEAD.