bcachefs (loop1): stripes_read... done bcachefs (loop1): snapshots_read... done bcachefs (loop1): going read-write bcachefs (loop1): journal_replay... ------------[ cut here ]------------ kernel BUG at fs/bcachefs/bkey_sort.c:185! Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 6420 Comm: syz-executor.1 Not tainted 6.9.0-rc7-syzkaller-gfda5695d692c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : bch2_sort_keys+0x1120/0x113c fs/bcachefs/bkey_sort.c:184 lr : bch2_sort_keys+0x1120/0x113c fs/bcachefs/bkey_sort.c:184 sp : ffff8000a9626480 x29: ffff8000a96265c0 x28: ffff8000a9626708 x27: dfff800000000000 x26: ffff0000f66600e8 x25: 0000000000000002 x24: 0000000000000000 x23: ffff8000a9626710 x22: 00000000ffffff80 x21: ffff8000a9626700 x20: 0000000000000080 x19: 00000000ffffff80 x18: ffff8000a9625d60 x17: 000000000001d06b x16: ffff80008adc5540 x15: 0000000000000002 x14: 1ffff000152c4c6c x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000040000 x10: 000000000003ffff x9 : ffff8000a2ef9000 x8 : 0000000000040000 x7 : 0000000000000000 x6 : 0000000000000000 x5 : 00000000ffffffff x4 : 0000000000000000 x3 : ffff8000826c3380 x2 : 000000000000000c x1 : 0000000000000080 x0 : 0000000000000000 Call trace: bch2_sort_keys+0x1120/0x113c fs/bcachefs/bkey_sort.c:184 btree_node_sort+0x52c/0x145c fs/bcachefs/btree_io.c:323 bch2_btree_post_write_cleanup+0x10c/0x97c fs/bcachefs/btree_io.c:2252 bch2_btree_node_write+0x124/0x1a0 fs/bcachefs/btree_io.c:2293 btree_node_write_if_need fs/bcachefs/btree_io.h:153 [inline] __btree_node_flush+0x1ac/0x1f8 fs/bcachefs/btree_trans_commit.c:229 bch2_btree_node_flush0+0x38/0x50 fs/bcachefs/btree_trans_commit.c:238 journal_flush_pins+0x524/0xa28 fs/bcachefs/journal_reclaim.c:553 journal_flush_done+0xcc/0x248 fs/bcachefs/journal_reclaim.c:809 bch2_journal_flush_pins+0xf4/0x338 fs/bcachefs/journal_reclaim.c:839 bch2_journal_flush_all_pins fs/bcachefs/journal_reclaim.h:76 [inline] bch2_journal_replay+0xd60/0x1030 fs/bcachefs/recovery.c:289 bch2_run_recovery_pass+0xe4/0x1d4 fs/bcachefs/recovery_passes.c:187 bch2_run_recovery_passes+0x254/0x6b4 fs/bcachefs/recovery_passes.c:230 bch2_fs_recovery+0x2dd0/0x4854 fs/bcachefs/recovery.c:789 bch2_fs_start+0x30c/0x53c fs/bcachefs/super.c:1043 bch2_fs_open+0x8b4/0xb64 fs/bcachefs/super.c:2102 bch2_mount+0x558/0xe10 fs/bcachefs/fs.c:1903 legacy_get_tree+0xd4/0x16c fs/fs_context.c:662 vfs_get_tree+0x90/0x288 fs/super.c:1779 do_new_mount+0x278/0x900 fs/namespace.c:3352 path_mount+0x590/0xe04 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __arm64_sys_mount+0x45c/0x594 fs/namespace.c:3875 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 Code: 956160b6 977a0522 d4210000 977a0520 (d4210000) ---[ end trace 0000000000000000 ]---