bi_background_compression=0 bi_data_replicas=0 bi_promote_target=0 bi_foreground_target=0 bi_background_target=0 bi_erasure_code=0 bi_fields_set=0 bi_dir=0 bi_dir_offset=0 bi_subvol=0 bi_parent_subvol=0 bi_nocow=0, fixing done bcachefs (loop0): check_subvolume_structure... done bcachefs (loop0): check_directory_structure... done bcachefs (loop0): check_nlinks... inode 536870913 type reg has wrong i_nlink (2, should be 1), fixing inode 536870914 type reg has wrong i_nlink (2780562353, should be 1), fixing done bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... done bcachefs (loop0): set_fs_needs_rebalance... done bcachefs (loop0): Fixed errors, running fsck a second time to verify fs is clean bcachefs (loop0): check_alloc_info... done bcachefs (loop0): check_lrus... done bcachefs (loop0): check_btree_backpointers... done bcachefs (loop0): check_backpointers_to_extents... done bcachefs (loop0): check_extents_to_backpointers... done bcachefs (loop0): check_alloc_to_lru_refs... done bcachefs (loop0): bucket_gens_init... done bcachefs (loop0): check_snapshot_trees... done bcachefs (loop0): check_snapshots... done bcachefs (loop0): check_subvols... done bcachefs (loop0): check_subvol_children... done bcachefs (loop0): delete_dead_snapshots... done bcachefs (loop0): check_inodes... done bcachefs (loop0): check_extents... done bcachefs (loop0): check_indirect_extents... done bcachefs (loop0): check_dirents... done bcachefs (loop0): check_xattrs... done bcachefs (loop0): check_root... done bcachefs (loop0): check_unreachable_inodes... done bcachefs (loop0): check_subvolume_structure... done bcachefs (loop0): check_directory_structure... done bcachefs (loop0): check_nlinks... done bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... done bcachefs (loop0): set_fs_needs_rebalance... done bcachefs (loop0): done starting filesystem ------------[ cut here ]------------ kernel BUG at fs/bcachefs/btree_iter.c:1816! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5333 Comm: syz.0.0 Not tainted 6.12.0-syzkaller-10553-gb86545e02e8c #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:bch2_btree_path_peek_slot+0xf50/0xf90 fs/bcachefs/btree_iter.c:1816 Code: f7 ff ff 48 89 34 24 be 08 00 00 00 44 89 44 24 08 e8 e4 fe e3 fd 48 8b 34 24 44 8b 44 24 08 e9 50 f7 ff ff e8 71 16 79 fd 90 <0f> 0b e8 69 16 79 fd 90 0f 0b e8 41 3e b6 07 e8 5c 16 79 fd 90 0f RSP: 0018:ffffc9000d46c720 EFLAGS: 00010246 RAX: ffffffff841cce0f RBX: 0000000000002164 RCX: 0000000000100000 RDX: ffffc9000e572000 RSI: 00000000000fffff RDI: 0000000000100000 RBP: ffffc9000d46c830 R08: ffffffff841cbff0 R09: 0000000000000000 R10: ffffc9000d46c980 R11: fffff52001a8d932 R12: dffffc0000000000 R13: 1ffff1100aeb8117 R14: ffff8880575c0898 R15: 1ffff1100aeb8116 FS: 00007f31ff5b26c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f31ff56ffe0 CR3: 000000003f69e000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_btree_iter_peek_slot+0xa2f/0x2550 fs/bcachefs/btree_iter.c:2658 __bch2_bkey_get_iter fs/bcachefs/btree_iter.h:575 [inline] bch2_bkey_get_iter fs/bcachefs/btree_iter.h:589 [inline] try_alloc_bucket fs/bcachefs/alloc_foreground.c:305 [inline] bch2_bucket_alloc_freelist fs/bcachefs/alloc_foreground.c:525 [inline] bch2_bucket_alloc_trans+0x1997/0x3a50 fs/bcachefs/alloc_foreground.c:648 bch2_bucket_alloc_set_trans+0x517/0xd30 fs/bcachefs/alloc_foreground.c:808 __open_bucket_add_buckets+0x13d0/0x1ec0 fs/bcachefs/alloc_foreground.c:1057 open_bucket_add_buckets+0x33a/0x410 fs/bcachefs/alloc_foreground.c:1101 bch2_alloc_sectors_start_trans+0xce9/0x2030 __bch2_btree_node_alloc fs/bcachefs/btree_update_interior.c:339 [inline] bch2_btree_reserve_get+0x612/0x1890 fs/bcachefs/btree_update_interior.c:549 bch2_btree_update_start+0xe56/0x14e0 fs/bcachefs/btree_update_interior.c:1247 bch2_btree_split_leaf+0x123/0x840 fs/bcachefs/btree_update_interior.c:1856 bch2_trans_commit_error+0x212/0x1390 fs/bcachefs/btree_trans_commit.c:942 __bch2_trans_commit+0x7ead/0x93c0 fs/bcachefs/btree_trans_commit.c:1140 bch2_trans_commit fs/bcachefs/btree_update.h:184 [inline] bch2_extent_update+0x4c0/0xbb0 fs/bcachefs/io_write.c:325 bch2_write_index_default fs/bcachefs/io_write.c:373 [inline] __bch2_write_index+0xed2/0x2140 fs/bcachefs/io_write.c:526 __bch2_write+0x563e/0x5dd0 fs/bcachefs/io_write.c:1503 bch2_write+0x9b5/0x1760 fs/bcachefs/io_write.c:1631 closure_queue include/linux/closure.h:270 [inline] closure_call include/linux/closure.h:432 [inline] bch2_dio_write_loop fs/bcachefs/fs-io-direct.c:532 [inline] bch2_direct_write+0x1afb/0x31a0 fs/bcachefs/fs-io-direct.c:655 bch2_write_iter+0x18e/0x2440 fs/bcachefs/fs-io-buffered.c:1036 iter_file_splice_write+0xbfa/0x1510 fs/splice.c:743 do_splice_from fs/splice.c:941 [inline] direct_splice_actor+0x11b/0x220 fs/splice.c:1164 splice_direct_to_actor+0x586/0xc80 fs/splice.c:1108 do_splice_direct_actor fs/splice.c:1207 [inline] do_splice_direct+0x289/0x3e0 fs/splice.c:1233 do_sendfile+0x564/0x8a0 fs/read_write.c:1363 __do_sys_sendfile64 fs/read_write.c:1424 [inline] __se_sys_sendfile64+0x17c/0x1e0 fs/read_write.c:1410 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:0x7f31fe780809 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007f31ff5b2058 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f31fe945fa0 RCX: 00007f31fe780809 RDX: 0000000000000000 RSI: 0000000000000007 RDI: 0000000000000009 RBP: 00007f31fe7f393e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000080000002 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f31fe945fa0 R15: 00007ffd497f2c18 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_btree_path_peek_slot+0xf50/0xf90 fs/bcachefs/btree_iter.c:1816 Code: f7 ff ff 48 89 34 24 be 08 00 00 00 44 89 44 24 08 e8 e4 fe e3 fd 48 8b 34 24 44 8b 44 24 08 e9 50 f7 ff ff e8 71 16 79 fd 90 <0f> 0b e8 69 16 79 fd 90 0f 0b e8 41 3e b6 07 e8 5c 16 79 fd 90 0f RSP: 0018:ffffc9000d46c720 EFLAGS: 00010246 RAX: ffffffff841cce0f RBX: 0000000000002164 RCX: 0000000000100000 RDX: ffffc9000e572000 RSI: 00000000000fffff RDI: 0000000000100000 RBP: ffffc9000d46c830 R08: ffffffff841cbff0 R09: 0000000000000000 R10: ffffc9000d46c980 R11: fffff52001a8d932 R12: dffffc0000000000 R13: 1ffff1100aeb8117 R14: ffff8880575c0898 R15: 1ffff1100aeb8116 FS: 00007f31ff5b26c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000560695f120f8 CR3: 000000003f69e000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400