[v6.1] kernel BUG in btrfs_exclop_balance

0 views
Skip to first unread message

syzbot

unread,
Jun 4, 2023, 4:48:05 PM6/4/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d2869ace6eeb Linux 6.1.31
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=175cf82d280000
kernel config: https://syzkaller.appspot.com/x/.config?x=623aacf949348d7d
dashboard link: https://syzkaller.appspot.com/bug?extid=25d31944df2ee34214f5
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=135d24c9280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16b0da1d280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/2ed651ed0d8f/disk-d2869ace.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b8d3199c542c/vmlinux-d2869ace.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a44812549bf7/bzImage-d2869ace.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/bebe7f514e53/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+25d319...@syzkaller.appspotmail.com

assertion failed: fs_info->exclusive_operation == BTRFS_EXCLOP_BALANCE_PAUSED, in fs/btrfs/ioctl.c:454
------------[ cut here ]------------
kernel BUG at fs/btrfs/ctree.h:3716!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 4597 Comm: syz-executor138 Not tainted 6.1.31-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
RIP: 0010:assertfail+0x18/0x1a fs/btrfs/ctree.h:3716
Code: 0b e8 f7 7c 08 f7 48 c7 c7 60 2f c7 91 e9 9b a7 94 f9 89 f1 48 89 fe 48 c7 c7 c0 56 2e 8b 48 c7 c2 e8 51 2e 8b e8 7c 85 ff ff <0f> 0b 89 f1 48 89 fe 48 c7 c7 00 70 2e 8b 48 c7 c2 20 6b 2e 8b e8
RSP: 0018:ffffc9000b0cfe48 EFLAGS: 00010246
RAX: 0000000000000066 RBX: 1ffff11003569c1c RCX: 7eecb1a9e8baf200
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000000000002 R08: ffffffff816d9a9c R09: fffff52001619f41
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88801ab4e0e0
R13: ffff88801ab4c000 R14: ffff88801ab4c688 R15: dffffc0000000000
FS: 00007f7c13737700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fab2458f308 CR3: 00000000228ee000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
btrfs_exclop_balance+0x145/0x1e0 fs/btrfs/ioctl.c:454
btrfs_ioctl_balance+0x482/0x7c0 fs/btrfs/ioctl.c:4453
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f7c1b3d1479
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 31 16 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:00007f7c137372f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f7c1b461580 RCX: 00007f7c1b3d1479
RDX: 0000000020000540 RSI: 00000000c4009420 RDI: 0000000000000004
RBP: 00007f7c1b428330 R08: 00007f7c13737700 R09: 0000000000000000
R10: 00007f7c13737700 R11: 0000000000000246 R12: 7fffffffffffffff
R13: 0000000100000001 R14: 8000000000000001 R15: 00007f7c1b461588
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:assertfail+0x18/0x1a fs/btrfs/ctree.h:3716
Code: 0b e8 f7 7c 08 f7 48 c7 c7 60 2f c7 91 e9 9b a7 94 f9 89 f1 48 89 fe 48 c7 c7 c0 56 2e 8b 48 c7 c2 e8 51 2e 8b e8 7c 85 ff ff <0f> 0b 89 f1 48 89 fe 48 c7 c7 00 70 2e 8b 48 c7 c2 20 6b 2e 8b e8
RSP: 0018:ffffc9000b0cfe48 EFLAGS: 00010246
RAX: 0000000000000066 RBX: 1ffff11003569c1c RCX: 7eecb1a9e8baf200
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000000000002 R08: ffffffff816d9a9c R09: fffff52001619f41
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88801ab4e0e0
R13: ffff88801ab4c000 R14: ffff88801ab4c688 R15: dffffc0000000000
FS: 00007f7c13737700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fab2458f308 CR3: 00000000228ee000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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 syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the bug is already fixed, 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 change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

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

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

syzbot

unread,
Dec 11, 2023, 6:22:05 PM12/11/23
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit b19c98f237cd76981aaded52c258ce93f7daa8cb
git tree: upstream
Author: Josef Bacik <jo...@toxicpanda.com>
Date: Fri Jun 23 05:05:41 2023 +0000

btrfs: fix race between balance and cancel/pause

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=141924b6e80000
Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages