[syzbot] [btrfs?] WARNING in btrfs_create_pending_block_groups (2)

syzbot
2024-09-19T23:50:21Z

Hello,

syzbot found the following issue on:

HEAD commit: d42f7708e27c Merge tag 'for-linus-6.11' of git://git.kerne..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=10795900580000
kernel config: https://syzkaller.appspot.com/x/.config?x=1c9e296880039df9
dashboard link: https://syzkaller.appspot.com/bug?extid=b0643a1387dac0572b27
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11ede797980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15c4dd67980000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b879ea3b7dd4/disk-d42f7708.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/812a7fb7bfcc/vmlinux-d42f7708.xz
kernel image: https://storage.googleapis.com/syzbot-assets/806a22d4adbf/bzImage-d42f7708.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/b7ab2abbef2a/mount_0.gz

The issue was bisected to:

commit b2f78e88052bc0bee56bbf646d245fcfb431a873
Author: David Sterba <dsterba@suse.com>
Date: Thu Jul 22 18:54:37 2021 +0000

btrfs: allow degenerate raid0/raid10

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=17fee277980000
final oops: https://syzkaller.appspot.com/x/report.txt?x=1401e277980000
console output: https://syzkaller.appspot.com/x/log.txt?x=1001e277980000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+b0643a1387dac0572b27@syzkaller.appspotmail.com
Fixes: b2f78e88052b ("btrfs: allow degenerate raid0/raid10")

BTRFS info (device loop0): balance: start -s
------------[ cut here ]------------
BTRFS: Transaction aborted (error -28)
WARNING: CPU: 1 PID: 5219 at fs/btrfs/block-group.c:2752 btrfs_create_pending_block_groups+0x14f9/0x1710 fs/btrfs/block-group.c:2752
Modules linked in:
CPU: 1 UID: 0 PID: 5219 Comm: syz-executor144 Not tainted 6.11.0-rc7-syzkaller-00151-gd42f7708e27c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
RIP: 0010:btrfs_create_pending_block_groups+0x14f9/0x1710 fs/btrfs/block-group.c:2752
Code: c0 fd 4c 89 f7 be 03 00 00 00 e8 d2 58 d7 00 e9 86 f9 ff ff e8 a8 eb c0 fd 90 48 c7 c7 00 47 2e 8c 44 89 f6 e8 38 0f 83 fd 90 <0f> 0b 90 90 e9 7b fe ff ff e8 89 eb c0 fd 90 48 c7 c7 00 47 2e 8c
RSP: 0018:ffffc900034776a0 EFLAGS: 00010246
RAX: 7f15963a9c8f3600 RBX: ffff88807c9b4001 RCX: ffff88802be1da00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90003477960 R08: ffffffff8155b292 R09: fffffbfff1cba0e0
R10: dffffc0000000000 R11: fffffbfff1cba0e0 R12: 0000000000000000
R13: dffffc0000000000 R14: 00000000ffffffe4 R15: ffff8880323c49c0
FS: 00005555919dc380(0000) GS:ffff8880b8900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f46f00c80f8 CR3: 00000000253ae000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__btrfs_end_transaction+0x150/0x630 fs/btrfs/transaction.c:1066
btrfs_inc_block_group_ro+0x648/0x700 fs/btrfs/block-group.c:3043
btrfs_relocate_block_group+0x440/0xd90 fs/btrfs/relocation.c:4090
btrfs_relocate_chunk+0x12c/0x3b0 fs/btrfs/volumes.c:3374
__btrfs_balance+0x1b0f/0x26b0 fs/btrfs/volumes.c:4158
btrfs_balance+0xbdc/0x10c0 fs/btrfs/volumes.c:4535
btrfs_ioctl_balance+0x496/0x7d0 fs/btrfs/ioctl.c:3675
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl+0xfc/0x170 fs/ioctl.c:893
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:0x7f46f004bae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 17 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcdde70d78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f46f004bae9
RDX: 0000000020000040 RSI: 00000000c4009420 RDI: 0000000000000003
RBP: 00007f46f00c45f0 R08: 00005555919dd4c0 R09: 00005555919dd4c0
R10: 0000000000005598 R11: 0000000000000246 R12: 00007ffcdde70da0
R13: 00007ffcdde70fc8 R14: 431bde82d7b634db R15: 00007f46f009401d
</TASK>

---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup