------------[ cut here ]------------ kernel BUG at fs/bcachefs/btree_iter.c:1850! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 6444 Comm: kworker/u8:24 Not tainted 6.14.0-rc2-syzkaller-00056-gab68d7eb7b1a #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 59 e4 fd 48 8b 34 24 44 8b 44 24 08 e9 25 f7 ff ff e8 3f bf 7d fd 90 <0f> 0b e8 37 bf 7d fd 90 0f 0b e8 ef 47 b4 07 e8 2a bf 7d fd 90 0f RSP: 0018:ffffc9000ccd5800 EFLAGS: 00010293 RAX: ffffffff84419061 RBX: 0000000000002164 RCX: ffff88807bca3c00 RDX: 0000000000000000 RSI: 0000000000000100 RDI: 0000000000000000 RBP: ffffc9000ccd5910 R08: ffffffff844181f0 R09: ffffc9000ccd5a80 R10: dffffc0000000000 R11: fffff5200199ab52 R12: dffffc0000000000 R13: 1ffff1100a7b808f R14: ffff888053dc0458 R15: 1ffff1100a7b808e FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f6434761378 CR3: 000000005a2ae000 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 59 e4 fd 48 8b 34 24 44 8b 44 24 08 e9 25 f7 ff ff e8 3f bf 7d fd 90 <0f> 0b e8 37 bf 7d fd 90 0f 0b e8 ef 47 b4 07 e8 2a bf 7d fd 90 0f RSP: 0018:ffffc9000ccd5800 EFLAGS: 00010293 RAX: ffffffff84419061 RBX: 0000000000002164 RCX: ffff88807bca3c00 RDX: 0000000000000000 RSI: 0000000000000100 RDI: 0000000000000000 RBP: ffffc9000ccd5910 R08: ffffffff844181f0 R09: ffffc9000ccd5a80 R10: dffffc0000000000 R11: fffff5200199ab52 R12: dffffc0000000000 R13: 1ffff1100a7b808f R14: ffff888053dc0458 R15: 1ffff1100a7b808e FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffdb12ec008 CR3: 0000000035056000 CR4: 0000000000350ef0