bcachefs (loop2): bch2_get_scanned_nodes(): recovering u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 22000000ba0abe32 written 8 min_key POS_MIN durability: 1 ptr: 0:31:0 gen 0 invalid bkey in btree_node btree=xattrs level=0: u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 22000000ba0abe32 written 8 min_key POS_MIN durability: 1 ptr: 0:31:0 gen 0 key at POS_MAX: delete?, fixing ------------[ cut here ]------------ kernel BUG at fs/bcachefs/btree_node_scan.c:546! Oops: invalid opcode: 0000 [#1] PREEMPT SMP PTI CPU: 0 UID: 0 PID: 3363 Comm: syz.2.15 Not tainted 6.12.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 RIP: 0010:bch2_get_scanned_nodes+0x6d3/0x6e0 fs/bcachefs/btree_node_scan.c:541 Code: c9 89 d6 48 0f bd f6 29 f1 d3 e2 39 c2 0f 97 c1 d3 ea 41 89 d5 e9 a6 fc ff ff 89 c5 e9 75 f9 ff ff e8 61 9a 42 01 90 0f 0b 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:ffffc9000363f7c8 EFLAGS: 00010282 RAX: 00000000fffff75b RBX: 0000000000000003 RCX: 0000000000003750 RDX: 0000000000003748 RSI: 00000000000352e0 RDI: 00000000ffffffff RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffc9000363f838 R13: 0000000000000000 R14: 0000000000000000 R15: ffff88810db80000 FS: 00007ffa784c96c0(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055aa0276e4f8 CR3: 0000000106b86000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_check_topology+0x2ab/0x4c0 fs/bcachefs/btree_gc.c:543 bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:222 [inline] bch2_run_recovery_passes+0x115/0x290 fs/bcachefs/recovery_passes.c:285 bch2_fs_recovery+0x8d0/0x1200 fs/bcachefs/recovery.c:897 bch2_fs_start+0x1c9/0x290 fs/bcachefs/super.c:1037 bch2_fs_get_tree+0x2b5/0x650 fs/bcachefs/fs.c:2201 vfs_get_tree+0x27/0xf0 fs/super.c:1814 do_new_mount+0x15a/0x3a0 fs/namespace.c:3507 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount+0x148/0x1b0 fs/namespace.c:4034 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xe0/0x220 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ffa77781faa 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:00007ffa784c8e88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ffa784c8f10 RCX: 00007ffa77781faa RDX: 00000000200000c0 RSI: 0000000020000040 RDI: 00007ffa784c8ed0 RBP: 00000000200000c0 R08: 00007ffa784c8f10 R09: 0000000000800000 R10: 0000000000800000 R11: 0000000000000246 R12: 0000000020000040 R13: 00007ffa784c8ed0 R14: 0000000000005960 R15: 0000000020000280 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_get_scanned_nodes+0x6d3/0x6e0 fs/bcachefs/btree_node_scan.c:541 Code: c9 89 d6 48 0f bd f6 29 f1 d3 e2 39 c2 0f 97 c1 d3 ea 41 89 d5 e9 a6 fc ff ff 89 c5 e9 75 f9 ff ff e8 61 9a 42 01 90 0f 0b 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:ffffc9000363f7c8 EFLAGS: 00010282 RAX: 00000000fffff75b RBX: 0000000000000003 RCX: 0000000000003750 RDX: 0000000000003748 RSI: 00000000000352e0 RDI: 00000000ffffffff RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffc9000363f838 R13: 0000000000000000 R14: 0000000000000000 R15: ffff88810db80000 FS: 00007ffa784c96c0(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055aa0276e4f8 CR3: 0000000106b86000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400