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: 5350 Comm: syz.0.0 Not tainted 6.16.0-rc1-syzkaller-00003-gf09079bd04a9 #0 PREEMPT(full) 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_lvl+0x189/0x250 lib/dump_stack.c:120 fail_dump lib/fault-inject.c:73 [inline] should_fail_ex+0x414/0x560 lib/fault-inject.c:174 should_failslab+0xa8/0x100 mm/failslab.c:46 slab_pre_alloc_hook mm/slub.c:4101 [inline] slab_alloc_node mm/slub.c:4177 [inline] kmem_cache_alloc_noprof+0x73/0x3c0 mm/slub.c:4204 add_delayed_ref+0x139/0x1d80 fs/btrfs/delayed-ref.c:1008 btrfs_alloc_tree_block+0xcfc/0x12b0 fs/btrfs/extent-tree.c:5216 btrfs_force_cow_block+0x575/0x1e10 fs/btrfs/ctree.c:506 btrfs_cow_block+0x40a/0x830 fs/btrfs/ctree.c:688 btrfs_search_slot+0xcd7/0x2d90 fs/btrfs/ctree.c:2088 btrfs_update_device+0x149/0x4c0 fs/btrfs/volumes.c:2950 btrfs_chunk_alloc_add_chunk_item+0x2ab/0x1070 fs/btrfs/volumes.c:5692 do_chunk_alloc fs/btrfs/block-group.c:3936 [inline] btrfs_chunk_alloc+0x7e2/0x1150 fs/btrfs/block-group.c:4231 btrfs_inc_block_group_ro+0x415/0x6f0 fs/btrfs/block-group.c:3053 btrfs_relocate_block_group+0x47a/0xde0 fs/btrfs/relocation.c:3962 btrfs_relocate_chunk+0x12a/0x3b0 fs/btrfs/volumes.c:3431 __btrfs_balance+0x1870/0x21d0 fs/btrfs/volumes.c:4206 btrfs_balance+0xc94/0x11d0 fs/btrfs/volumes.c:4583 btrfs_ioctl_balance+0x3d3/0x610 fs/btrfs/ioctl.c:3583 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd76798e929 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:00007fd768875038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fd767bb6160 RCX: 00007fd76798e929 RDX: 0000200000000180 RSI: 00000000c4009420 RDI: 0000000000000004 RBP: 00007fd768875090 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 0000000000000000 R14: 00007fd767bb6160 R15: 00007ffcd34a51f8 BTRFS error (device loop0 state A): Transaction aborted (error -12) BTRFS: error (device loop0 state A) in do_chunk_alloc:4006: errno=-12 Out of memory BTRFS info (device loop0 state EA): forced readonly ------------[ cut here ]------------ WARNING: CPU: 0 PID: 5350 at fs/btrfs/space-info.h:265 btrfs_space_info_update_bytes_may_use+0x35a/0x640 fs/btrfs/space-info.h:265 Modules linked in: CPU: 0 UID: 0 PID: 5350 Comm: syz.0.0 Not tainted 6.16.0-rc1-syzkaller-00003-gf09079bd04a9 #0 PREEMPT(full) 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+0x35a/0x640 fs/btrfs/space-info.h:265 Code: 00 00 74 08 4c 89 ff e8 04 64 3d fe 4d 8b 27 4c 89 e7 48 8b 6c 24 18 48 89 ee e8 e1 ee d9 fd 49 39 ec 73 1c e8 77 ec d9 fd 90 <0f> 0b 90 31 db 43 80 7c 35 00 00 0f 85 2e ff ff ff e9 31 ff ff ff RSP: 0018:ffffc9000d857800 EFLAGS: 00010293 RAX: ffffffff83e67279 RBX: fffffffffffe8000 RCX: ffff888000144880 RDX: 0000000000000000 RSI: 0000000000018000 RDI: 0000000000017000 RBP: 0000000000018000 R08: ffffffff8fa108f7 R09: 1ffffffff1f4211e R10: dffffc0000000000 R11: fffffbfff1f4211f R12: 0000000000017000 R13: 1ffff1100615f010 R14: dffffc0000000000 R15: ffff888030af8080 FS: 00007fd7688756c0(0000) GS:ffff88808d252000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000564750de7630 CR3: 000000003616a000 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:297 [inline] block_rsv_release_bytes fs/btrfs/block-rsv.c:153 [inline] btrfs_block_rsv_release+0x4b3/0x5e0 fs/btrfs/block-rsv.c:292 btrfs_trans_release_chunk_metadata+0x7f/0xb0 fs/btrfs/transaction.c:259 do_chunk_alloc fs/btrfs/block-group.c:4010 [inline] btrfs_chunk_alloc+0xd75/0x1150 fs/btrfs/block-group.c:4231 btrfs_inc_block_group_ro+0x415/0x6f0 fs/btrfs/block-group.c:3053 btrfs_relocate_block_group+0x47a/0xde0 fs/btrfs/relocation.c:3962 btrfs_relocate_chunk+0x12a/0x3b0 fs/btrfs/volumes.c:3431 __btrfs_balance+0x1870/0x21d0 fs/btrfs/volumes.c:4206 btrfs_balance+0xc94/0x11d0 fs/btrfs/volumes.c:4583 btrfs_ioctl_balance+0x3d3/0x610 fs/btrfs/ioctl.c:3583 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd76798e929 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:00007fd768875038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fd767bb6160 RCX: 00007fd76798e929 RDX: 0000200000000180 RSI: 00000000c4009420 RDI: 0000000000000004 RBP: 00007fd768875090 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 0000000000000000 R14: 00007fd767bb6160 R15: 00007ffcd34a51f8