bcachefs (loop0): scan_for_btree_nodes... bcachefs (loop0): btree node scan found 6 nodes after overwrites done bcachefs (loop0): check_topology... bcachefs (loop0): btree root snapshots unreadable, must recover from scan bcachefs (loop0): no nodes found for btree snapshots, continuing done bcachefs (loop0): accounting_read... done bcachefs (loop0): alloc_read... done bcachefs (loop0): snapshots_read... bcachefs (loop0): running explicit recovery pass reconstruct_snapshots (21), currently at snapshots_read (7) done bcachefs (loop0): check_allocations... bcachefs (loop0): bucket 0:34 data type user ptr gen 0 missing in alloc btree while marking u64s 8 type extent 4099:8:U32_MAX len 8 ver 1: durability: 1 crc: c_size 8 size 8 offset 0 nonce 0 csum chacha20_poly1305_80 e371:ac69b75b10c57971 compress incompressible ptr: 0:34:0 gen 0, fixing bcachefs (loop0): bucket 0:27 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 4e0410879b0c2f04 written 16 min_key POS_MIN durability: 1 ptr: 0:27:0 gen 0, fixing bcachefs (loop0): bucket 0:38 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 2a20405ac3f40602 written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0, fixing bcachefs (loop0): bucket 0:41 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 267fcf747c875937 written 24 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0, fixing bcachefs (loop0): bucket 0:31 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 1b881868e2a6abe1 written 16 min_key POS_MIN durability: 1 ptr: 0:31:0 gen 0, fixing bcachefs (loop0): bucket 0:35 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 d682cebdf2a7eb26 written 16 min_key POS_MIN durability: 1 ptr: 0:35:0 gen 0, fixing bcachefs (loop0): bucket 0:28 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 93dda84068e88b3f written 16 min_key POS_MIN durability: 1 ptr: 0:28:0 gen 0, fixing bcachefs (loop0): bucket 0:29 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 b6c44d07df4e9bb7 written 48 min_key POS_MIN durability: 1 ptr: 0:29:0 gen 0, fixing bcachefs (loop0): bucket 0:36 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 3b468546fb27822d written 24 min_key POS_MIN durability: 1 ptr: 0:36:0 gen 0, fixing bcachefs (loop0): bucket 0:40 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 82036bda63714c10 written 8 min_key POS_MIN durability: 1 ptr: 0:40:0 gen 0, fixing done bcachefs (loop0): going read-write bcachefs (loop0): journal_replay... done bcachefs (loop0): check_alloc_info... bcachefs (loop0): hole in alloc btree missing in freespace btree device 0 buckets 26-27, fixing bcachefs (loop0): hole in alloc btree missing in freespace btree device 0 buckets 32-33, fixing done bcachefs (loop0): check_lrus... done bcachefs (loop0): check_backpointers_to_extents... done bcachefs (loop0): check_extents_to_backpointers... bcachefs (loop0): scanning for missing backpointers in 2/128 buckets done bcachefs (loop0): reconstruct_snapshots... bcachefs (loop0): snapshot node 4294967295 from tree 4294967295 missing, recreating ------------[ cut here ]------------ kernel BUG at fs/bcachefs/bkey_types.h:210! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5322 Comm: syz.0.0 Not tainted 6.15.0-rc7-syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:bkey_s_c_to_subvolume fs/bcachefs/bkey_types.h:210 [inline] RIP: 0010:check_snapshot_exists fs/bcachefs/snapshot.c:882 [inline] RIP: 0010:bch2_reconstruct_snapshots+0x2197/0x21a0 fs/bcachefs/snapshot.c:999 Code: 21 e1 fc e8 1b 55 0d 07 e8 86 c0 76 fd e8 c1 ad d8 fd 4c 89 e7 89 de e8 07 21 e1 fc e8 72 c0 76 fd 90 0f 0b e8 6a c0 76 fd 90 <0f> 0b 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc9000d60efc0 EFLAGS: 00010293 RAX: ffffffff84493166 RBX: ffff888041e2ac30 RCX: ffff88800096c880 RDX: 0000000000000000 RSI: 00000000000000c9 RDI: 0000000000000015 RBP: ffffc9000d60f340 R08: ffffc9000d60e947 R09: 0000000000000000 R10: ffffc9000d60e920 R11: fffff52001ac1d29 R12: ffffc9000d60f148 R13: ffff888052dff8a0 R14: 00000000000000c9 R15: 1ffff1100a5bff14 FS: 00007f7f7628f6c0(0000) GS:ffff88808d6c2000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000056436bab44e0 CR3: 0000000041dc8000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_run_recovery_pass+0xdf/0x1d0 fs/bcachefs/recovery_passes.c:227 bch2_run_recovery_passes+0x2a0/0xdb0 fs/bcachefs/recovery_passes.c:280 bch2_fs_recovery+0x2399/0x37b0 fs/bcachefs/recovery.c:937 bch2_fs_start+0x70b/0xae0 fs/bcachefs/super.c:1096 bch2_fs_get_tree+0xad7/0x13b0 fs/bcachefs/fs.c:2507 vfs_get_tree+0x8f/0x2b0 fs/super.c:1759 do_new_mount+0x24a/0xa40 fs/namespace.c:3881 do_mount fs/namespace.c:4221 [inline] __do_sys_mount fs/namespace.c:4432 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4409 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7f7539010a 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:00007f7f7628ee68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f7f7628eef0 RCX: 00007f7f7539010a RDX: 000020000000f640 RSI: 0000200000000140 RDI: 00007f7f7628eeb0 RBP: 000020000000f640 R08: 00007f7f7628eef0 R09: 0000000000804008 R10: 0000000000804008 R11: 0000000000000246 R12: 0000200000000140 R13: 00007f7f7628eeb0 R14: 000000000000f626 R15: 0000200000000080 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bkey_s_c_to_subvolume fs/bcachefs/bkey_types.h:210 [inline] RIP: 0010:check_snapshot_exists fs/bcachefs/snapshot.c:882 [inline] RIP: 0010:bch2_reconstruct_snapshots+0x2197/0x21a0 fs/bcachefs/snapshot.c:999 Code: 21 e1 fc e8 1b 55 0d 07 e8 86 c0 76 fd e8 c1 ad d8 fd 4c 89 e7 89 de e8 07 21 e1 fc e8 72 c0 76 fd 90 0f 0b e8 6a c0 76 fd 90 <0f> 0b 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc9000d60efc0 EFLAGS: 00010293 RAX: ffffffff84493166 RBX: ffff888041e2ac30 RCX: ffff88800096c880 RDX: 0000000000000000 RSI: 00000000000000c9 RDI: 0000000000000015 RBP: ffffc9000d60f340 R08: ffffc9000d60e947 R09: 0000000000000000 R10: ffffc9000d60e920 R11: fffff52001ac1d29 R12: ffffc9000d60f148 R13: ffff888052dff8a0 R14: 00000000000000c9 R15: 1ffff1100a5bff14 FS: 00007f7f7628f6c0(0000) GS:ffff88808d6c2000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000056436bab44e0 CR3: 0000000041dc8000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400