bucket 0:26 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 ac62141f8dc7e261 written 24 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, fixing bucket 0:38 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 7589ab5e0c11cc7a written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0, fixing 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 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 bucket 0:28 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 28f61e078e70b95c written 16 min_key POS_MIN durability: 1 ptr: 0:28:0 gen 0, fixing 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 bucket 0:1 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:1 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:2 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:2 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:3 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:3 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:4 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:4 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:5 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:5 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:6 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:6 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:7 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:7 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:8 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:8 gen 0 data type sb has wrong dirty_sectors: got 0, should be 8, fixing bucket 0:9 gen 0 has wrong data_type: got free, should be journal, fixing bucket 0:9 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, 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:17 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop0): Ratelimiting new instances of previous error bucket 0:17 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop0): Ratelimiting new instances of previous error bucket 0:34 gen 0 data type user has wrong cached_sectors: got 65535, should be 0, fixing done bcachefs (loop0): going read-write bcachefs (loop0): Fixed errors, running fsck a second time to verify fs is clean bcachefs (loop0): done starting filesystem bcachefs (loop0): shutting down bcachefs (loop0): going read-only bcachefs (loop0): finished waiting for writes to stop bcachefs (loop0): flushing journal and stopping allocators, journal seq 12 bcachefs (loop0): flushing journal and stopping allocators complete, journal seq 14 bcachefs (loop0): unshutdown complete, journal seq 15 bcachefs (loop0): done going read-only, filesystem not clean bcachefs (loop0): shutdown complete ------------[ cut here ]------------ kernel BUG at fs/bcachefs/btree_write_buffer.c:801! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5329 Comm: syz.0.0 Not tainted 6.12.0-rc6-syzkaller #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:bch2_fs_btree_write_buffer_exit+0x1e2/0x1f0 fs/bcachefs/btree_write_buffer.c:800 Code: 00 4c 89 f7 31 f6 e8 bd 12 da fd 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc e8 d9 49 70 fd e9 f9 fe ff ff e8 cf 49 70 fd 90 <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc9000d417c90 EFLAGS: 00010293 RAX: ffffffff84249091 RBX: 00000000000ffffe RCX: ffff8880008ea440 RDX: 0000000000000000 RSI: 00000000000ffffe RDI: 00000000000fffff RBP: ffff88804fb80000 R08: ffffffff84248f73 R09: 1ffff11009f7965e R10: dffffc0000000000 R11: ffffed1009f7965f R12: dffffc0000000000 R13: ffff88804fb80000 R14: ffff88804fb845d8 R15: ffff88804fb846a0 FS: 00007fb79e2336c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000564790ff84f0 CR3: 000000001cdca000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __bch2_fs_free fs/bcachefs/super.c:566 [inline] bch2_fs_release+0x2fd/0x7d0 fs/bcachefs/super.c:610 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x22f/0x480 lib/kobject.c:737 deactivate_locked_super+0xc4/0x130 fs/super.c:473 cleanup_mnt+0x41f/0x4b0 fs/namespace.c:1373 task_work_run+0x24f/0x310 kernel/task_work.c:239 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x168/0x370 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb79d37e719 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:00007fb79e233038 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 RAX: 0000000000000000 RBX: 00007fb79d535f80 RCX: 00007fb79d37e719 RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000000000003 RBP: 00007fb79d3f139e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fb79d535f80 R15: 00007fff7d859dc8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_fs_btree_write_buffer_exit+0x1e2/0x1f0 fs/bcachefs/btree_write_buffer.c:800 Code: 00 4c 89 f7 31 f6 e8 bd 12 da fd 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc e8 d9 49 70 fd e9 f9 fe ff ff e8 cf 49 70 fd 90 <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc9000d417c90 EFLAGS: 00010293 RAX: ffffffff84249091 RBX: 00000000000ffffe RCX: ffff8880008ea440 RDX: 0000000000000000 RSI: 00000000000ffffe RDI: 00000000000fffff RBP: ffff88804fb80000 R08: ffffffff84248f73 R09: 1ffff11009f7965e R10: dffffc0000000000 R11: ffffed1009f7965f R12: dffffc0000000000 R13: ffff88804fb80000 R14: ffff88804fb845d8 R15: ffff88804fb846a0 FS: 00007fb79e2336c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000564790ff84f0 CR3: 000000001cdca000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400