bcachefs (loop2): alloc_read... done bcachefs (loop2): snapshots_read... done bcachefs (loop2): check_allocations... bcachefs (loop2): bucket 0:26 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 ac62141f8dc7e261 written 24 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, fixing ------------[ cut here ]------------ kernel BUG at fs/bcachefs/bset.h:287! Oops: invalid opcode: 0000 [#1] SMP PTI CPU: 0 UID: 0 PID: 3279 Comm: syz.2.16 Not tainted 6.15.0-rc4-syzkaller #0 PREEMPT(undef) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 RIP: 0010:bkey_cmp_p_or_unp fs/bcachefs/bset.h:287 [inline] RIP: 0010:bset_search_tree fs/bcachefs/bset.c:1121 [inline] RIP: 0010:__bch2_bset_search fs/bcachefs/bset.c:1173 [inline] RIP: 0010:bch2_btree_node_iter_init+0xbd7/0xc30 fs/bcachefs/bset.c:1326 Code: 48 8b 54 24 10 e8 39 f9 6e ff eb c8 e8 c2 69 17 01 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 <0f> 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f RSP: 0018:ffffc900034bb3d0 EFLAGS: 00010202 RAX: 000000000000004e RBX: 0000000000000000 RCX: ffff88810fba0080 RDX: 0000000000000002 RSI: ffffc900034bb458 RDI: ffff88810fba0288 RBP: ffffc900034bb4c0 R08: 0000000000000003 R09: ffff888101f7e108 R10: 0000000000000000 R11: 0000000000000004 R12: 0000000000000004 R13: ffff888174526000 R14: 0000000000000001 R15: 0000000000000001 FS: 00007fef471fc6c0(0000) GS:ffff8882b31bf000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055e45f919970 CR3: 0000000104f22000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __btree_path_level_init fs/bcachefs/btree_iter.c:603 [inline] bch2_btree_path_level_init+0xb9/0x120 fs/bcachefs/btree_iter.c:623 btree_path_lock_root fs/bcachefs/btree_iter.c:773 [inline] bch2_btree_path_traverse_one+0x690/0xc10 fs/bcachefs/btree_iter.c:1189 bch2_btree_path_traverse fs/bcachefs/btree_iter.h:248 [inline] __bch2_btree_iter_peek fs/bcachefs/btree_iter.c:2243 [inline] bch2_btree_iter_peek_max+0x289/0xe20 fs/bcachefs/btree_iter.c:2347 bch2_btree_iter_peek_max_type fs/bcachefs/btree_iter.h:702 [inline] bch2_gc_btree fs/bcachefs/btree_gc.c:677 [inline] bch2_gc_btrees fs/bcachefs/btree_gc.c:740 [inline] bch2_check_allocations+0x1a2f/0x2050 fs/bcachefs/btree_gc.c:1042 bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:227 [inline] bch2_run_recovery_passes+0x1d9/0x360 fs/bcachefs/recovery_passes.c:280 bch2_fs_recovery+0x9de/0x1390 fs/bcachefs/recovery.c:937 bch2_fs_start+0x2eb/0x440 fs/bcachefs/super.c:1091 bch2_fs_get_tree+0x4f8/0x6c0 fs/bcachefs/fs.c:2570 vfs_get_tree+0x26/0xf0 fs/super.c:1759 do_new_mount+0x13f/0x390 fs/namespace.c:3884 do_mount fs/namespace.c:4224 [inline] __do_sys_mount fs/namespace.c:4435 [inline] __se_sys_mount+0x147/0x1b0 fs/namespace.c:4412 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xe2/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fef463900ca Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fef471fbe68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fef471fbef0 RCX: 00007fef463900ca RDX: 00002000000058c0 RSI: 0000200000005900 RDI: 00007fef471fbeb0 RBP: 00002000000058c0 R08: 00007fef471fbef0 R09: 0000000000010000 R10: 0000000000010000 R11: 0000000000000246 R12: 0000200000005900 R13: 00007fef471fbeb0 R14: 0000000000005923 R15: 0000200000000040 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bkey_cmp_p_or_unp fs/bcachefs/bset.h:287 [inline] RIP: 0010:bset_search_tree fs/bcachefs/bset.c:1121 [inline] RIP: 0010:__bch2_bset_search fs/bcachefs/bset.c:1173 [inline] RIP: 0010:bch2_btree_node_iter_init+0xbd7/0xc30 fs/bcachefs/bset.c:1326 Code: 48 8b 54 24 10 e8 39 f9 6e ff eb c8 e8 c2 69 17 01 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 <0f> 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f RSP: 0018:ffffc900034bb3d0 EFLAGS: 00010202 RAX: 000000000000004e RBX: 0000000000000000 RCX: ffff88810fba0080 RDX: 0000000000000002 RSI: ffffc900034bb458 RDI: ffff88810fba0288 RBP: ffffc900034bb4c0 R08: 0000000000000003 R09: ffff888101f7e108 R10: 0000000000000000 R11: 0000000000000004 R12: 0000000000000004 R13: ffff888174526000 R14: 0000000000000001 R15: 0000000000000001 FS: 00007fef471fc6c0(0000) GS:ffff8882b31bf000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055e45f919970 CR3: 0000000104f22000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400