BTRFS info (device loop0): balance: start -f -s ------------[ cut here ]------------ btrfs_abort_should_print_stack(__error) WARNING: fs/btrfs/block-group.c:2944 at btrfs_create_pending_block_groups+0x13d8/0x15e0 fs/btrfs/block-group.c:2944, CPU#0: syz.0.0/5319 Modules linked in: CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:btrfs_create_pending_block_groups+0x13d8/0x15e0 fs/btrfs/block-group.c:2944 Code: 83 fb f4 75 63 e8 48 61 84 fd eb 65 e8 41 61 84 fd eb 1a e8 3a 61 84 fd 49 be 00 00 00 00 00 fc ff df eb 09 e8 29 61 84 fd 90 <0f> 0b 90 f7 db e9 47 fd ff ff e8 19 61 84 fd eb 10 e8 12 61 84 fd RSP: 0000:ffffc9000e537720 EFLAGS: 00010293 RAX: ffffffff8443c057 RBX: 00000000ffffffe4 RCX: ffff888034700000 RDX: 0000000000000000 RSI: ffffffff90412cf0 RDI: 00000000ffffffe4 RBP: ffffc9000e5379a0 R08: ffff888034700000 R09: 0000000000000003 R10: 00000000fffffffb R11: 0000000000000000 R12: ffff888050ffe150 R13: fffff52001ca6f00 R14: dffffc0000000000 R15: ffff888050ffe318 FS: 00007fb7c74546c0(0000) GS:ffff88808b0b4000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fd42ec46fdf CR3: 00000000137b6000 CR4: 0000000000352ef0 Call Trace: __btrfs_end_transaction+0x140/0x640 fs/btrfs/transaction.c:1102 btrfs_inc_block_group_ro+0x64b/0x7d0 fs/btrfs/block-group.c:3249 btrfs_relocate_block_group+0x285/0xaf0 fs/btrfs/relocation.c:5501 btrfs_relocate_chunk+0x114/0x810 fs/btrfs/volumes.c:3729 __btrfs_balance+0x1b5f/0x29d0 fs/btrfs/volumes.c:4668 btrfs_balance+0xaa6/0x1180 fs/btrfs/volumes.c:5055 btrfs_ioctl_balance+0x3da/0x640 fs/btrfs/ioctl.c:3494 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb7c659e1d9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb7c7453fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fb7c6825fa0 RCX: 00007fb7c659e1d9 RDX: 0000200000000300 RSI: 00000000c4009420 RDI: 0000000000000004 RBP: 00007fb7c6635888 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fb7c6826038 R14: 00007fb7c6825fa0 R15: 00007ffd34392138