bcachefs (loop0): u64s 13 type alloc_v4 0:36:0 len 0 ver 0: gen 0 oldest_gen 0 data_type btree 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:36: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: 70 Comm: kworker/u4:4 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 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 21 a4 97 fd 90 0f 0b e8 19 a4 97 fd 90 0f 0b e8 11 a4 97 fd 90 <0f> 0b f3 0f 1e fa 65 8b 1d c7 45 74 0e bf 07 00 00 00 89 de e8 37 RSP: 0018:ffffc9000101f500 EFLAGS: 00010293 RAX: ffffffff8428aa5f RBX: 0000000000000034 RCX: ffff88801f898000 RDX: 0000000000000000 RSI: 0000000000000034 RDI: 0000000000000038 RBP: ffffc9000101f7f0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 000000000000001d R12: 1ffff1100a7ed01d R13: 0000000000000038 R14: ffff8880550603b0 R15: 0000000000000034 FS: 0000000000000000(0000) GS:ffff88808d251000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000056142b4be950 CR3: 00000000513fe000 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 21 a4 97 fd 90 0f 0b e8 19 a4 97 fd 90 0f 0b e8 11 a4 97 fd 90 <0f> 0b f3 0f 1e fa 65 8b 1d c7 45 74 0e bf 07 00 00 00 89 de e8 37 RSP: 0018:ffffc9000101f500 EFLAGS: 00010293 RAX: ffffffff8428aa5f RBX: 0000000000000034 RCX: ffff88801f898000 RDX: 0000000000000000 RSI: 0000000000000034 RDI: 0000000000000038 RBP: ffffc9000101f7f0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 000000000000001d R12: 1ffff1100a7ed01d R13: 0000000000000038 R14: ffff8880550603b0 R15: 0000000000000034 FS: 0000000000000000(0000) GS:ffff88808d251000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000056142b4be950 CR3: 0000000012328000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400