loop0: detected capacity change from 0 to 32768 bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,compression=lz4,nojournal_transaction_names bcachefs (loop0): recovering from clean shutdown, journal seq 18446744073709551614 bcachefs (loop0): Version upgrade required: Version upgrade from 0.128: (unknown version) to 1.7: mi_btree_bitmap incomplete Doing incompatible version upgrade from 0.128: (unknown version) to 1.13: inode_has_child_snapshots running recovery passes: check_allocations,check_snapshots,check_subvols,check_inodes,check_dirents,set_fs_needs_rebalance invalid bkey u64s 7 type xattr 11385099858529484800:9073845653939145521:U32_MAX len 0 ver 0: (unknown type 12)xattr1:xattr1 invalid type (12): delete?, fixing bcachefs (loop0): accounting_read... done bcachefs (loop0): alloc_read... done bcachefs (loop0): stripes_read... done bcachefs (loop0): snapshots_read... done bcachefs (loop0): check_allocations... bucket 0:123 gen 0 data type sb has wrong cached_sectors: got 100663296, should be 0, fixing done bcachefs (loop0): going read-write bcachefs (loop0): journal_replay... ------------[ cut here ]------------ kernel BUG at fs/bcachefs/journal_reclaim.h:30! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5318 Comm: syz.0.0 Not tainted 6.12.0-syzkaller-12113-gbcc8eda6d349 #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:journal_seq_pin fs/bcachefs/journal_reclaim.h:30 [inline] RIP: 0010:bch2_journal_pin_set_locked fs/bcachefs/journal_reclaim.c:389 [inline] RIP: 0010:bch2_journal_pin_set+0x766/0x780 fs/bcachefs/journal_reclaim.c:449 Code: c1 0f 8c fe f9 ff ff 48 89 df e8 65 43 bd fd e9 f1 f9 ff ff e8 2b 5b 52 fd 90 0f 0b e8 23 5b 52 fd 90 0f 0b e8 1b 5b 52 fd 90 <0f> 0b e8 13 5b 52 fd 90 0f 0b e8 0b 5b 52 fd 90 0f 0b e8 03 5b 52 RSP: 0018:ffffc9000d1deea8 EFLAGS: 00010287 RAX: ffffffff844d1675 RBX: 0000000000000000 RCX: 0000000000100000 RDX: ffffc9000ee1a000 RSI: 0000000000080747 RDI: 0000000000080748 RBP: 0000000000000000 R08: ffffffff844d13c2 R09: fffff52001a3bdc4 R10: dffffc0000000000 R11: fffff52001a3bdc4 R12: ffff888043b55000 R13: ffff8880544ca500 R14: ffff888043b550d0 R15: ffffffffffffffff FS: 00007fdcb61ce6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000056203eeff480 CR3: 0000000042ce4000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_journal_pin_add fs/bcachefs/journal_reclaim.h:48 [inline] bch2_btree_insert_key_cached+0x724/0x7f0 fs/bcachefs/btree_key_cache.c:560 bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:822 [inline] do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:900 [inline] __bch2_trans_commit+0x7193/0x93c0 fs/bcachefs/btree_trans_commit.c:1121 bch2_trans_commit fs/bcachefs/btree_update.h:184 [inline] bch2_journal_replay+0x1a3a/0x2a40 fs/bcachefs/recovery.c:317 bch2_run_recovery_pass+0xf0/0x1e0 fs/bcachefs/recovery_passes.c:191 bch2_run_recovery_passes+0x3a7/0x880 fs/bcachefs/recovery_passes.c:244 bch2_fs_recovery+0x25cc/0x39d0 fs/bcachefs/recovery.c:861 bch2_fs_start+0x356/0x5b0 fs/bcachefs/super.c:1037 bch2_fs_get_tree+0xd68/0x1710 fs/bcachefs/fs.c:2170 vfs_get_tree+0x90/0x2b0 fs/super.c:1814 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:0x7fdcb5381fea 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:00007fdcb61cde88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fdcb61cdf10 RCX: 00007fdcb5381fea RDX: 0000000020000300 RSI: 0000000020000380 RDI: 00007fdcb61cded0 RBP: 0000000020000300 R08: 00007fdcb61cdf10 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000380 R13: 00007fdcb61cded0 R14: 0000000000005929 R15: 0000000020000340 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:journal_seq_pin fs/bcachefs/journal_reclaim.h:30 [inline] RIP: 0010:bch2_journal_pin_set_locked fs/bcachefs/journal_reclaim.c:389 [inline] RIP: 0010:bch2_journal_pin_set+0x766/0x780 fs/bcachefs/journal_reclaim.c:449 Code: c1 0f 8c fe f9 ff ff 48 89 df e8 65 43 bd fd e9 f1 f9 ff ff e8 2b 5b 52 fd 90 0f 0b e8 23 5b 52 fd 90 0f 0b e8 1b 5b 52 fd 90 <0f> 0b e8 13 5b 52 fd 90 0f 0b e8 0b 5b 52 fd 90 0f 0b e8 03 5b 52 RSP: 0018:ffffc9000d1deea8 EFLAGS: 00010287 RAX: ffffffff844d1675 RBX: 0000000000000000 RCX: 0000000000100000 RDX: ffffc9000ee1a000 RSI: 0000000000080747 RDI: 0000000000080748 RBP: 0000000000000000 R08: ffffffff844d13c2 R09: fffff52001a3bdc4 R10: dffffc0000000000 R11: fffff52001a3bdc4 R12: ffff888043b55000 R13: ffff8880544ca500 R14: ffff888043b550d0 R15: ffffffffffffffff FS: 00007fdcb61ce6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000056203eeff480 CR3: 0000000042ce4000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400