[btrfs?] WARNING in __btrfs_run_delayed_refs

4 views
Skip to first unread message

syzbot

unread,
Jan 25, 2023, 11:04:41 AM1/25/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3949d1610004 Linux 4.14.304
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13ff4fd5480000
kernel config: https://syzkaller.appspot.com/x/.config?x=db4418ccbf710113
dashboard link: https://syzkaller.appspot.com/bug?extid=cd962715b0cb6dd8d8e2
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=111b12c1480000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15fb03e5480000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/2230a6d7e7f4/disk-3949d161.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/9b8d5667f298/vmlinux-3949d161.xz
kernel image: https://storage.googleapis.com/syzbot-assets/825468a3e783/bzImage-3949d161.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/f0ddd0e22cd7/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+cd9627...@syzkaller.appspotmail.com

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..


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages