invalid bkey u64s 11 type alloc_v4 0:16:0 len 0 ver 0: gen 0 oldest_gen 0 data_type sb journal_seq 1 need_discard 1 need_inc_gen 1 dirty_sectors 256 stripe_sectors 0 cached_sectors 0 stripe 62720 stripe_redundancy 0 io_time[READ] 1 io_time[WRITE] 1 fragmentation 0 bp_start 8 invalid data type (got 1 should be 7): delete?, fixing bcachefs (loop0): scan_for_btree_nodes... bch2_scan_for_btree_nodes: nodes found after overwrites: extents l=0 seq=1 journal_seq=5 cookie=c6c25c03258c59c5 POS_MIN-U64_MAX:576460752303423487:U32_MAX ptr: 0:27:0 gen 0 xattrs l=0 seq=1 journal_seq=4 cookie=2285c34bed0abe32 POS_MIN-SPOS_MAX ptr: 0:31:0 gen 0 lru l=0 seq=1 journal_seq=5 cookie=28f61e078e70b95c POS_MIN-SPOS_MAX ptr: 0:28:0 gen 0 deleted_inodes l=0 seq=1 journal_seq=0 cookie=1db8f60c84bb244c POS_MIN-SPOS_MAX ptr: 0:42:0 gen 0 done bcachefs (loop0): accounting_read... done bcachefs (loop0): alloc_read... done bcachefs (loop0): stripes_read... done bcachefs (loop0): snapshots_read... done bcachefs (loop0): check_allocations... btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ac62141f8dc7e261 written 24 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, fixing btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 7589ab5e0c11cc7a written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0, fixing btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 9aa2895aefce4bdf written 24 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0, fixing btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq c0bef60d07ceb940 written 16 min_key POS_MIN durability: 1 ptr: 0:35:0 gen 0, fixing btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ebb8d5a9e3463bdb written 16 min_key POS_MIN durability: 1 ptr: 0:32:0 gen 0, fixing btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq e81e1ed936acf3df written 32 min_key POS_MIN durability: 1 ptr: 0:29:0 gen 0, fixing bucket 0:16 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:16 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:27 gen 0 has wrong data_type: got btree, should be need_discard, fixing bucket 0:27 gen 0 data type need_discard has wrong dirty_sectors: got 256, should be 0, fixing bucket 0:34 gen 0 has wrong data_type: got user, should be need_discard, fixing bucket 0:34 gen 0 data type need_discard has wrong dirty_sectors: got 16, should be 0, fixing done bcachefs (loop0): going read-write bcachefs (loop0): journal_replay... done bcachefs (loop0): bucket_gens_init... done bcachefs (loop0): reconstruct_snapshots... Oops: general protection fault, probably for non-canonical address 0xdffffc0000000013: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000098-0x000000000000009f] CPU: 0 UID: 0 PID: 5115 Comm: syz.0.0 Not tainted 6.12.0-rc4-syzkaller-00047-gc2ee9f594da8 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:btree_path_lock_root fs/bcachefs/btree_iter.c:732 [inline] RIP: 0010:bch2_btree_path_traverse_one+0x94a/0x2940 fs/bcachefs/btree_iter.c:1170 Code: 89 44 24 60 42 80 3c 20 00 74 08 4c 89 ef e8 cd ea e5 fd 49 8b 45 00 48 89 44 24 48 48 8d 90 98 00 00 00 48 89 d0 48 c1 e8 03 <42> 0f b6 04 20 84 c0 48 89 94 24 80 00 00 00 0f 85 ee 10 00 00 4c RSP: 0018:ffffc9000b356720 EFLAGS: 00010202 RAX: 0000000000000013 RBX: 0000000000000000 RCX: 0000000000040000 RDX: 0000000000000098 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000b356a10 R08: ffffffff8418b260 R09: ffffffff841892d9 R10: 0000000000000002 R11: ffff88801cf14880 R12: dffffc0000000000 R13: ffff88804cf80f58 R14: ffff8880407a8270 R15: 0000000000001100 FS: 00007f68730f06c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000558277b820a8 CR3: 000000001cecc000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_btree_path_traverse fs/bcachefs/btree_iter.h:247 [inline] __bch2_btree_iter_peek fs/bcachefs/btree_iter.c:2197 [inline] bch2_btree_iter_peek_upto+0xb58/0x70e0 fs/bcachefs/btree_iter.c:2297 bch2_btree_iter_peek_upto_type fs/bcachefs/btree_iter.h:685 [inline] bch2_reconstruct_snapshots+0x34a/0x3480 fs/bcachefs/snapshot.c:1037 bch2_run_recovery_pass+0xf0/0x1e0 fs/bcachefs/recovery_passes.c:185 bch2_run_recovery_passes+0x387/0x870 fs/bcachefs/recovery_passes.c:232 bch2_fs_recovery+0x25cc/0x39c0 fs/bcachefs/recovery.c:862 bch2_fs_start+0x356/0x5b0 fs/bcachefs/super.c:1036 bch2_fs_get_tree+0xd68/0x1710 fs/bcachefs/fs.c:2174 vfs_get_tree+0x90/0x2b0 fs/super.c:1800 do_new_mount+0x2be/0xb40 fs/namespace.c:3507 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4034 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f687237f79a 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:00007f68730efe68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f68730efef0 RCX: 00007f687237f79a RDX: 00000000200058c0 RSI: 0000000020005900 RDI: 00007f68730efeb0 RBP: 00000000200058c0 R08: 00007f68730efef0 R09: 0000000001000000 R10: 0000000001000000 R11: 0000000000000246 R12: 0000000020005900 R13: 00007f68730efeb0 R14: 00000000000058fc R15: 0000000020000400 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btree_path_lock_root fs/bcachefs/btree_iter.c:732 [inline] RIP: 0010:bch2_btree_path_traverse_one+0x94a/0x2940 fs/bcachefs/btree_iter.c:1170 Code: 89 44 24 60 42 80 3c 20 00 74 08 4c 89 ef e8 cd ea e5 fd 49 8b 45 00 48 89 44 24 48 48 8d 90 98 00 00 00 48 89 d0 48 c1 e8 03 <42> 0f b6 04 20 84 c0 48 89 94 24 80 00 00 00 0f 85 ee 10 00 00 4c RSP: 0018:ffffc9000b356720 EFLAGS: 00010202 RAX: 0000000000000013 RBX: 0000000000000000 RCX: 0000000000040000 RDX: 0000000000000098 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000b356a10 R08: ffffffff8418b260 R09: ffffffff841892d9 R10: 0000000000000002 R11: ffff88801cf14880 R12: dffffc0000000000 R13: ffff88804cf80f58 R14: ffff8880407a8270 R15: 0000000000001100 FS: 00007f68730f06c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000558277b820a8 CR3: 000000001cecc000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 89 44 24 60 mov %eax,0x60(%rsp) 4: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) 9: 74 08 je 0x13 b: 4c 89 ef mov %r13,%rdi e: e8 cd ea e5 fd call 0xfde5eae0 13: 49 8b 45 00 mov 0x0(%r13),%rax 17: 48 89 44 24 48 mov %rax,0x48(%rsp) 1c: 48 8d 90 98 00 00 00 lea 0x98(%rax),%rdx 23: 48 89 d0 mov %rdx,%rax 26: 48 c1 e8 03 shr $0x3,%rax * 2a: 42 0f b6 04 20 movzbl (%rax,%r12,1),%eax <-- trapping instruction 2f: 84 c0 test %al,%al 31: 48 89 94 24 80 00 00 mov %rdx,0x80(%rsp) 38: 00 39: 0f 85 ee 10 00 00 jne 0x112d 3f: 4c rex.WR