syzbot


kernel BUG in bch2_btree_node_iter_init_from_start

Status: upstream: reported C repro on 2024/12/18 21:21
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+381eead9693b057ae73f@syzkaller.appspotmail.com
First crash: 6d17h, last: 6h07m
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] kernel BUG in bch2_btree_node_iter_init_from_start 0 (2) 2024/12/21 08:07
Cause bisection attempts (1)
Created Duration User Patch Repo Result
2024/12/21 08:28 bisect upstream running

Sample crash report:
btree node with incorrect min_key  at btree snapshots level 1:
  parent: u64s 5 type btree_ptr SPOS_MAX len 0 ver 0
  next: u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq d771a06d670df06c written 536 min_key 674309865472:0:0 durability: 1 ptr: 0:32:0 gen 0, fixing
bcachefs (loop0): set_node_min(): u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq d771a06d670df06c written 536 min_key 674309865472:0:0 durability: 1 ptr: 0:32:0 gen 0 -> 9710702841361986335:2465851572921718109:1388148219
------------[ cut here ]------------
kernel BUG at fs/bcachefs/bset.c:1354!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 UID: 0 PID: 5823 Comm: syz-executor860 Not tainted 6.13.0-rc3-syzkaller-00193-ge9b8ffafd20a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:bch2_btree_node_iter_init_from_start+0x446/0x460 fs/bcachefs/bset.c:1354
Code: c4 80 00 00 00 5b 41 5c 41 5d 41 5e 41 5f 5d e9 40 ae ff ff e8 0b 2f 8a fd 90 0f 0b e8 03 2f 8a fd 90 0f 0b e8 fb 2e 8a fd 90 <0f> 0b e8 f3 2e 8a fd 90 0f 0b e8 eb 2e 8a fd 90 0f 0b e8 e3 2e 8a
RSP: 0018:ffffc90003eee828 EFLAGS: 00010293
RAX: ffffffff841544a5 RBX: ffff8880734c009e RCX: ffff888033451e00
RDX: 0000000000000000 RSI: ffff8880734c00a0 RDI: ffff8880734c0008
RBP: 0000000000000013 R08: ffffffff84154119 R09: 0000000000000000
R10: ffffc90003eee920 R11: fffff520007ddd25 R12: ffff8880277888f8
R13: ffff888027788908 R14: dffffc0000000000 R15: ffffc90003eee920
FS:  00007f32a0c696c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055a384727ff8 CR3: 0000000032b60000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bch2_btree_and_journal_iter_init_node_iter+0x98/0x200 fs/bcachefs/btree_journal_iter.c:478
 bch2_btree_repair_topology_recurse+0x45c8/0x6750 fs/bcachefs/btree_gc.c:447
 bch2_check_topology+0x692/0xb20 fs/bcachefs/btree_gc.c:550
 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:0x7f32a0cb471a
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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f32a0c68fd8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f32a0c68ff0 RCX: 00007f32a0cb471a
RDX: 000000002000f640 RSI: 000000002000f680 RDI: 00007f32a0c68ff0
RBP: 0000000000000004 R08: 00007f32a0c69030 R09: 000000000000f625
R10: 0000000000000084 R11: 0000000000000282 R12: 00007f32a0c69030
R13: 0000000000000084 R14: 0000000000000003 R15: 0000000001000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bch2_btree_node_iter_init_from_start+0x446/0x460 fs/bcachefs/bset.c:1354
Code: c4 80 00 00 00 5b 41 5c 41 5d 41 5e 41 5f 5d e9 40 ae ff ff e8 0b 2f 8a fd 90 0f 0b e8 03 2f 8a fd 90 0f 0b e8 fb 2e 8a fd 90 <0f> 0b e8 f3 2e 8a fd 90 0f 0b e8 eb 2e 8a fd 90 0f 0b e8 e3 2e 8a
RSP: 0018:ffffc90003eee828 EFLAGS: 00010293
RAX: ffffffff841544a5 RBX: ffff8880734c009e RCX: ffff888033451e00
RDX: 0000000000000000 RSI: ffff8880734c00a0 RDI: ffff8880734c0008
RBP: 0000000000000013 R08: ffffffff84154119 R09: 0000000000000000
R10: ffffc90003eee920 R11: fffff520007ddd25 R12: ffff8880277888f8
R13: ffff888027788908 R14: dffffc0000000000 R15: ffffc90003eee920
FS:  00007f32a0c696c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055a384727ff8 CR3: 0000000032b60000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/21 08:07 upstream e9b8ffafd20a d7f584ee .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in bch2_btree_node_iter_init_from_start
2024/12/14 21:13 upstream a446e965a188 7cbfbb3a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_node_iter_init_from_start
* Struck through repros no longer work on HEAD.