gen 0 oldest_gen 0 data_type sb journal_seq_nonempty 1 journal_seq_empty 1769482 need_discard 1 need_inc_gen 1 dirty_sectors 256 stripe_sectors 27 cached_sectors 0 stripe 132 stripe_redundancy 0 io_time[READ] 1 io_time[WRITE] 1 fragmentation 0 bp_start 6 invalid data type (got 1 should be 7), deleting bcachefs (loop0): invalid bkey in btree_node btree=alloc level=0: u64s 12 type alloc_v4 0:28:0 len 0 ver 0: gen 0 oldest_gen 0 data_type btree journal_seq_nonempty 6 journal_seq_empty 0 need_discard 1 need_inc_gen 1 dirty_sectors 0 stripe_sectors 1769482 cached_sectors 0 stripe 0 stripe_redundancy 0 io_time[READ] 1 io_time[WRITE] 768 fragmentation 0 bp_start 7 invalid data type (got 3 should be 9), deleting bcachefs (loop0): btree node read error at btree subvolumes level 0/0 u64s 11 type btree_ptr_v2 42949672959:U64_MAX:U32_MAX len 0 ver 0: seq c0bef60d07ceb940 written 16 min_key POS_MIN durability: 1 ptr: 0:35:0 gen 0 loop0 node offset 0/16 bset u64s 0: incorrect max key SPOS_MAX flagging btree subvolumes lost data ret btree_node_read_validate_error bcachefs (loop0): error reading btree root btree=subvolumes level=0: btree_node_read_error, fixing bcachefs (loop0): check_topology... bcachefs (loop0): btree root dirents unreadable, must recover from scan bcachefs (loop0): no nodes found for btree dirents, continuing bcachefs (loop0): btree root subvolumes unreadable, must recover from scan bcachefs (loop0): no nodes found for btree subvolumes, continuing done 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: 5322 Comm: syz.0.0 Not tainted 6.16.0-rc3-syzkaller-00072-gee88bddf7f2f #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 b0 fc 75 8e 4c 8b 7c 24 10 4c 89 fe 48 89 da e8 1b 4f dc 00 e9 d1 fc ff ff e8 d1 aa a5 fd 90 0f 0b e8 c9 aa a5 fd 90 <0f> 0b e8 c1 aa a5 fd 90 0f 0b 66 66 66 66 66 2e 0f 1f 84 00 00 00 RSP: 0018:ffffc9000d3c6368 EFLAGS: 00010283 RAX: ffffffff841aa3a7 RBX: ffff8880545c0188 RCX: 0000000000100000 RDX: ffffc9000e03a000 RSI: 0000000000065037 RDI: 0000000000065038 RBP: 0000000000000000 R08: ffffc9000d3c6413 R09: 0000000000000000 R10: ffffc9000d3c6408 R11: fffff52001a78c83 R12: dffffc0000000000 R13: 0000000000000025 R14: 0000000000000003 R15: 0000000000000003 FS: 00007f92bbd336c0(0000) GS:ffff88808d251000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f427ab909c0 CR3: 000000003f596000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 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] bset_search_tree fs/bcachefs/bset.c:1129 [inline] __bch2_bset_search fs/bcachefs/bset.c:1181 [inline] bch2_btree_node_iter_init+0xbc2/0x3a50 fs/bcachefs/bset.c:1334 __btree_path_level_init fs/bcachefs/btree_iter.c:617 [inline] bch2_btree_path_level_init+0x50b/0xa20 fs/bcachefs/btree_iter.c:637 btree_path_lock_root fs/bcachefs/btree_iter.c:787 [inline] bch2_btree_path_traverse_one+0xfec/0x21d0 fs/bcachefs/btree_iter.c:1203 bch2_btree_path_traverse fs/bcachefs/btree_iter.h:250 [inline] __bch2_btree_iter_peek fs/bcachefs/btree_iter.c:2262 [inline] bch2_btree_iter_peek_max+0x984/0x51f0 fs/bcachefs/btree_iter.c:2365 bch2_btree_iter_peek_max_type fs/bcachefs/btree_iter.h:743 [inline] bch2_gc_btree fs/bcachefs/btree_gc.c:716 [inline] bch2_gc_btrees fs/bcachefs/btree_gc.c:779 [inline] bch2_check_allocations+0x120d/0x57b0 fs/bcachefs/btree_gc.c:1081 bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:485 [inline] __bch2_run_recovery_passes+0x392/0x1010 fs/bcachefs/recovery_passes.c:540 bch2_run_recovery_passes+0x184/0x210 fs/bcachefs/recovery_passes.c:611 bch2_fs_recovery+0x25fd/0x3950 fs/bcachefs/recovery.c:989 bch2_fs_start+0xa99/0xd90 fs/bcachefs/super.c:1203 bch2_fs_get_tree+0xb02/0x14f0 fs/bcachefs/fs.c:2489 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:0x7f92baf900ca 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:00007f92bbd32e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f92bbd32ef0 RCX: 00007f92baf900ca RDX: 0000200000000000 RSI: 0000200000005900 RDI: 00007f92bbd32eb0 RBP: 0000200000000000 R08: 00007f92bbd32ef0 R09: 0000000000010000 R10: 0000000000010000 R11: 0000000000000246 R12: 0000200000005900 R13: 00007f92bbd32eb0 R14: 0000000000005978 R15: 0000200000000040 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__bkey_unpack_pos+0x7a8/0x7c0 fs/bcachefs/bkey.c:298 Code: 48 c7 c7 b0 fc 75 8e 4c 8b 7c 24 10 4c 89 fe 48 89 da e8 1b 4f dc 00 e9 d1 fc ff ff e8 d1 aa a5 fd 90 0f 0b e8 c9 aa a5 fd 90 <0f> 0b e8 c1 aa a5 fd 90 0f 0b 66 66 66 66 66 2e 0f 1f 84 00 00 00 RSP: 0018:ffffc9000d3c6368 EFLAGS: 00010283 RAX: ffffffff841aa3a7 RBX: ffff8880545c0188 RCX: 0000000000100000 RDX: ffffc9000e03a000 RSI: 0000000000065037 RDI: 0000000000065038 RBP: 0000000000000000 R08: ffffc9000d3c6413 R09: 0000000000000000 R10: ffffc9000d3c6408 R11: fffff52001a78c83 R12: dffffc0000000000 R13: 0000000000000025 R14: 0000000000000003 R15: 0000000000000003 FS: 00007f92bbd336c0(0000) GS:ffff88808d251000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f427ab909c0 CR3: 000000003f596000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400