bcachefs (loop0): u64s 13 type alloc_v4 0:33:0 len 0 ver 0: gen 0 oldest_gen 0 data_type journal journal_seq_nonempty 0 journal_seq_empty 0 need_discard 0 need_inc_gen 0 dirty_sectors 256 stripe_sectors 0 cached_sectors 0 stripe 0 stripe_redundancy 0 io_time[READ] 0 io_time[WRITE] 0 fragmentation 0 bp_start 8 incorrectly set at freespace:0:33:0 (free 0, genbits 0 should be 0), fixing bcachefs (loop0): u64s 13 type alloc_v4 0:37:0 len 0 ver 0: gen 0 oldest_gen 0 data_type journal journal_seq_nonempty 0 journal_seq_empty 0 need_discard 0 need_inc_gen 0 dirty_sectors 256 stripe_sectors 0 cached_sectors 0 stripe 0 stripe_redundancy 0 io_time[READ] 0 io_time[WRITE] 0 fragmentation 0 bp_start 8 incorrectly set at freespace:0:37:0 (free 0, genbits 0 should be 0), fixing ------------[ cut here ]------------ kernel BUG at fs/bcachefs/journal.h:245! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 1038 Comm: kworker/u4:6 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 Workqueue: btree_update btree_interior_update_work RIP: 0010:bch2_journal_add_entry fs/bcachefs/journal.h:245 [inline] RIP: 0010:bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:763 [inline] RIP: 0010:do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:851 [inline] RIP: 0010:__bch2_trans_commit+0x8700/0x8880 fs/bcachefs/btree_trans_commit.c:1079 Code: 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 65 8b 1d 67 4c 74 0e bf 07 00 00 00 89 de e8 87 RSP: 0018:ffffc900025c7500 EFLAGS: 00010293 RAX: ffffffff8428a3bf RBX: 000000000000002f RCX: ffff888035904880 RDX: 0000000000000000 RSI: 000000000000002f RDI: 0000000000000038 RBP: ffffc900025c77f0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 000000000000001a R12: 1ffff1100ab2081d R13: 0000000000000038 R14: ffff8880558d0e58 R15: 000000000000002f FS: 0000000000000000(0000) GS:ffff88808d251000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000056046f90eb10 CR3: 000000001234e000 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] btree_update_nodes_written fs/bcachefs/btree_update_interior.c:729 [inline] btree_interior_update_work+0x1082/0x27d0 fs/bcachefs/btree_update_interior.c:867 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_journal_add_entry fs/bcachefs/journal.h:245 [inline] RIP: 0010:bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:763 [inline] RIP: 0010:do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:851 [inline] RIP: 0010:__bch2_trans_commit+0x8700/0x8880 fs/bcachefs/btree_trans_commit.c:1079 Code: 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 65 8b 1d 67 4c 74 0e bf 07 00 00 00 89 de e8 87 RSP: 0018:ffffc900025c7500 EFLAGS: 00010293 RAX: ffffffff8428a3bf RBX: 000000000000002f RCX: ffff888035904880 RDX: 0000000000000000 RSI: 000000000000002f RDI: 0000000000000038 RBP: ffffc900025c77f0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 000000000000001a R12: 1ffff1100ab2081d R13: 0000000000000038 R14: ffff8880558d0e58 R15: 000000000000002f FS: 0000000000000000(0000) GS:ffff88808d251000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000056046f90eb10 CR3: 0000000051569000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400