while marking 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 bcachefs (loop0): 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 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 9aa2895aefce4bdf written 24 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0, fixing bcachefs (loop0): 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 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 c0bef60d07ceb940 written 16 min_key POS_MIN durability: 1 ptr: 0:35:0 gen 0, fixing bcachefs (loop0): 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 bcachefs (loop0): 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 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 e81e1ed936acf3df written 32 min_key POS_MIN durability: 1 ptr: 0:29:0 gen 0, fixing bcachefs (loop0): bucket 0:1 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop0): bucket 0:1 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop0): bucket 0:2 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop0): bucket 0:2 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop0): bucket 0:3 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop0): bucket 0:3 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop0): bucket 0:4 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop0): bucket 0:4 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop0): bucket 0:5 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop0): bucket 0:5 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop0): bucket 0:6 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop0): bucket 0:6 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop0): bucket 0:7 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop0): bucket 0:7 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop0): bucket 0:8 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop0): bucket 0:8 gen 0 data type sb has wrong dirty_sectors: got 0, should be 8, fixing bcachefs (loop0): bucket 0:9 gen 0 has wrong data_type: got free, should be journal, fixing bcachefs (loop0): bucket 0:9 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop0): bucket 0:10 gen 0 has wrong data_type: got free, should be journal, fixing bcachefs (loop0): bucket 0:10 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop0): bucket 0:11 gen 0 has wrong data_type: got free, should be journal, fixing Ratelimiting new instances of previous error bcachefs (loop0): bucket 0:11 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing Ratelimiting new instances of previous error done bcachefs (loop0): going read-write bcachefs (loop0): journal_replay... done bcachefs (loop0): check_extents_to_backpointers... bcachefs (loop0): scanning for missing backpointers in 4/128 buckets done bcachefs (loop0): check_inodes... done bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... done bcachefs (loop0): done starting filesystem ------------[ cut here ]------------ kernel BUG at fs/bcachefs/btree_trans_commit.c:348! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5337 Comm: syz.0.0 Not tainted 6.16.0-rc3-syzkaller-00057-g92ca6c498a5e #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:btree_insert_entry_checks fs/bcachefs/btree_trans_commit.c:343 [inline] RIP: 0010:bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:724 [inline] RIP: 0010:do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:851 [inline] RIP: 0010:__bch2_trans_commit+0x86f0/0x8880 fs/bcachefs/btree_trans_commit.c:1079 Code: 97 fd eb 0c e8 91 a9 97 fd eb 05 e8 8a a9 97 fd 49 bd 00 00 00 00 00 fc ff df 4c 8b 64 24 40 e9 7a b0 ff ff e8 71 a9 97 fd 90 <0f> 0b e8 69 a9 97 fd 90 0f 0b e8 61 a9 97 fd 90 0f 0b f3 0f 1e fa RSP: 0018:ffffc9000d35ee60 EFLAGS: 00010283 RAX: ffffffff8428a3af RBX: ffffffff84286606 RCX: 0000000000100000 RDX: ffffc9000e0f2000 RSI: 0000000000021e49 RDI: 0000000000021e4a RBP: ffffc9000d35f150 R08: 0000000000000000 R09: ffffffff84286606 R10: dffffc0000000000 R11: ffffed100a899309 R12: ffff888055390020 R13: dffffc0000000000 R14: ffff8880553924d8 R15: 0000000000000001 FS: 00007f324baa96c0(0000) GS:ffff88808d251000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fcf6f5dd000 CR3: 00000000426a0000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_trans_commit fs/bcachefs/btree_update.h:242 [inline] __bch2_resume_logged_op_truncate+0x287/0x700 fs/bcachefs/io_misc.c:257 bch2_truncate+0x155/0x200 fs/bcachefs/io_misc.c:300 bchfs_truncate+0x8b1/0xc20 fs/bcachefs/fs-io.c:511 notify_change+0xb33/0xe40 fs/attr.c:552 do_truncate+0x1a4/0x220 fs/open.c:68 handle_truncate fs/namei.c:3517 [inline] do_open fs/namei.c:3900 [inline] path_openat+0x306c/0x3830 fs/namei.c:4055 do_filp_open+0x1fa/0x410 fs/namei.c:4082 do_sys_openat2+0x121/0x1c0 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_creat fs/open.c:1530 [inline] __se_sys_creat fs/open.c:1524 [inline] __x64_sys_creat+0x8f/0xc0 fs/open.c:1524 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:0x7f324ab8e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007f324baa9038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007f324adb5fa0 RCX: 00007f324ab8e929 RDX: 0000000000000000 RSI: 000000000000000d RDI: 0000200000000240 RBP: 00007f324ac10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f324adb5fa0 R15: 00007ffc944f4988 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btree_insert_entry_checks fs/bcachefs/btree_trans_commit.c:343 [inline] RIP: 0010:bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:724 [inline] RIP: 0010:do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:851 [inline] RIP: 0010:__bch2_trans_commit+0x86f0/0x8880 fs/bcachefs/btree_trans_commit.c:1079 Code: 97 fd eb 0c e8 91 a9 97 fd eb 05 e8 8a a9 97 fd 49 bd 00 00 00 00 00 fc ff df 4c 8b 64 24 40 e9 7a b0 ff ff e8 71 a9 97 fd 90 <0f> 0b e8 69 a9 97 fd 90 0f 0b e8 61 a9 97 fd 90 0f 0b f3 0f 1e fa RSP: 0018:ffffc9000d35ee60 EFLAGS: 00010283 RAX: ffffffff8428a3af RBX: ffffffff84286606 RCX: 0000000000100000 RDX: ffffc9000e0f2000 RSI: 0000000000021e49 RDI: 0000000000021e4a RBP: ffffc9000d35f150 R08: 0000000000000000 R09: ffffffff84286606 R10: dffffc0000000000 R11: ffffed100a899309 R12: ffff888055390020 R13: dffffc0000000000 R14: ffff8880553924d8 R15: 0000000000000001 FS: 00007f324baa96c0(0000) GS:ffff88808d251000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffea0343ef4 CR3: 00000000426a0000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400