while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 4a8b0fa43a9980a6 written 24 min_key POS_MIN durability: 1 ptr: 0:37:0 gen 0, fixing bcachefs (loop2): bucket 0:42 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 1db8f60c84bb244c written 8 min_key POS_MIN durability: 1 ptr: 0:42:0 gen 0, fixing done bcachefs (loop2): going read-write bcachefs (loop2): journal_replay... ------------[ cut here ]------------ kernel BUG at fs/bcachefs/btree_update.c:339! Oops: invalid opcode: 0000 [#1] SMP PTI CPU: 0 UID: 0 PID: 3357 Comm: syz.2.16 Not tainted 6.16.0-rc2-syzkaller #0 PREEMPT(undef) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 RIP: 0010:__btree_trans_update_by_path+0x59e/0x5b0 fs/bcachefs/btree_update.c:339 Code: 18 48 8b 48 10 49 89 4e 10 48 8b 08 48 8b 50 08 49 89 56 08 49 89 0e 48 83 c0 28 49 89 04 24 e9 82 fe ff ff e8 63 bd 27 01 90 <0f> 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 90 90 90 90 RSP: 0018:ffffc900037735c0 EFLAGS: 00010246 RAX: 0000000000008542 RBX: ffff88817a184000 RCX: 0000000000000088 RDX: ffff88810fbd4900 RSI: 0000000000000001 RDI: ffff88817a184000 RBP: ffff88817a184000 R08: ffffffff81c46091 R09: 0000000000000000 R10: 0000000000180000 R11: 0000000000000088 R12: ffff88817a184250 R13: 0000000000180000 R14: ffff88810fbd4900 R15: 0000000000000001 FS: 00007fcca05a76c0(0000) GS:ffff8882b2f2e000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000562dba846450 CR3: 0000000102b6a000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_trans_update_by_path fs/bcachefs/btree_update.c:454 [inline] bch2_trans_update_ip+0x326/0x6a0 fs/bcachefs/btree_update.c:546 bch2_trans_update fs/bcachefs/btree_update.h:123 [inline] bch2_journal_replay_key+0x200/0x330 fs/bcachefs/recovery.c:311 bch2_journal_replay+0x655/0xb80 fs/bcachefs/recovery.c:396 bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline] __bch2_run_recovery_passes+0x168/0x3a0 fs/bcachefs/recovery_passes.c:539 bch2_run_recovery_passes+0x98/0xb0 fs/bcachefs/recovery_passes.c:610 bch2_fs_recovery+0xd78/0x13e0 fs/bcachefs/recovery.c:1005 bch2_fs_start+0x3e5/0x540 fs/bcachefs/super.c:1212 bch2_fs_get_tree+0x2ba/0x740 fs/bcachefs/fs.c:2488 vfs_get_tree+0x29/0xf0 fs/super.c:1802 do_new_mount+0x13f/0x390 fs/namespace.c:3885 do_mount fs/namespace.c:4222 [inline] __do_sys_mount fs/namespace.c:4433 [inline] __se_sys_mount+0x147/0x1b0 fs/namespace.c:4410 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xe2/0x2f0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fcc9f7900ca 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:00007fcca05a6e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fcca05a6ef0 RCX: 00007fcc9f7900ca RDX: 00002000000000c0 RSI: 0000200000000080 RDI: 00007fcca05a6eb0 RBP: 00002000000000c0 R08: 00007fcca05a6ef0 R09: 0000000000818001 R10: 0000000000818001 R11: 0000000000000246 R12: 0000200000000080 R13: 00007fcca05a6eb0 R14: 00000000000059bf R15: 0000200000000480 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__btree_trans_update_by_path+0x59e/0x5b0 fs/bcachefs/btree_update.c:339 Code: 18 48 8b 48 10 49 89 4e 10 48 8b 08 48 8b 50 08 49 89 56 08 49 89 0e 48 83 c0 28 49 89 04 24 e9 82 fe ff ff e8 63 bd 27 01 90 <0f> 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 90 90 90 90 RSP: 0018:ffffc900037735c0 EFLAGS: 00010246 RAX: 0000000000008542 RBX: ffff88817a184000 RCX: 0000000000000088 RDX: ffff88810fbd4900 RSI: 0000000000000001 RDI: ffff88817a184000 RBP: ffff88817a184000 R08: ffffffff81c46091 R09: 0000000000000000 R10: 0000000000180000 R11: 0000000000000088 R12: ffff88817a184250 R13: 0000000000180000 R14: ffff88810fbd4900 R15: 0000000000000001 FS: 00007fcca05a76c0(0000) GS:ffff8882b2f2e000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000562dba846450 CR3: 0000000102b6a000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400