bcachefs (loop0): accounting_read... done bcachefs (loop0): alloc_read... done bcachefs (loop0): snapshots_read... done bcachefs (loop0): check_allocations... ------------[ cut here ]------------ kernel BUG at fs/bcachefs/bkey.c:298! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5528 Comm: syz.0.16 Not tainted 6.16.0-rc5-syzkaller-00121-gbc9ff192a6c9 #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_unpack_pos+0x7a8/0x7c0 fs/bcachefs/bkey.c:298 Code: 48 c7 c7 50 03 76 8e 4c 8b 7c 24 10 4c 89 fe 48 89 da e8 7b 90 dc 00 e9 d1 fc ff ff e8 f1 92 a5 fd 90 0f 0b e8 e9 92 a5 fd 90 <0f> 0b e8 e1 92 a5 fd 90 0f 0b 66 66 66 66 66 2e 0f 1f 84 00 00 00 RSP: 0018:ffffc9000cc36688 EFLAGS: 00010293 RAX: ffffffff841aa387 RBX: ffff888011ee1060 RCX: ffff88803269a440 RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffffc9000cc36733 R09: 0000000000000000 R10: ffffc9000cc36728 R11: fffff52001986ce7 R12: dffffc0000000000 R13: 0000000000000000 R14: 0000000000000003 R15: 0000000000000003 FS: 000055556a3e9500(0000) GS:ffff88808d21b000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000056336d3c5048 CR3: 000000004fa4d000 CR4: 0000000000352ef0 Call Trace: bkey_unpack_pos_format_checked fs/bcachefs/bkey.h:449 [inline] bkey_unpack_pos fs/bcachefs/bkey.h:457 [inline] __bch2_bkey_cmp_packed_format_checked_inlined fs/bcachefs/bkey_cmp.h:103 [inline] __bch2_bkey_cmp_packed_format_checked+0x25e/0x510 fs/bcachefs/bkey.c:1015 bkey_cmp_p_or_unp fs/bcachefs/bset.h:291 [inline] bkey_iter_cmp_p_or_unp fs/bcachefs/bset.h:400 [inline] bch2_bset_search_linear fs/bcachefs/bset.c:1197 [inline] bch2_btree_node_iter_init+0x1d15/0x3a50 fs/bcachefs/bset.c:1342 __bch2_btree_path_set_pos+0xbac/0x1530 fs/bcachefs/btree_iter.c:1322 bch2_btree_path_set_pos fs/bcachefs/btree_iter.h:232 [inline] bch2_btree_iter_peek_node+0x673/0xbe0 fs/bcachefs/btree_iter.c:1933 bch2_gc_btree fs/bcachefs/btree_gc.c:746 [inline] bch2_gc_btrees fs/bcachefs/btree_gc.c:792 [inline] bch2_check_allocations+0x1ab0/0x57b0 fs/bcachefs/btree_gc.c:1094 bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline] __bch2_run_recovery_passes+0x395/0x1010 fs/bcachefs/recovery_passes.c:539 bch2_run_recovery_passes+0x184/0x210 fs/bcachefs/recovery_passes.c:610 bch2_fs_recovery+0x2690/0x3a50 fs/bcachefs/recovery.c:1005 bch2_fs_start+0xaaf/0xda0 fs/bcachefs/super.c:1213 bch2_fs_get_tree+0xb39/0x1520 fs/bcachefs/fs.c:2488 vfs_get_tree+0x92/0x2b0 fs/super.c:1804 do_new_mount+0x24a/0xa40 fs/namespace.c:3902 do_mount fs/namespace.c:4239 [inline] __do_sys_mount fs/namespace.c:4450 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4427 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff3cf1900ca 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:00007ffc83683db8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ffc83683e40 RCX: 00007ff3cf1900ca RDX: 00002000000002c0 RSI: 0000200000000380 RDI: 00007ffc83683e00 RBP: 00002000000002c0 R08: 00007ffc83683e40 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000000380 R13: 00007ffc83683e00 R14: 0000000000005937 R15: 0000200000000300 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__bkey_unpack_pos+0x7a8/0x7c0 fs/bcachefs/bkey.c:298 Code: 48 c7 c7 50 03 76 8e 4c 8b 7c 24 10 4c 89 fe 48 89 da e8 7b 90 dc 00 e9 d1 fc ff ff e8 f1 92 a5 fd 90 0f 0b e8 e9 92 a5 fd 90 <0f> 0b e8 e1 92 a5 fd 90 0f 0b 66 66 66 66 66 2e 0f 1f 84 00 00 00 RSP: 0018:ffffc9000cc36688 EFLAGS: 00010293 RAX: ffffffff841aa387 RBX: ffff888011ee1060 RCX: ffff88803269a440 RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffffc9000cc36733 R09: 0000000000000000 R10: ffffc9000cc36728 R11: fffff52001986ce7 R12: dffffc0000000000 R13: 0000000000000000 R14: 0000000000000003 R15: 0000000000000003 FS: 000055556a3e9500(0000) GS:ffff88808d21b000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fdb43a50286 CR3: 000000004fa4d000 CR4: 0000000000352ef0