bcachefs (loop6): bch2_get_scanned_nodes(): recovering u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq c6c25c03258c59c5 written 16 min_key POS_MIN durability: 1 ptr: 0:27:0 gen 0 invalid bkey in btree_node btree=extents level=0: u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq c6c25c03258c59c5 written 16 min_key POS_MIN durability: 1 ptr: 0:27:0 gen 0 size == 0: delete?, fixing ------------[ cut here ]------------ kernel BUG at fs/bcachefs/btree_node_scan.c:546! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 0 UID: 0 PID: 27298 Comm: syz.6.4415 Not tainted 6.12.0-next-20241128-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 RIP: 0010:bch2_get_scanned_nodes+0x1e23/0x1e30 fs/bcachefs/btree_node_scan.c:541 Code: 24 18 48 8d b4 24 f0 03 00 00 48 8b 94 24 00 01 00 00 e9 17 e8 ff ff e8 4b de a7 07 e8 f6 74 73 fd 90 0f 0b e8 ee 74 73 fd 90 <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc9000b6fecc0 EFLAGS: 00010246 RAX: ffffffff842c0012 RBX: ffff88806d880000 RCX: 0000000000080000 RDX: ffffc90015f6b000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc9000b6ff160 R08: ffffffff842bf611 R09: 1ffffffff2858944 R10: dffffc0000000000 R11: fffffbfff2858945 R12: 1ffff920016dfdcc R13: ffffc9000b6ff020 R14: 00000000fffff75b R15: dffffc0000000000 FS: 00007fba4ffc66c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f14ca3fefb8 CR3: 0000000067f9e000 CR4: 00000000003526f0 DR0: 0000000000002800 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: bch2_check_topology+0x597/0xbb0 fs/bcachefs/btree_gc.c:543 bch2_run_recovery_pass+0xf0/0x1e0 fs/bcachefs/recovery_passes.c:222 bch2_run_recovery_passes+0x290/0x9f0 fs/bcachefs/recovery_passes.c:285 bch2_fs_recovery+0x2660/0x3ab0 fs/bcachefs/recovery.c:917 bch2_fs_start+0x37c/0x610 fs/bcachefs/super.c:1037 bch2_fs_get_tree+0xd8d/0x1740 fs/bcachefs/fs.c:2201 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:0x7fba4f181faa 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:00007fba4ffc5e88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fba4ffc5f10 RCX: 00007fba4f181faa RDX: 00000000200000c0 RSI: 0000000020000500 RDI: 00007fba4ffc5ed0 RBP: 00000000200000c0 R08: 00007fba4ffc5f10 R09: 0000000001808416 R10: 0000000001808416 R11: 0000000000000246 R12: 0000000020000500 R13: 00007fba4ffc5ed0 R14: 0000000000005960 R15: 0000000020005f80 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_get_scanned_nodes+0x1e23/0x1e30 fs/bcachefs/btree_node_scan.c:541 Code: 24 18 48 8d b4 24 f0 03 00 00 48 8b 94 24 00 01 00 00 e9 17 e8 ff ff e8 4b de a7 07 e8 f6 74 73 fd 90 0f 0b e8 ee 74 73 fd 90 <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc9000b6fecc0 EFLAGS: 00010246 RAX: ffffffff842c0012 RBX: ffff88806d880000 RCX: 0000000000080000 RDX: ffffc90015f6b000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc9000b6ff160 R08: ffffffff842bf611 R09: 1ffffffff2858944 R10: dffffc0000000000 R11: fffffbfff2858945 R12: 1ffff920016dfdcc R13: ffffc9000b6ff020 R14: 00000000fffff75b R15: dffffc0000000000 FS: 00007fba4ffc66c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c3e1fc0 CR3: 0000000067f9e000 CR4: 00000000003526f0 DR0: 0000000000002800 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400