BTRFS info (device loop0): balance: start -d -m FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Not tainted 6.13.0-rc1-syzkaller-00025-gfeffde684ac2 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 fail_dump lib/fault-inject.c:53 [inline] should_fail_ex+0x3b0/0x4e0 lib/fault-inject.c:154 should_failslab+0xac/0x100 mm/failslab.c:46 slab_pre_alloc_hook mm/slub.c:4057 [inline] slab_alloc_node mm/slub.c:4133 [inline] kmem_cache_alloc_noprof+0x70/0x380 mm/slub.c:4160 add_delayed_ref+0x19e/0x1e90 fs/btrfs/delayed-ref.c:987 btrfs_alloc_tree_block+0xdfc/0x1440 fs/btrfs/extent-tree.c:5178 btrfs_force_cow_block+0x526/0x1da0 fs/btrfs/ctree.c:573 btrfs_cow_block+0x35e/0xa40 fs/btrfs/ctree.c:754 btrfs_search_slot+0xc01/0x3180 fs/btrfs/ctree.c:2156 btrfs_update_device+0x1b0/0x580 fs/btrfs/volumes.c:3020 btrfs_chunk_alloc_add_chunk_item+0x2cb/0x1100 fs/btrfs/volumes.c:5752 do_chunk_alloc fs/btrfs/block-group.c:3899 [inline] btrfs_chunk_alloc+0x7ca/0xf80 fs/btrfs/block-group.c:4187 btrfs_inc_block_group_ro+0x401/0x700 fs/btrfs/block-group.c:3019 btrfs_relocate_block_group+0x440/0xd90 fs/btrfs/relocation.c:4035 btrfs_relocate_chunk+0x12c/0x3b0 fs/btrfs/volumes.c:3494 __btrfs_balance+0x1b0f/0x26b0 fs/btrfs/volumes.c:4278 btrfs_balance+0xbdc/0x10c0 fs/btrfs/volumes.c:4655 btrfs_ioctl_balance+0x493/0x7c0 fs/btrfs/ioctl.c:3670 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbc2837ff19 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fbc2919e058 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fbc28546080 RCX: 00007fbc2837ff19 RDX: 0000000020000180 RSI: 00000000c4009420 RDI: 0000000000000007 RBP: 00007fbc2919e0a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 0000000000000000 R14: 00007fbc28546080 R15: 00007ffcbda7a888 BTRFS error (device loop0 state A): Transaction aborted (error -12) BTRFS: error (device loop0 state A) in do_chunk_alloc:3961: errno=-12 Out of memory BTRFS info (device loop0 state EA): forced readonly ------------[ cut here ]------------ WARNING: CPU: 0 PID: 5319 at fs/btrfs/space-info.h:250 btrfs_space_info_update_bytes_may_use+0x34c/0x660 fs/btrfs/space-info.h:250 Modules linked in: CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Not tainted 6.13.0-rc1-syzkaller-00025-gfeffde684ac2 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:btrfs_space_info_update_bytes_may_use+0x34c/0x660 fs/btrfs/space-info.h:250 Code: 00 00 74 08 4c 89 ff e8 22 4c 23 fe 49 8b 1f 48 89 df 48 8b 6c 24 20 48 89 ee e8 9f 66 b8 fd 48 39 eb 73 1d e8 35 64 b8 fd 90 <0f> 0b 90 45 31 f6 43 80 7c 25 00 00 0f 85 2e ff ff ff e9 31 ff ff RSP: 0018:ffffc9000d327800 EFLAGS: 00010293 RAX: ffffffff83e70deb RBX: 0000000000017000 RCX: ffff888000ccc880 RDX: 0000000000000000 RSI: 0000000000018000 RDI: 0000000000017000 RBP: 0000000000018000 R08: ffffffff83e70de1 R09: 1ffffffff20328be R10: dffffc0000000000 R11: fffffbfff20328bf R12: dffffc0000000000 R13: 1ffff11008ad180d R14: fffffffffffe8000 R15: ffff88804568c068 FS: 00007fbc2919e6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fbc1cfff000 CR3: 0000000042ffe000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_space_info_free_bytes_may_use fs/btrfs/space-info.h:283 [inline] block_rsv_release_bytes fs/btrfs/block-rsv.c:153 [inline] btrfs_block_rsv_release+0x4f4/0x5f0 fs/btrfs/block-rsv.c:294 btrfs_trans_release_chunk_metadata+0x7f/0xb0 fs/btrfs/transaction.c:253 do_chunk_alloc fs/btrfs/block-group.c:3965 [inline] btrfs_chunk_alloc+0xd68/0xf80 fs/btrfs/block-group.c:4187 btrfs_inc_block_group_ro+0x401/0x700 fs/btrfs/block-group.c:3019 btrfs_relocate_block_group+0x440/0xd90 fs/btrfs/relocation.c:4035 btrfs_relocate_chunk+0x12c/0x3b0 fs/btrfs/volumes.c:3494 __btrfs_balance+0x1b0f/0x26b0 fs/btrfs/volumes.c:4278 btrfs_balance+0xbdc/0x10c0 fs/btrfs/volumes.c:4655 btrfs_ioctl_balance+0x493/0x7c0 fs/btrfs/ioctl.c:3670 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbc2837ff19 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fbc2919e058 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fbc28546080 RCX: 00007fbc2837ff19 RDX: 0000000020000180 RSI: 00000000c4009420 RDI: 0000000000000007 RBP: 00007fbc2919e0a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 0000000000000000 R14: 00007fbc28546080 R15: 00007ffcbda7a888