[v6.1] WARNING in btrfs_chunk_alloc (2)

0 views
Skip to first unread message

syzbot

unread,
Nov 15, 2023, 11:30:21 AM11/15/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: fb2635ac69ab Linux 6.1.62
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15ec1c48e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=d1540e3da5e5623f
dashboard link: https://syzkaller.appspot.com/bug?extid=57de2b05959bc1e659af
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/1bcbea336c80/disk-fb2635ac.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/859797d77ed0/vmlinux-fb2635ac.xz
kernel image: https://storage.googleapis.com/syzbot-assets/acd7a084757b/bzImage-fb2635ac.xz

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

------------[ cut here ]------------
WARNING: CPU: 1 PID: 33 at fs/btrfs/block-group.c:3621 do_chunk_alloc fs/btrfs/block-group.c:3621 [inline]
WARNING: CPU: 1 PID: 33 at fs/btrfs/block-group.c:3621 btrfs_chunk_alloc+0xe47/0xff0 fs/btrfs/block-group.c:3863
Modules linked in:
CPU: 1 PID: 33 Comm: kworker/u4:2 Not tainted 6.1.62-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
Workqueue: events_unbound btrfs_async_reclaim_metadata_space
RIP: 0010:do_chunk_alloc fs/btrfs/block-group.c:3621 [inline]
RIP: 0010:btrfs_chunk_alloc+0xe47/0xff0 fs/btrfs/block-group.c:3863
Code: fd 48 c7 c7 40 b4 2f 8b 44 89 e6 e8 83 b4 a5 fd 0f 0b e9 02 fe ff ff e8 c7 c7 dd fd 48 c7 c7 40 b4 2f 8b 89 ee e8 69 b4 a5 fd <0f> 0b e9 0d fe ff ff e8 ad c7 dd fd 48 c7 c7 40 b4 2f 8b 44 89 e6
RSP: 0000:ffffc90000a9f9c8 EFLAGS: 00010246
RAX: 8a5b9d5623b87400 RBX: ffff8880927a0001 RCX: ffff888016a91dc0
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffffffffffffe4 R08: ffffffff81527dae R09: ffffed1017324f1c
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888077993800
R13: dffffc0000000000 R14: ffff8880950da000 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa5916ef068 CR3: 0000000073794000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
flush_space+0xa03/0xe60 fs/btrfs/space-info.c:766
btrfs_async_reclaim_metadata_space+0x29b/0x340 fs/btrfs/space-info.c:1080
process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</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 syzk...@googlegroups.com.

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

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

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

syzbot

unread,
Nov 15, 2023, 5:39:24 PM11/15/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: fb2635ac69ab Linux 6.1.62
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1320532f680000
kernel config: https://syzkaller.appspot.com/x/.config?x=d1540e3da5e5623f
dashboard link: https://syzkaller.appspot.com/bug?extid=57de2b05959bc1e659af
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=16a7c024e80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13a1a6b8e80000
mounted in repro: https://storage.googleapis.com/syzbot-assets/b762eb5072d0/mount_0.gz

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

------------[ cut here ]------------
WARNING: CPU: 1 PID: 3604 at fs/btrfs/block-group.c:3621 do_chunk_alloc fs/btrfs/block-group.c:3621 [inline]
WARNING: CPU: 1 PID: 3604 at fs/btrfs/block-group.c:3621 btrfs_chunk_alloc+0xe47/0xff0 fs/btrfs/block-group.c:3863
Modules linked in:
CPU: 1 PID: 3604 Comm: kworker/u4:4 Not tainted 6.1.62-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
Workqueue: events_unbound btrfs_async_reclaim_metadata_space
RIP: 0010:do_chunk_alloc fs/btrfs/block-group.c:3621 [inline]
RIP: 0010:btrfs_chunk_alloc+0xe47/0xff0 fs/btrfs/block-group.c:3863
Code: fd 48 c7 c7 40 b4 2f 8b 44 89 e6 e8 83 b4 a5 fd 0f 0b e9 02 fe ff ff e8 c7 c7 dd fd 48 c7 c7 40 b4 2f 8b 89 ee e8 69 b4 a5 fd <0f> 0b e9 0d fe ff ff e8 ad c7 dd fd 48 c7 c7 40 b4 2f 8b 44 89 e6
RSP: 0018:ffffc90003eaf9c8 EFLAGS: 00010246
RAX: 50fd748f32610700 RBX: ffff8880231c4001 RCX: ffff888020045940
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffffffffffffe4 R08: ffffffff81527dae R09: ffffed1017324f1c
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8880769f5800
R13: dffffc0000000000 R14: ffff88807d193000 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020261000 CR3: 000000001bc5b000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
flush_space+0xa03/0xe60 fs/btrfs/space-info.c:766
btrfs_async_reclaim_metadata_space+0x29b/0x340 fs/btrfs/space-info.c:1080
process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>


---
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.

syzbot

unread,
Dec 7, 2023, 4:53:06 PM12/7/23
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit f8f210dc84709804c9f952297f2bfafa6ea6b4bd
git tree: upstream
Author: Filipe Manana <fdma...@suse.com>
Date: Tue Mar 21 11:13:59 2023 +0000

btrfs: calculate the right space for delayed refs when updating global reserve

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=141d910ee80000
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