syzbot


kernel BUG in bch2_btree_path_level_init (3)

Status: upstream: reported C repro on 2024/12/21 15:33
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+5824b2660896028cfe7f@syzkaller.appspotmail.com
First crash: 57d, last: 1h33m
Cause bisection: introduced by (bisect log) :
commit 2d02bfb01b2743da06748ba396ff7da4425488ef
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date: Fri Jan 5 19:17:57 2024 +0000

  bcachefs: improve validate_bset_keys()

Crash: kernel BUG in __bch2_bkey_unpack_key (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] kernel BUG in bch2_btree_path_level_init (3) 0 (2) 2024/12/24 04:33
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in bch2_btree_path_level_init bcachefs C 2 235d 245d 0/28 auto-obsoleted due to no activity on 2024/10/01 02:22
upstream kernel BUG in bch2_btree_path_level_init (2) bcachefs C done 29 62d 112d 28/28 fixed on 2024/12/16 09:50

Sample crash report:
bucket 0:38 data type btree ptr gen 0 missing in alloc btree
while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 7589ab5e0c11cc7a written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0, fixing
bucket 0:41 data type btree ptr gen 0 missing in alloc btree
while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 9aa2895aefce4bdf written 24 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0, fixing
------------[ cut here ]------------
kernel BUG at fs/bcachefs/btree_iter.c:631!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 UID: 0 PID: 5824 Comm: syz-executor915 Not tainted 6.13.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:bch2_btree_path_level_init+0x9ca/0x9f0 fs/bcachefs/btree_iter.c:631
Code: f5 fa ff ff e8 07 90 84 fd 90 0f 0b e8 ff 8f 84 fd 90 0f 0b e8 f7 8f 84 fd 90 0f 0b e8 ef 8f 84 fd 90 0f 0b e8 e7 8f 84 fd 90 <0f> 0b e8 df 8f 84 fd 90 0f 0b e8 d7 8f 84 fd 90 0f 0b e8 cf 8f 84
RSP: 0018:ffffc90003c0e1e0 EFLAGS: 00010293
RAX: ffffffff841ae3f9 RBX: 0000000000000000 RCX: ffff88802b623c00
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff841adc4c R09: 0000000000000000
R10: dffffc0000000000 R11: fffffbfff2030a6f R12: ffff888035ea7000
R13: 0000000000000000 R14: 0000000000000000 R15: ffff888078700033
FS:  0000555583fa8380(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000563ef9a5aa38 CR3: 0000000075522000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 btree_path_lock_root fs/bcachefs/btree_iter.c:769 [inline]
 bch2_btree_path_traverse_one+0x10de/0x2940 fs/bcachefs/btree_iter.c:1183
 bch2_btree_path_traverse fs/bcachefs/btree_iter.h:247 [inline]
 __bch2_btree_iter_peek fs/bcachefs/btree_iter.c:2210 [inline]
 bch2_btree_iter_peek_upto+0xb58/0x70e0 fs/bcachefs/btree_iter.c:2310
 bch2_btree_iter_peek_upto_type fs/bcachefs/btree_iter.h:685 [inline]
 bch2_gc_btree fs/bcachefs/btree_gc.c:670 [inline]
 bch2_gc_btrees fs/bcachefs/btree_gc.c:729 [inline]
 bch2_check_allocations+0x1abe/0x7070 fs/bcachefs/btree_gc.c:1133
 bch2_run_recovery_pass+0xf0/0x1e0 fs/bcachefs/recovery_passes.c:191
 bch2_run_recovery_passes+0x3a7/0x880 fs/bcachefs/recovery_passes.c:244
 bch2_fs_recovery+0x25cc/0x39d0 fs/bcachefs/recovery.c:861
 bch2_fs_start+0x356/0x5b0 fs/bcachefs/super.c:1037
 bch2_fs_get_tree+0xd68/0x1710 fs/bcachefs/fs.c:2170
 vfs_get_tree+0x90/0x2b0 fs/super.c:1814
 do_new_mount+0x2be/0xb40 fs/namespace.c:3507
 do_mount fs/namespace.c:3847 [inline]
 __do_sys_mount fs/namespace.c:4057 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4034
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f4309e24d3a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007ffe90004048 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffe90004060 RCX: 00007f4309e24d3a
RDX: 00000000200058c0 RSI: 0000000020005900 RDI: 00007ffe90004060
RBP: 0000000000000004 R08: 00007ffe900040a0 R09: 002c303030303030
R10: 0000000000800000 R11: 0000000000000282 R12: 0000000000800000
R13: 00007ffe900040a0 R14: 0000000000000003 R15: 0000000001000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bch2_btree_path_level_init+0x9ca/0x9f0 fs/bcachefs/btree_iter.c:631
Code: f5 fa ff ff e8 07 90 84 fd 90 0f 0b e8 ff 8f 84 fd 90 0f 0b e8 f7 8f 84 fd 90 0f 0b e8 ef 8f 84 fd 90 0f 0b e8 e7 8f 84 fd 90 <0f> 0b e8 df 8f 84 fd 90 0f 0b e8 d7 8f 84 fd 90 0f 0b e8 cf 8f 84
RSP: 0018:ffffc90003c0e1e0 EFLAGS: 00010293
RAX: ffffffff841ae3f9 RBX: 0000000000000000 RCX: ffff88802b623c00
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff841adc4c R09: 0000000000000000
R10: dffffc0000000000 R11: fffffbfff2030a6f R12: ffff888035ea7000
R13: 0000000000000000 R14: 0000000000000000 R15: ffff888078700033
FS:  0000555583fa8380(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000056262b6e7038 CR3: 0000000075522000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (28):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/23 08:10 upstream 4bbf9020becb b4fbdbd4 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in bch2_btree_path_level_init
2024/12/17 15:57 upstream f44d154d6e3d bc1a1b50 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/02/12 18:30 upstream 09fbf3d50205 b27c2402 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in bch2_btree_path_level_init
2025/02/13 03:00 upstream 4dc1d1bec898 2afad16e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/02/11 09:01 upstream febbc555cf0f 43f51a00 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/02/10 05:37 upstream 69b54314c975 ef44b750 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/02/07 08:53 upstream bb066fe812d6 53657d1b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/02/07 03:28 upstream bb066fe812d6 53657d1b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/02/04 09:28 upstream 0de63bb7d919 8f267cef .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/02/03 06:10 upstream 69e858e0b8b2 568559e4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/02/02 06:33 upstream 69e858e0b8b2 568559e4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/02/01 00:37 upstream 69e858e0b8b2 aa47157c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/01/29 06:16 upstream 805ba04cb7cc 865ef71e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/01/21 12:55 upstream 3d3a9c8b89d4 6e87cfa2 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/01/19 10:17 upstream fda5e3f28400 f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/01/18 21:33 upstream 595523945be0 f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/01/18 08:04 upstream ad26fc09dabf f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/01/12 03:37 upstream b62cef9a5c67 6dbc6a9b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/01/09 04:40 upstream 0b7958fa05d5 f3558dbf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/01/05 15:00 upstream ab75170520d4 f3558dbf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/01/04 18:20 upstream 63676eefb7a0 f3558dbf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2025/01/01 15:23 upstream ccb98ccef0e5 d3ccff63 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2024/12/30 02:10 upstream 4099a71718b0 d3ccff63 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2024/12/27 16:24 upstream d6ef8b40d075 d3ccff63 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2024/12/22 14:37 upstream 48f506ad0b68 b4fbdbd4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2024/12/22 00:44 upstream 499551201b5f d7f584ee .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2024/12/18 19:04 upstream aef25be35d23 1432fc84 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
2024/12/17 15:24 upstream f44d154d6e3d bc1a1b50 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_path_level_init
* Struck through repros no longer work on HEAD.