Re: [syzbot] WARNING in __btrfs_free_extent

From: David Sterba
Date: Thu May 16 2024 - 12:12:33 EST


On Wed, Nov 02, 2022 at 03:30:56PM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: b229b6ca5abb Merge tag 'perf-tools-fixes-for-v6.1-2022-10-..
> git tree: upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=1661bcea880000
> kernel config: https://syzkaller.appspot.com/x/.config?x=1d3548a4365ba17d
> dashboard link: https://syzkaller.appspot.com/bug?extid=560e6a32d484d7293e37
> compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15e9ab22880000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=152ed4fc880000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/24728b72a896/disk-b229b6ca.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/10a3c40c60e1/vmlinux-b229b6ca.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/69f963b02b7e/bzImage-b229b6ca.xz
> mounted in repro: https://storage.googleapis.com/syzbot-assets/1f4e6872e39d/mount_2.gz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+560e6a32d484d7293e37@xxxxxxxxxxxxxxxxxxxxxxxxx
>
> BTRFS info (device loop0): enabling ssd optimizations
> ------------[ cut here ]------------
> BTRFS: Transaction aborted (error -12)
> WARNING: CPU: 1 PID: 3604 at fs/btrfs/extent-tree.c:3067 __btrfs_free_extent+0xbf6/0x2540 fs/btrfs/extent-tree.c:3067

That was an injected ENOMEM that then hit a transaction abort, we used
to print a full trace on that but it's been silenced.

#syz fix: btrfs: don't print stack trace when transaction is aborted due to ENOMEM