syzbot


kernel BUG in assertfail (2)

Status: fixed on 2023/09/28 17:51
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+c4614eae20a166c25bf0@syzkaller.appspotmail.com
Fix commit: 745806fb4554 btrfs: do not ASSERT() on duplicated global roots
First crash: 515d, last: 252d
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
  
Fix bisection: fixed by (bisect log) :
commit 745806fb4554f334e6406fa82b328562aa48f08f
Author: Qu Wenruo <wqu@suse.com>
Date: Sun Jun 11 00:09:13 2023 +0000

  btrfs: do not ASSERT() on duplicated global roots

  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] kernel BUG in assertfail (2) 1 (3) 2023/07/20 09:46
[syzbot] [btrfs] Monthly Report 1 (2) 2023/03/27 13:42
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in assertfail btrfs 1 1003d 997d 20/26 fixed on 2021/11/10 00:50
linux-6.1 kernel BUG in btrfs_global_root_insert C done 5 249d 318d 3/3 fixed on 2023/08/07 10:29

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 (162):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/09/27 06:26 upstream 3800a713b607 10323ddf .config strace log report syz C ci2-upstream-fs kernel BUG in assertfail
2022/09/26 00:10 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c194837ebb57 0042f2b4 .config console log report syz C [disk image] [vmlinux] ci-upstream-gce-arm64 kernel BUG in assertfail
2023/06/03 10:14 upstream 4ecd704a4c51 a4ae4f42 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in btrfs_global_root_insert
2023/06/02 08:20 upstream 1874a42a7d74 a4ae4f42 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root kernel BUG in btrfs_global_root_insert
2023/05/30 19:25 upstream 8b817fded42d 8d5c7541 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root kernel BUG in btrfs_global_root_insert
2023/05/17 22:31 upstream 1b66c114d161 3bb7af1d .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in btrfs_global_root_insert
2022/12/17 05:50 upstream 84e57d292203 05494336 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in btrfs_global_root_insert
2022/11/27 03:35 upstream 644e9524388a f4470a7b .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in btrfs_global_root_insert
2022/09/28 19:51 upstream 49c13ed0316d e2556bc3 .config strace log report syz C ci-upstream-kasan-gce-root kernel BUG in btrfs_global_root_insert
2022/12/12 17:21 upstream 830b3c68c1fb 67be1ae7 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root kernel BUG in btrfs_global_root_insert
2023/06/15 04:23 upstream b6dad5178cea 76decb82 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in btrfs_global_root_insert
2023/06/12 06:16 upstream 4c605260bc60 49519f06 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in btrfs_global_root_insert
2023/06/09 08:33 upstream 25041a4c02c7 7086cdb9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in btrfs_global_root_insert
2023/06/08 00:13 upstream a27648c74210 7086cdb9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in btrfs_global_root_insert
2023/05/31 06:19 upstream afead42fdfca 09898419 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in btrfs_global_root_insert
2023/05/23 08:49 upstream 421ca22e3138 4bce1a3e .config console log report info ci-upstream-kasan-gce-root kernel BUG in btrfs_global_root_insert
2023/05/05 11:33 upstream 3c4aa4434377 518a39a6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in btrfs_global_root_insert
2023/05/05 08:11 upstream 3c4aa4434377 518a39a6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in btrfs_global_root_insert
2023/05/03 16:41 upstream 348551ddaf31 b5918830 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root kernel BUG in btrfs_global_root_insert
2023/04/23 15:09 upstream 622322f53c6d 2b32bd34 .config console log report info ci-qemu-upstream kernel BUG in btrfs_global_root_insert
2023/04/22 12:45 upstream 8e41e0a57566 2b32bd34 .config console log report info ci-qemu-upstream kernel BUG in btrfs_global_root_insert
2023/04/18 06:47 upstream 6a8f57ae2eb0 436577a9 .config console log report info ci-qemu-upstream kernel BUG in btrfs_global_root_insert
2023/04/17 16:27 upstream 6a8f57ae2eb0 c6ec7083 .config console log report info ci-qemu-upstream kernel BUG in btrfs_global_root_insert
2023/04/25 05:15 upstream 1a0beef98b58 65320f8e .config console log report info ci-qemu-upstream-386 kernel BUG in btrfs_global_root_insert
2023/04/20 19:35 upstream cb0856346a60 5ed6c74d .config console log report info ci-qemu-upstream-386 kernel BUG in btrfs_global_root_insert
2023/06/08 10:56 linux-next 715abedee4cd 7086cdb9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in btrfs_global_root_insert
2023/06/08 07:27 linux-next 715abedee4cd 7086cdb9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in btrfs_global_root_insert
2023/06/02 18:20 linux-next 715abedee4cd a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in btrfs_global_root_insert
2023/05/23 22:39 linux-next 715abedee4cd 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in btrfs_global_root_insert
2023/05/01 11:29 linux-next 92e815cf07ed 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in btrfs_global_root_insert
2023/05/15 00:27 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/05/13 14:43 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/05/12 19:13 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a ecca8a24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/05/08 22:20 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/05/08 15:39 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/05/04 09:03 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a b5918830 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/27 06:29 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 19a3dabe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/27 01:25 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 19a3dabe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/26 23:53 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 19a3dabe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/26 12:49 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 7560799c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/25 09:56 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a fdc18293 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/25 07:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a fdc18293 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/24 07:34 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/24 05:28 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/23 20:31 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/22 23:26 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/22 09:06 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/21 23:43 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/21 05:33 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/20 03:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 327bf9bb94cf a219f34e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/20 00:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 327bf9bb94cf a219f34e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/18 09:43 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 327bf9bb94cf 436577a9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/17 05:48 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1f5b16c51aef ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/17 04:34 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1f5b16c51aef ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/16 20:42 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1f5b16c51aef ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/16 19:39 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1f5b16c51aef ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/16 11:27 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1f5b16c51aef ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
2023/04/16 06:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1f5b16c51aef ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_global_root_insert
* Struck through repros no longer work on HEAD.