io_time[WRITE] 1 fragmentation 0 bp_start 8 , fixing incorrect key in need_discard btree (got deleted should be set) u64s 13 type alloc_v4 0:29:0 len 0 ver 0: gen 0 oldest_gen 0 data_type need_discard journal_seq 1 need_discard 1 need_inc_gen 1 dirty_sectors 0 stripe_sectors 0 cached_sectors 0 stripe 0 stripe_redundancy 0 io_time[READ] 1 io_time[WRITE] 1 fragmentation 0 bp_start 8 , fixing hole in alloc btree missing in freespace btree device 0 buckets 33-34, fixing hole in alloc btree missing in freespace btree device 0 buckets 36-37, fixing hole in alloc btree missing in freespace btree device 0 buckets 40-41, fixing incorrect key in need_discard btree (got deleted should be set) u64s 13 type alloc_v4 0:41:0 len 0 ver 0: gen 0 oldest_gen 0 data_type need_discard journal_seq 2 need_discard 1 need_inc_gen 1 dirty_sectors 0 stripe_sectors 0 cached_sectors 0 stripe 0 stripe_redundancy 0 io_time[READ] 1 io_time[WRITE] 1 fragmentation 0 bp_start 8 , fixing hole in alloc btree missing in freespace btree device 0 buckets 43-44, fixing hole in alloc btree missing in freespace btree device 0 buckets 45-120, fixing done bcachefs (loop0): check_lrus... done bcachefs (loop0): check_extents_to_backpointers... ------------[ cut here ]------------ kernel BUG at fs/bcachefs/btree_cache.h:131! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5325 Comm: syz.0.0 Not tainted 6.12.0-syzkaller-01892-g8f7c8b88bda4 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:bch2_btree_id_root fs/bcachefs/btree_cache.h:131 [inline] RIP: 0010:btree_path_lock_root fs/bcachefs/btree_iter.c:723 [inline] RIP: 0010:bch2_btree_path_traverse_one+0x28de/0x2940 fs/bcachefs/btree_iter.c:1183 Code: f4 8e 48 89 de e8 f2 60 dd 00 e9 78 f8 ff ff e8 68 ea 7a fd 90 0f 0b e8 90 dd af 07 e8 5b ea 7a fd 90 0f 0b e8 53 ea 7a fd 90 <0f> 0b e8 4b ea 7a fd 90 0f 0b e8 43 ea 7a fd 90 0f 0b 48 8b 4c 24 RSP: 0018:ffffc9000d2cddc0 EFLAGS: 00010246 RAX: ffffffff8419f3dd RBX: ffff888052e00000 RCX: 0000000000100000 RDX: ffffc9000e332000 RSI: 00000000000fffff RDI: 0000000000100000 RBP: ffffc9000d2ce0b0 R08: ffffffff8419e429 R09: ffffffff8419b489 R10: 0000000000000002 R11: ffff888000ce8000 R12: dffffc0000000000 R13: 000000000000000a R14: ffff888043bd0408 R15: 0000000000000000 FS: 00007fa0f7b526c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055cb8568d018 CR3: 000000003f3f0000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_btree_path_traverse fs/bcachefs/btree_iter.h:247 [inline] bch2_btree_iter_peek_slot+0x84f/0x2550 fs/bcachefs/btree_iter.c:2629 bch2_backpointer_get_key+0x2bc/0x970 fs/bcachefs/backpointers.c:327 check_bp_exists fs/bcachefs/backpointers.c:584 [inline] check_extent_to_backpointers+0x21f9/0x46b0 fs/bcachefs/backpointers.c:688 check_btree_root_to_backpointers fs/bcachefs/backpointers.c:722 [inline] bch2_check_extents_to_backpointers_pass fs/bcachefs/backpointers.c:873 [inline] bch2_check_extents_to_backpointers+0xeb8/0x1bf0 fs/bcachefs/backpointers.c:937 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:0x7fa0f6d7ffba 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:00007fa0f7b51e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fa0f7b51ef0 RCX: 00007fa0f6d7ffba RDX: 0000000020000000 RSI: 0000000020000080 RDI: 00007fa0f7b51eb0 RBP: 0000000020000000 R08: 00007fa0f7b51ef0 R09: 0000000000200010 R10: 0000000000200010 R11: 0000000000000246 R12: 0000000020000080 R13: 00007fa0f7b51eb0 R14: 00000000000059b1 R15: 00000000200001c0 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_btree_id_root fs/bcachefs/btree_cache.h:131 [inline] RIP: 0010:btree_path_lock_root fs/bcachefs/btree_iter.c:723 [inline] RIP: 0010:bch2_btree_path_traverse_one+0x28de/0x2940 fs/bcachefs/btree_iter.c:1183 Code: f4 8e 48 89 de e8 f2 60 dd 00 e9 78 f8 ff ff e8 68 ea 7a fd 90 0f 0b e8 90 dd af 07 e8 5b ea 7a fd 90 0f 0b e8 53 ea 7a fd 90 <0f> 0b e8 4b ea 7a fd 90 0f 0b e8 43 ea 7a fd 90 0f 0b 48 8b 4c 24 RSP: 0018:ffffc9000d2cddc0 EFLAGS: 00010246 RAX: ffffffff8419f3dd RBX: ffff888052e00000 RCX: 0000000000100000 RDX: ffffc9000e332000 RSI: 00000000000fffff RDI: 0000000000100000 RBP: ffffc9000d2ce0b0 R08: ffffffff8419e429 R09: ffffffff8419b489 R10: 0000000000000002 R11: ffff888000ce8000 R12: dffffc0000000000 R13: 000000000000000a R14: ffff888043bd0408 R15: 0000000000000000 FS: 00007fa0f7b526c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055cb8568d018 CR3: 000000003f3f0000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400