syzbot


kernel BUG in assertfail (2)

Status: upstream: reported C repro on 2022/09/26 17:49
Reported-by: syzbot+c4614eae20a166c25bf0@syzkaller.appspotmail.com
First crash: 68d, last: 5d06h

Cause bisection: introduced by (bisect log) :
commit abed4aaae4f71a7bcdbe90a65319b6e772a2689d
Author: Josef Bacik <josef@toxicpanda.com>
Date: Fri Nov 5 20:45:51 2021 +0000

  btrfs: track the csum, extent, and free space trees in a rb tree

Crash: kernel BUG in btrfs_global_root_insert (log)
Repro: C syz .config
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in assertfail 1 557d 551d 22/24 fixed on 2021/11/10 00:50

Sample crash report:
BTRFS error (device loop0: state C): failed to load root csum
assertion failed: !tmp, in fs/btrfs/disk-io.c:1103
------------[ cut here ]------------
kernel BUG at fs/btrfs/ctree.h:3664!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 3608 Comm: syz-executor356 Not tainted 6.0.0-rc7-syzkaller-00029-g3800a713b607 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
RIP: 0010:assertfail+0x1a/0x1c fs/btrfs/ctree.h:3663
Code: 48 c7 c2 80 0d da 8a 31 c0 e8 41 e5 ff ff 0f 0b 89 f1 48 89 fe 48 c7 c7 80 30 da 8a 48 c7 c2 80 69 da 8a 31 c0 e8 25 e5 ff ff <0f> 0b 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 e4 e0 48 81 ec
RSP: 0018:ffffc90003aaf250 EFLAGS: 00010246
RAX: 0000000000000032 RBX: 0000000000000000 RCX: f21c13f886638400
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffff888021c640a0 R08: ffffffff816bd38d R09: ffffed10173667f1
R10: ffffed10173667f1 R11: 1ffff110173667f0 R12: dffffc0000000000
R13: ffff8880229c21f7 R14: ffff888021c64060 R15: ffff8880226c0000
FS:  0000555556a73300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055a2637d7a00 CR3: 00000000709c4000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 btrfs_global_root_insert+0x1a7/0x1b0 fs/btrfs/disk-io.c:1103
 load_global_roots_objectid+0x482/0x8c0 fs/btrfs/disk-io.c:2467
 load_global_roots fs/btrfs/disk-io.c:2501 [inline]
 btrfs_read_roots fs/btrfs/disk-io.c:2528 [inline]
 init_tree_roots+0xccb/0x203c fs/btrfs/disk-io.c:2939
 open_ctree+0x1e53/0x33df fs/btrfs/disk-io.c:3574
 btrfs_fill_super+0x1c6/0x2d0 fs/btrfs/super.c:1456
 btrfs_mount_root+0x885/0x9a0 fs/btrfs/super.c:1824
 legacy_get_tree+0xea/0x180 fs/fs_context.c:610
 vfs_get_tree+0x88/0x270 fs/super.c:1530
 fc_mount fs/namespace.c:1043 [inline]
 vfs_kern_mount+0xc9/0x160 fs/namespace.c:1073
 btrfs_mount+0x3d3/0xbb0 fs/btrfs/super.c:1884
 legacy_get_tree+0xea/0x180 fs/fs_context.c:610
 vfs_get_tree+0x88/0x270 fs/super.c:1530
 do_new_mount+0x289/0xad0 fs/namespace.c:3040
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount+0x2d3/0x3c0 fs/namespace.c:3568
 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:0x7f7bdf39d93a
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffce0654f78 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffce0654fd0 RCX: 00007f7bdf39d93a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffce0654f90
RBP: 00007ffce0654f90 R08: 00007ffce0654fd0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000282 R12: 00000000200006e0
R13: 0000000000000003 R14: 0000000000000004 R15: 0000000000000034
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:assertfail+0x1a/0x1c fs/btrfs/ctree.h:3663
Code: 48 c7 c2 80 0d da 8a 31 c0 e8 41 e5 ff ff 0f 0b 89 f1 48 89 fe 48 c7 c7 80 30 da 8a 48 c7 c2 80 69 da 8a 31 c0 e8 25 e5 ff ff <0f> 0b 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 e4 e0 48 81 ec
RSP: 0018:ffffc90003aaf250 EFLAGS: 00010246
RAX: 0000000000000032 RBX: 0000000000000000 RCX: f21c13f886638400
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffff888021c640a0 R08: ffffffff816bd38d R09: ffffed10173667f1
R10: ffffed10173667f1 R11: 1ffff110173667f0 R12: dffffc0000000000
R13: ffff8880229c21f7 R14: ffff888021c64060 R15: ffff8880226c0000
FS:  0000555556a73300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000005d84c8 CR3: 00000000709c4000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-fs 2022/09/27 06:26 upstream 3800a713b607 10323ddf .config log report syz C kernel BUG in assertfail
ci-upstream-gce-arm64 2022/09/26 00:10 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c194837ebb57 0042f2b4 .config log report syz C kernel BUG in assertfail
ci2-upstream-fs 2022/11/27 03:35 upstream 644e9524388a f4470a7b .config log report syz C kernel BUG in btrfs_global_root_insert
ci-upstream-kasan-gce-root 2022/09/28 19:51 upstream 49c13ed0316d e2556bc3 .config log report syz C kernel BUG in btrfs_global_root_insert
ci-upstream-kasan-gce-root 2022/11/28 10:04 upstream bf82d38c91f8 74a66371 .config log report info kernel BUG in btrfs_global_root_insert
ci-upstream-kasan-gce-root 2022/11/26 03:46 upstream 0b1dcc2cf55a 74a66371 .config log report info kernel BUG in btrfs_global_root_insert
ci-upstream-kasan-gce-selinux-root 2022/11/19 07:33 upstream 84368d882b96 5bb70014 .config log report info kernel BUG in btrfs_global_root_insert
ci-upstream-kasan-gce-selinux-root 2022/10/28 11:54 upstream b229b6ca5abb 86777b7f .config log report info kernel BUG in btrfs_global_root_insert
* Struck through repros no longer work on HEAD.