syzbot


kernel BUG in btrfs_backref_release_cache

Status: upstream: reported on 2025/02/21 18:17
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+1de7265d1e4c0c19dd35@syzkaller.appspotmail.com
First crash: 56d, last: 10d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] kernel BUG in btrfs_backref_release_cache 1 (2) 2025/03/27 18:26

Sample crash report:
BTRFS info (device loop0): balance: start -d -m
BTRFS info (device loop0): relocating block group 8519680 flags data|metadata
BTRFS info (device loop0): relocating block group 5242880 flags data|metadata
BTRFS info (device loop0): found 34 extents, stage: move data extents
assertion failed: !cache->nr_nodes, in fs/btrfs/backref.c:3160
------------[ cut here ]------------
kernel BUG at fs/btrfs/backref.c:3160!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5355 Comm: syz.0.0 Not tainted 6.14.0-syzkaller-13189-ge48e99b6edf4 #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_backref_release_cache+0x1b5/0x1e0 fs/btrfs/backref.c:3160
Code: 19 fd 90 0f 0b e8 4b 17 b6 fd 48 c7 c7 e0 77 8e 8c 48 c7 c6 80 80 8e 8c 48 c7 c2 80 78 8e 8c b9 58 0c 00 00 e8 0c cc 19 fd 90 <0f> 0b e8 24 17 b6 fd 48 c7 c7 e0 77 8e 8c 48 c7 c6 c0 80 8e 8c 48
RSP: 0018:ffffc9000d51f858 EFLAGS: 00010246
RAX: 000000000000003e RBX: 0000000000000001 RCX: d2a008cea2cac800
RDX: ffffc9000ebcb000 RSI: 00000000000eab61 RDI: 00000000000eab62
RBP: ffffc9000d51fa20 R08: ffffffff81a2a4dc R09: 1ffff92001aa3ea8
R10: dffffc0000000000 R11: fffff52001aa3ea9 R12: dffffc0000000000
R13: dffffc0000000000 R14: ffff8880530d20f0 R15: ffff8880530d2020
FS:  00007f2fd7c0d6c0(0000) GS:ffff88808c597000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00002000005dd000 CR3: 0000000032f72000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 relocate_block_group+0xac4/0xd50 fs/btrfs/relocation.c:3665
 btrfs_relocate_block_group+0x777/0xd80 fs/btrfs/relocation.c:4011
 btrfs_relocate_chunk+0x12c/0x3b0 fs/btrfs/volumes.c:3511
 __btrfs_balance+0x1a93/0x25e0 fs/btrfs/volumes.c:4292
 btrfs_balance+0xbde/0x10c0 fs/btrfs/volumes.c:4669
 btrfs_ioctl_balance+0x3f5/0x660 fs/btrfs/ioctl.c:3586
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:906 [inline]
 __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:892
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2fd6d8d169
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:00007f2fd7c0d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2fd6fa6080 RCX: 00007f2fd6d8d169
RDX: 0000200000000180 RSI: 00000000c4009420 RDI: 0000000000000004
RBP: 00007f2fd6e0e2a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f2fd6fa6080 R15: 00007ffc920228a8
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:btrfs_backref_release_cache+0x1b5/0x1e0 fs/btrfs/backref.c:3160
Code: 19 fd 90 0f 0b e8 4b 17 b6 fd 48 c7 c7 e0 77 8e 8c 48 c7 c6 80 80 8e 8c 48 c7 c2 80 78 8e 8c b9 58 0c 00 00 e8 0c cc 19 fd 90 <0f> 0b e8 24 17 b6 fd 48 c7 c7 e0 77 8e 8c 48 c7 c6 c0 80 8e 8c 48
RSP: 0018:ffffc9000d51f858 EFLAGS: 00010246
RAX: 000000000000003e RBX: 0000000000000001 RCX: d2a008cea2cac800
RDX: ffffc9000ebcb000 RSI: 00000000000eab61 RDI: 00000000000eab62
RBP: ffffc9000d51fa20 R08: ffffffff81a2a4dc R09: 1ffff92001aa3ea8
R10: dffffc0000000000 R11: fffff52001aa3ea9 R12: dffffc0000000000
R13: dffffc0000000000 R14: ffff8880530d20f0 R15: ffff8880530d2020
FS:  00007f2fd7c0d6c0(0000) GS:ffff88808c597000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055d41ad110b8 CR3: 0000000032f72000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/05 03:56 upstream e48e99b6edf4 c53ea9c9 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in btrfs_backref_release_cache
2025/03/30 04:54 upstream 93d52288679e d3999433 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in btrfs_backref_release_cache
2025/02/17 18:11 upstream 0ad2507d5d93 4121cf9d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in btrfs_backref_release_cache
* Struck through repros no longer work on HEAD.