bcachefs (loop0): bcachefs (loop0): error validating btree node at btree inodes level 0/0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 7589ab5e0c11cc7a written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0 node offset 16/24 bset u64s 110 bset byte offset 792: keys out of order: u64s 18 type inode_v3 4294967296:536870913:U32_MAX len 0 ver 0 > u64s 18 type inode_v3 0:536870914:U32_MAX len 0 ver 0, fixing bcachefs (loop0): invalid bkey in btree_node btree=inodes level=0: u64s 18 type inode_v3 4294967296:536870913:U32_MAX len 0 ver 0: mode=100755 flags=(15300000) journal_seq=5 hash_seed=b68791a594a6d5ae hash_type=siphash bi_size=9000 bi_sectors=24 bi_version=0 bi_atime=2780562352 bi_ctime=2780562352 bi_mtime=2780562352 bi_otime=2780562352 bi_uid=0 bi_gid=0 bi_nlink=1 bi_generation=0 bi_dev=0 bi_data_checksum=0 bi_compression=0 bi_project=0 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=4096 bi_dir_offset=1896155912177158345 bi_subvol=0 bi_parent_subvol=0 bi_nocow=0 bi_depth=0 bi_inodes_32bit=0 nonzero k.p.inode, deleting bcachefs (loop0): btree_node_read_work: rewriting btree node at due to error btree=inodes level=0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 7589ab5e0c11cc7a written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0 bcachefs (loop0): running explicit recovery pass check_topology (2), currently at recovery_pass_empty (0) bcachefs (loop0): bcachefs (loop0): error validating btree node on loop0 at btree dirents level 0/0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 9aa2895aefce4bdf written 24 min_key 0:4294967296:0 durability: 1 ptr: 0:41:0 gen 0 node offset 0/24: incorrect min_key: got POS_MIN should be 0:4294967296:0, btree topology error: bcachefs (loop0): flagging btree dirents lost data bcachefs (loop0): running explicit recovery pass scan_for_btree_nodes (1), currently at recovery_pass_empty (0) bcachefs (loop0): error reading btree root btree=dirents level=0: btree_node_read_error, fixing bcachefs (loop0): invalid bkey in btree_node btree=xattrs level=0: u64s 7 type stripe 536870912:9073845653939145521:4294901760 len 0 ver 0: algo 6 sectors 1536 blocks 4294967176:120 csum (unknown csum_type 116) gran (invalid shift 97) labelinvalid label 115 stripe at bad pos, deleting BUG: sleeping function called from invalid context at ./include/linux/sched/mm.h:321 in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 5330, name: syz.0.0 preempt_count: 0, expected: 0 RCU nest depth: 1, expected: 0 3 locks held by syz.0.0/5330: #0: ffff8880437240e0 (&type->s_umount_key#47/1){+.+.}-{4:4}, at: alloc_super+0x221/0x9d0 fs/super.c:344 #1: ffff888054804210 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:161 [inline] #1: ffff888054804210 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:253 [inline] #1: ffff888054804210 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7ed/0xd40 fs/bcachefs/btree_iter.c:3386 #2: ffffffff8ed3b560 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline] #2: ffffffff8ed3b560 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline] #2: ffffffff8ed3b560 (rcu_read_lock){....}-{1:3}, at: bch2_bkey_pick_read_device+0x29c/0x19b0 fs/bcachefs/extents.c:144 CPU: 0 UID: 0 PID: 5330 Comm: syz.0.0 Not tainted 6.14.0-syzkaller-11270-g08733088b566 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 __might_resched+0x558/0x6c0 kernel/sched/core.c:8818 might_alloc include/linux/sched/mm.h:321 [inline] slab_pre_alloc_hook mm/slub.c:4089 [inline] slab_alloc_node mm/slub.c:4167 [inline] __do_kmalloc_node mm/slub.c:4317 [inline] __kmalloc_node_track_caller_noprof+0xd3/0x4d0 mm/slub.c:4337 __do_krealloc mm/slub.c:4895 [inline] krealloc_noprof+0x10f/0x300 mm/slub.c:4948 bch2_printbuf_make_room+0x1f1/0x350 fs/bcachefs/printbuf.c:59 bch2_prt_printf+0x269/0x6d0 fs/bcachefs/printbuf.c:186 bch2_log_msg_start fs/bcachefs/error.c:19 [inline] bch2_fs_trans_inconsistent fs/bcachefs/error.c:63 [inline] bch2_fs_inconsistent+0x143/0x220 fs/bcachefs/error.c:81 bch2_dev_rcu fs/bcachefs/sb-members.h:226 [inline] bch2_bkey_pick_read_device+0x95e/0x19b0 fs/bcachefs/extents.c:165 bch2_btree_node_read+0x7ac/0x29e0 fs/bcachefs/btree_io.c:1706 __bch2_btree_root_read fs/bcachefs/btree_io.c:1796 [inline] bch2_btree_root_read+0x656/0x7e0 fs/bcachefs/btree_io.c:1818 read_btree_roots+0x3d7/0xa80 fs/bcachefs/recovery.c:581 bch2_fs_recovery+0x28e4/0x3e20 fs/bcachefs/recovery.c:928 bch2_fs_start+0x2fb/0x610 fs/bcachefs/super.c:1060 bch2_fs_get_tree+0x113e/0x18f0 fs/bcachefs/fs.c:2253 vfs_get_tree+0x90/0x2b0 fs/super.c:1759 do_new_mount+0x2cf/0xb70 fs/namespace.c:3878 do_mount fs/namespace.c:4218 [inline] __do_sys_mount fs/namespace.c:4429 [inline] __se_sys_mount+0x38c/0x400 fs/namespace.c:4406 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f533778e90a 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:00007f53385f4e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f53385f4ef0 RCX: 00007f533778e90a RDX: 0000200000000300 RSI: 0000200000000180 RDI: 00007f53385f4eb0 RBP: 0000200000000300 R08: 00007f53385f4ef0 R09: 0000000001008040 R10: 0000000001008040 R11: 0000000000000246 R12: 0000200000000180 R13: 00007f53385f4eb0 R14: 0000000000005a74 R15: 00002000000004c0 bcachefs (loop0): pointer to nonexistent device 251 inconsistency detected - emergency read only at journal seq 10 bcachefs (loop0): btree node read error: no device to read from at alloc level 0/0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ac62141f8dc7e261 written 24 min_key POS_MIN durability: 0 ptr: 251:6656 gen 0 bcachefs (loop0): flagging btree alloc lost data bcachefs (loop0): error reading btree root btree=alloc level=0: btree_node_read_error, fixing bcachefs (loop0): bcachefs (loop0): error validating btree node on loop0 at btree freespace level 0/0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq e81e1ed936acf3df written 32 min_key POS_MIN durability: 1 ptr: 0:29:0 gen 0 node offset 0/32 bset u64s 0: invalid bkey format: field 2 too large: 4294967295 + 131072 > 4294967295 u64s 3 fields 64:0, 64:0, 32:131072, 0:0, 0:0, 0:0, btree topology error: bcachefs (loop0): flagging btree freespace lost data bcachefs (loop0): error reading btree root btree=freespace level=0: btree_node_read_error, fixing bcachefs (loop0): scan_for_btree_nodes... bcachefs (loop0): btree node scan found 7 nodes after overwrites done bcachefs (loop0): check_topology... bcachefs (loop0): btree root dirents unreadable, must recover from scan bcachefs (loop0): bch2_get_scanned_nodes(): recovery btree=dirents level=0 POS_MIN - SPOS_MAX bcachefs (loop0): bch2_get_scanned_nodes(): recovering u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 9aa2895aefce4bdf written 8 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0 done bcachefs (loop0): accounting_read... done bcachefs (loop0): alloc_read... done bcachefs (loop0): snapshots_read... done bcachefs (loop0): check_allocations... bcachefs (loop0): bucket 0:34 data type user ptr gen 0 missing in alloc btree while marking u64s 7 type extent 4099:1800:U32_MAX len 8 ver 0: durability: 1 crc: c_size 8 size 8 offset 0 nonce 0 csum none 0:0 compress incompressible ptr: 0:34:0 gen 0, fixing bcachefs (loop0): bucket 0:27 data type btree ptr gen 0 missing in alloc btree while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq c6c25c03258c59c5 written 16 min_key POS_MIN durability: 1 ptr: 0:27:0 gen 0, fixing bcachefs (loop0): bucket 0:38 data type btree ptr gen 0 missing in alloc btree while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 7589ab5e0c11cc7a written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0, fixing bcachefs (loop0): bucket 0:41 data type btree ptr gen 0 missing in alloc btree while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 9aa2895aefce4bdf written 8 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0, fixing bcachefs (loop0): bucket 0:31 data type btree ptr gen 0 missing in alloc btree while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 2285c34bed0abe32 written 16 min_key POS_MIN durability: 1 ptr: 0:31:0 gen 0, fixing bcachefs (loop0): bucket 0:35 data type btree ptr gen 0 missing in alloc btree while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq c0bef60d07ceb940 written 16 min_key POS_MIN durability: 1 ptr: 0:35:0 gen 0, fixing bcachefs (loop0): bucket 0:32 data type btree ptr gen 0 missing in alloc btree while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ebb8d5a9e3463bdb written 16 min_key POS_MIN durability: 1 ptr: 0:32:0 gen 0, fixing bcachefs (loop0): bucket 0:28 data type btree ptr gen 0 missing in alloc btree while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 28f61e078e70b95c written 16 min_key POS_MIN durability: 1 ptr: 0:28:0 gen 0, fixing bcachefs (loop0): bucket 0:37 data type btree ptr gen 0 missing in alloc btree while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 4a8b0fa43a9980a6 written 24 min_key POS_MIN durability: 1 ptr: 0:37:0 gen 0, fixing done bcachefs (loop0): going read-write bcachefs (loop0): journal_replay... bcachefs (loop0): bch2_journal_replay(): error journal_shutdown bcachefs (loop0): bch2_fs_recovery(): error journal_shutdown bcachefs (loop0): bch2_fs_start(): error starting filesystem journal_shutdown bcachefs (loop0): shutting down bcachefs (loop0): shutdown complete bcachefs: bch2_fs_get_tree() error: journal_shutdown