BTRFS warning (device loop0): to be deleted qgroup 0/5 has non-zero numbers, data 1294336 meta prealloc 36864 meta pertrans 53248 BTRFS error (device loop0): failed to run delayed ref for logical 5259264 num_bytes 8192 type 178 action 1 ref_mod 1: -2 ------------[ cut here ]------------ BTRFS: Transaction aborted (error -2) WARNING: fs/btrfs/extent-tree.c:2192 at btrfs_run_delayed_refs+0x30b/0x3b0 fs/btrfs/extent-tree.c:2192, CPU#0: syz.0.0/5329 Modules linked in: CPU: 0 UID: 0 PID: 5329 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_run_delayed_refs+0x30e/0x3b0 fs/btrfs/extent-tree.c:2192 Code: 85 e4 75 07 e8 63 b2 e0 fd eb 7a e8 ac b6 c5 fd 84 c0 74 20 e8 53 b2 e0 fd eb 6a e8 4c b2 e0 fd 48 8d 3d 25 c0 35 0c 44 89 fe <67> 48 0f b9 3a e9 0b ff ff ff e8 e3 ec ca 07 41 89 c4 31 ff 89 c6 RSP: 0018:ffffc9000f8df658 EFLAGS: 00010287 RAX: ffffffff83e4fb04 RBX: ffff888047a8f000 RCX: 0000000000100000 RDX: ffffc90020001000 RSI: 00000000fffffffe RDI: ffffffff901abb30 RBP: 0000000000000000 R08: ffff888036f58000 R09: 0000000000000003 R10: 00000000fffffffb R11: 0000000000000002 R12: ffff888037090001 R13: ffff88801221c000 R14: dffffc0000000000 R15: 00000000fffffffe FS: 00007f95f21f56c0(0000) GS:ffff88808ca58000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00002000000c5000 CR3: 00000000348ce000 CR4: 0000000000352ef0 Call Trace: btrfs_commit_transaction+0x29a/0x31a0 fs/btrfs/transaction.c:2238 btrfs_sync_file+0xdee/0x1260 fs/btrfs/file.c:1817 generic_write_sync include/linux/fs.h:2640 [inline] btrfs_do_write_iter+0x72e/0x880 fs/btrfs/file.c:1468 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x61d/0xb90 fs/read_write.c:688 ksys_write+0x150/0x270 fs/read_write.c:740 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f95f5d9c799 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:00007f95f21f4fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f95f6016090 RCX: 00007f95f5d9c799 RDX: 000000000000000e RSI: 0000200000000080 RDI: 000000000000000b RBP: 00007f95f5e32c99 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f95f6016128 R14: 00007f95f6016090 R15: 00007ffd7ee8dab8 ---------------- Code disassembly (best guess): 0: 85 e4 test %esp,%esp 2: 75 07 jne 0xb 4: e8 63 b2 e0 fd call 0xfde0b26c 9: eb 7a jmp 0x85 b: e8 ac b6 c5 fd call 0xfdc5b6bc 10: 84 c0 test %al,%al 12: 74 20 je 0x34 14: e8 53 b2 e0 fd call 0xfde0b26c 19: eb 6a jmp 0x85 1b: e8 4c b2 e0 fd call 0xfde0b26c 20: 48 8d 3d 25 c0 35 0c lea 0xc35c025(%rip),%rdi # 0xc35c04c 27: 44 89 fe mov %r15d,%esi * 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction 2f: e9 0b ff ff ff jmp 0xffffff3f 34: e8 e3 ec ca 07 call 0x7caed1c 39: 41 89 c4 mov %eax,%r12d 3c: 31 ff xor %edi,%edi 3e: 89 c6 mov %eax,%esi