bcachefs (loop0): invalid bkey in btree_node btree=subvolumes level=0: u64s 8 type snapshot 0:4294967295:0 len 0 ver 0: subvol parent 0 children 0 0 subvol 1 tree 0 invalid key type for btree subvolumes (snapshot), deleting ------------[ cut here ]------------ kernel BUG at fs/bcachefs/bkey.c:389! Oops: invalid opcode: 0000 [#1] SMP KASAN PTI CPU: 1 UID: 0 PID: 5827 Comm: read_btree_node Not tainted 6.15.0-syzkaller-07774-g90b83efa6701 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 RIP: 0010:set_inc_field_lossy fs/bcachefs/bkey.c:389 [inline] RIP: 0010:bch2_bkey_pack_pos_lossy+0x13de/0x24e0 fs/bcachefs/bkey.c:518 Code: e8 57 ce 08 fe 48 ba 00 00 00 00 00 fc ff df e9 a5 f8 ff ff e8 c3 d5 a7 fd 90 0f 0b e8 bb d5 a7 fd 90 0f 0b e8 b3 d5 a7 fd 90 <0f> 0b e8 ab d5 a7 fd 90 0f 0b e8 a3 d5 a7 fd 90 0f 0b f3 0f 1e fa RSP: 0018:ffffc9000438eb40 EFLAGS: 00010293 RAX: ffffffff8418244d RBX: 0000090000000000 RCX: ffff8880352c0000 RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000090000000000 RBP: ffffc9000438ed78 R08: ffffffffffffffff R09: ffffffffffffffff R10: ffffffffffffffff R11: ffffffffffffffff R12: ffff888027c138c4 R13: fffff700ffffffff R14: 0000000000000000 R15: fffffffffffffffe FS: 0000000000000000(0000) GS:ffff888125d98000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055cd88f3ca70 CR3: 0000000023cb6000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bkey_pack_pos fs/bcachefs/bkey.h:382 [inline] __build_ro_aux_tree+0xb21/0x1800 fs/bcachefs/bset.c:743 bch2_bset_build_aux_tree+0x3f5/0x570 fs/bcachefs/bset.c:787 bch2_btree_node_read_done+0x39e4/0x4f60 fs/bcachefs/btree_io.c:1322 btree_node_read_work+0x426/0xe30 fs/bcachefs/btree_io.c:1400 bch2_btree_node_read+0x887/0x29f0 fs/bcachefs/btree_io.c:-1 bch2_btree_node_fill+0xd12/0x14f0 fs/bcachefs/btree_cache.c:994 bch2_btree_node_get_noiter+0xa2c/0x1000 fs/bcachefs/btree_cache.c:1261 found_btree_node_is_readable fs/bcachefs/btree_node_scan.c:85 [inline] try_read_btree_node fs/bcachefs/btree_node_scan.c:220 [inline] read_btree_nodes_worker+0x1319/0x1e20 fs/bcachefs/btree_node_scan.c:269 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:set_inc_field_lossy fs/bcachefs/bkey.c:389 [inline] RIP: 0010:bch2_bkey_pack_pos_lossy+0x13de/0x24e0 fs/bcachefs/bkey.c:518 Code: e8 57 ce 08 fe 48 ba 00 00 00 00 00 fc ff df e9 a5 f8 ff ff e8 c3 d5 a7 fd 90 0f 0b e8 bb d5 a7 fd 90 0f 0b e8 b3 d5 a7 fd 90 <0f> 0b e8 ab d5 a7 fd 90 0f 0b e8 a3 d5 a7 fd 90 0f 0b f3 0f 1e fa RSP: 0018:ffffc9000438eb40 EFLAGS: 00010293 RAX: ffffffff8418244d RBX: 0000090000000000 RCX: ffff8880352c0000 RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000090000000000 RBP: ffffc9000438ed78 R08: ffffffffffffffff R09: ffffffffffffffff R10: ffffffffffffffff R11: ffffffffffffffff R12: ffff888027c138c4 R13: fffff700ffffffff R14: 0000000000000000 R15: fffffffffffffffe FS: 0000000000000000(0000) GS:ffff888125d98000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffc5c82cb90 CR3: 0000000022764000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400