syzbot


WARNING in btrfs_commit_transaction

Status: fixed on 2023/02/24 13:50
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+9c37714c07194d816417@syzkaller.appspotmail.com
Fix commit: 8bb808c6ad91 btrfs: don't print stack trace when transaction is aborted due to ENOMEM
First crash: 537d, last: 439d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: WARNING in btrfs_commit_transaction (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit 8bb808c6ad91ec3d332f072ce8f8aa4b16e307e0
Author: David Sterba <dsterba@suse.com>
Date: Thu Nov 3 13:39:01 2022 +0000

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

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] WARNING in btrfs_commit_transaction 3 (5) 2022/11/30 08:03
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 WARNING in btrfs_commit_transaction (2) 1 496d 496d 0/1 auto-obsoleted due to no activity on 2023/04/08 10:50
linux-4.14 WARNING in btrfs_commit_transaction btrfs C 2 415d 787d 0/1 upstream: reported C repro on 2022/02/21 07:21
linux-6.1 WARNING in btrfs_commit_transaction origin:upstream C 4 33d 190d 0/3 upstream: reported C repro on 2023/10/11 08:58
linux-4.19 WARNING in btrfs_commit_transaction 1 1109d 1109d 0/1 auto-closed as invalid on 2021/08/03 10:34
linux-5.15 WARNING in btrfs_commit_transaction origin:lts-only C done 28 38d 367d 0/3 upstream: reported C repro on 2023/04/17 01:21
upstream WARNING in btrfs_commit_transaction (2) btrfs C done 86 8d14h 378d 0/26 upstream: reported C repro on 2023/04/06 02:24

Sample crash report:
BTRFS warning (device loop0): Skipping commit of aborted transaction.
------------[ cut here ]------------
BTRFS: Transaction aborted (error -28)
WARNING: CPU: 0 PID: 5071 at fs/btrfs/transaction.c:1984 cleanup_transaction fs/btrfs/transaction.c:1984 [inline]
WARNING: CPU: 0 PID: 5071 at fs/btrfs/transaction.c:1984 btrfs_commit_transaction.cold+0x1f8/0xaab fs/btrfs/transaction.c:2553
Modules linked in:
CPU: 0 PID: 5071 Comm: syz-executor875 Not tainted 6.2.0-rc5-syzkaller-00205-gc96618275234 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
RIP: 0010:cleanup_transaction fs/btrfs/transaction.c:1984 [inline]
RIP: 0010:btrfs_commit_transaction.cold+0x1f8/0xaab fs/btrfs/transaction.c:2553
Code: 21 ff ff 31 ff 89 c3 89 c6 e8 36 d0 b5 f7 84 db 0f 84 63 01 00 00 e8 b9 d3 b5 f7 44 89 ee 48 c7 c7 40 cf 94 8a e8 e4 33 f4 ff <0f> 0b e8 a3 d3 b5 f7 ba c0 07 00 00 44 89 e9 4c 89 ff 44 0f b6 c3
RSP: 0018:ffffc90003d1f648 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
RDX: ffff8880751457c0 RSI: ffffffff816680ec RDI: fffff520007a3ebb
RBP: ffffc90003d1f7c8 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000000 R11: 0000000000000000 R12: 0000000000000000
R13: 00000000ffffffe4 R14: ffff888028934000 R15: ffff888074d3b888
FS:  00007fa628178700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3ffeaf1300 CR3: 000000002954a000 CR4: 0000000000350ee0
Call Trace:
 <TASK>
 prepare_to_relocate+0x41d/0x6b0 fs/btrfs/relocation.c:3600
 relocate_block_group+0x123/0xd60 fs/btrfs/relocation.c:3625
 btrfs_relocate_block_group+0x51a/0xda0 fs/btrfs/relocation.c:4087
 btrfs_relocate_chunk+0x14a/0x350 fs/btrfs/volumes.c:3249
 __btrfs_balance fs/btrfs/volumes.c:3977 [inline]
 btrfs_balance+0x1caf/0x3b50 fs/btrfs/volumes.c:4361
 btrfs_ioctl_balance fs/btrfs/ioctl.c:3591 [inline]
 btrfs_ioctl+0xfda/0x5830 fs/btrfs/ioctl.c:4622
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __x64_sys_ioctl+0x197/0x210 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fa6281cc5e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 15 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:00007fa6281782f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fa6282567a0 RCX: 00007fa6281cc5e9
RDX: 0000000020000980 RSI: 00000000c4009420 RDI: 0000000000000004
RBP: 00007fa6282231b0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0030656c69662f2e
R13: 676e69646e65702e R14: 2e31bb3492b9dae8 R15: 00007fa6282567a8
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/29 14:51 upstream c96618275234 9dfcf09c .config strace log report syz C [mounted in repro] ci-upstream-kasan-gce-root WARNING in btrfs_commit_transaction
2022/10/29 17:36 upstream b229b6ca5abb 899d812a .config strace log report syz C [mounted in repro] ci-upstream-kasan-gce-root WARNING in btrfs_commit_transaction
2023/02/04 05:41 upstream 7b753a909f42 1b2f701a .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in btrfs_commit_transaction
* Struck through repros no longer work on HEAD.