------------[ cut here ]------------ kernel BUG at fs/bcachefs/btree_iter.c:1850! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 1 UID: 0 PID: 5886 Comm: kworker/u8:3 Not tainted 6.14.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Workqueue: btree_update btree_interior_update_work RIP: 0010:bch2_btree_path_peek_slot+0xfa2/0xfe0 fs/bcachefs/btree_iter.c:1850 Code: f7 ff ff 48 89 34 24 be 08 00 00 00 44 89 44 24 08 e8 c2 5a e4 fd 48 8b 34 24 44 8b 44 24 08 e9 25 f7 ff ff e8 3f c0 7d fd 90 <0f> 0b e8 37 c0 7d fd 90 0f 0b e8 ef 48 b4 07 e8 2a c0 7d fd 90 0f RSP: 0018:ffffc90003d3d800 EFLAGS: 00010293 RAX: ffffffff84418f61 RBX: 0000000000002164 RCX: ffff888030a35a00 RDX: 0000000000000000 RSI: 0000000000000100 RDI: 0000000000000000 RBP: ffffc90003d3d910 R08: ffffffff844180f0 R09: ffffc90003d3da80 R10: dffffc0000000000 R11: fffff520007a7b52 R12: dffffc0000000000 R13: 1ffff1100be550c2 R14: ffff88805f2a85f0 R15: 1ffff1100be550c1 FS: 0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa2b73a2000 CR3: 000000004e2e8000 CR4: 0000000000350ef0 Call Trace: bch2_btree_iter_peek_slot+0xb67/0x27c0 fs/bcachefs/btree_iter.c:2799 __bch2_bkey_get_iter fs/bcachefs/btree_iter.h:573 [inline] bch2_bkey_get_iter fs/bcachefs/btree_iter.h:587 [inline] bch2_check_discard_freespace_key+0x292/0xeb0 fs/bcachefs/alloc_background.c:1404 try_alloc_bucket fs/bcachefs/alloc_foreground.c:291 [inline] bch2_bucket_alloc_freelist fs/bcachefs/alloc_foreground.c:442 [inline] bch2_bucket_alloc_trans+0x1583/0x2ea0 fs/bcachefs/alloc_foreground.c:574 bch2_bucket_alloc_set_trans+0x57c/0xd60 fs/bcachefs/alloc_foreground.c:730 __open_bucket_add_buckets+0x13a2/0x1e10 fs/bcachefs/alloc_foreground.c:973 open_bucket_add_buckets+0x33a/0x410 fs/bcachefs/alloc_foreground.c:1017 bch2_alloc_sectors_start_trans+0xce9/0x2030 __bch2_btree_node_alloc fs/bcachefs/btree_update_interior.c:322 [inline] bch2_btree_reserve_get+0x612/0x1890 fs/bcachefs/btree_update_interior.c:532 bch2_btree_update_start+0xe56/0x14e0 fs/bcachefs/btree_update_interior.c:1230 bch2_btree_split_leaf+0x121/0x880 fs/bcachefs/btree_update_interior.c:1851 bch2_trans_commit_error+0x212/0x1380 fs/bcachefs/btree_trans_commit.c:908 __bch2_trans_commit+0x812b/0x97a0 fs/bcachefs/btree_trans_commit.c:1085 bch2_trans_commit fs/bcachefs/btree_update.h:183 [inline] btree_update_nodes_written fs/bcachefs/btree_update_interior.c:706 [inline] btree_interior_update_work+0x1449/0x2a70 fs/bcachefs/btree_update_interior.c:844 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xa68/0x1840 kernel/workqueue.c:3317 worker_thread+0x870/0xd30 kernel/workqueue.c:3398 kthread+0x7ab/0x920 kernel/kthread.c:464 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_btree_path_peek_slot+0xfa2/0xfe0 fs/bcachefs/btree_iter.c:1850 Code: f7 ff ff 48 89 34 24 be 08 00 00 00 44 89 44 24 08 e8 c2 5a e4 fd 48 8b 34 24 44 8b 44 24 08 e9 25 f7 ff ff e8 3f c0 7d fd 90 <0f> 0b e8 37 c0 7d fd 90 0f 0b e8 ef 48 b4 07 e8 2a c0 7d fd 90 0f RSP: 0018:ffffc90003d3d800 EFLAGS: 00010293 RAX: ffffffff84418f61 RBX: 0000000000002164 RCX: ffff888030a35a00 RDX: 0000000000000000 RSI: 0000000000000100 RDI: 0000000000000000 RBP: ffffc90003d3d910 R08: ffffffff844180f0 R09: ffffc90003d3da80 R10: dffffc0000000000 R11: fffff520007a7b52 R12: dffffc0000000000 R13: 1ffff1100be550c2 R14: ffff88805f2a85f0 R15: 1ffff1100be550c1 FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa40e7a7bac CR3: 000000004e2e8000 CR4: 0000000000350ef0