------------[ cut here ]------------ btree trans held srcu lock (delaying memory reclaim) for 28 seconds WARNING: CPU: 1 PID: 7483 at fs/bcachefs/btree_iter.c:3276 check_srcu_held_too_long fs/bcachefs/btree_iter.c:3274 [inline] WARNING: CPU: 1 PID: 7483 at fs/bcachefs/btree_iter.c:3276 bch2_trans_put+0xcd4/0xed8 fs/bcachefs/btree_iter.c:3570 Modules linked in: CPU: 1 UID: 0 PID: 7483 Comm: syz.1.142 Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 pstate: 63400005 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : check_srcu_held_too_long fs/bcachefs/btree_iter.c:3274 [inline] pc : bch2_trans_put+0xcd4/0xed8 fs/bcachefs/btree_iter.c:3570 lr : check_srcu_held_too_long fs/bcachefs/btree_iter.c:3274 [inline] lr : bch2_trans_put+0xcd4/0xed8 fs/bcachefs/btree_iter.c:3570 sp : ffff8000a5f56d00 x29: ffff8000a5f56e20 x28: ffff700014beadb0 x27: ffff0000d8c94000 x26: ffff700014beadb0 x25: ffff0000d8c94046 x24: ffff0000f0900000 x23: dfff800000000000 x22: ffff80008f7e0000 x21: 1ffff00011efc040 x20: 00000000ffffb509 x19: fffffffffffff8f5 x18: 00000000ffffffff x17: ffff800093605000 x16: ffff80008b065ce0 x15: 0000000000000001 x14: 1ffff00014bead10 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000080000 x10: 000000000007ffff x9 : 7329eb6a6b53ef00 x8 : 7329eb6a6b53ef00 x7 : ffff80008056636c x6 : 0000000000000000 x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff8000807d446c x2 : 0000000000000002 x1 : 0000000100000000 x0 : 0000000000000000 Call trace: check_srcu_held_too_long fs/bcachefs/btree_iter.c:3274 [inline] (P) bch2_trans_put+0xcd4/0xed8 fs/bcachefs/btree_iter.c:3570 (P) class_btree_trans_destructor fs/bcachefs/btree_iter.h:991 [inline] bch2_btree_root_read+0x310/0x3c8 fs/bcachefs/btree_io.c:1928 read_btree_roots+0x218/0x6c0 fs/bcachefs/recovery.c:615 bch2_fs_recovery+0x1bb4/0x2fb4 fs/bcachefs/recovery.c:1006 bch2_fs_start+0x940/0xbec fs/bcachefs/super.c:1213 bch2_fs_get_tree+0x880/0x107c fs/bcachefs/fs.c:2488 vfs_get_tree+0x90/0x28c fs/super.c:1815 do_new_mount+0x278/0x7f4 fs/namespace.c:3808 path_mount+0x5b4/0xde0 fs/namespace.c:4123 do_mount fs/namespace.c:4136 [inline] __do_sys_mount fs/namespace.c:4347 [inline] __se_sys_mount fs/namespace.c:4324 [inline] __arm64_sys_mount+0x3e8/0x468 fs/namespace.c:4324 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x5c/0x254 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:763 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 irq event stamp: 496218 hardirqs last enabled at (496217): [] irqentry_exit+0xd8/0x108 kernel/entry/common.c:214 hardirqs last disabled at (496218): [] el1_brk64+0x20/0x54 arch/arm64/kernel/entry-common.c:434 softirqs last enabled at (496216): [] softirq_handle_end kernel/softirq.c:425 [inline] softirqs last enabled at (496216): [] handle_softirqs+0xaf8/0xc88 kernel/softirq.c:607 softirqs last disabled at (483903): [] __do_softirq+0x14/0x20 kernel/softirq.c:613 ---[ end trace 0000000000000000 ]--- bcachefs (loop1): invalid bkey in btree_node btree=alloc level=0: u64s 11 type alloc_v4 POS_MIN len 0 ver 0: gen 0 oldest_gen 0 data_type sb journal_seq_nonempty 1 journal_seq_empty 1769482 need_discard 1 need_inc_gen 1 dirty_sectors 256 stripe_sectors 27 cached_sectors 0 stripe 1073741824 stripe_redundancy 0 io_time[READ] 1 io_time[WRITE] 1 fragmentation 0 bp_start 6 invalid data type (got 1 should be 7), deleting bcachefs (loop1): accounting_read... done bcachefs (loop1): alloc_read... done bcachefs (loop1): snapshots_read... done bcachefs (loop1): check_allocations... bcachefs (loop1): btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ac62141f8dc7e261 written 24 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, fixing bcachefs (loop1): bucket 0:26 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 ac62141f8dc7e261 written 24 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, fixing bcachefs (loop1): btree ptr not marked in member info btree allocated bitmap 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 (loop1): 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 (loop1): btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 9aa2895aefce4bdf written 24 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0, fixing bcachefs (loop1): 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 24 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0, fixing bcachefs (loop1): btree ptr not marked in member info btree allocated bitmap 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 (loop1): 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 (loop1): btree ptr not marked in member info btree allocated bitmap 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 (loop1): btree ptr not marked in member info btree allocated bitmap 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, fixing bcachefs (loop1): bucket 0:29 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 e81e1ed936acf3df written 32 min_key POS_MIN durability: 1 ptr: 0:29:0 gen 0, fixing bcachefs (loop1): bucket 0:0 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop1): bucket 0:0 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop1): bucket 0:1 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop1): bucket 0:1 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop1): bucket 0:2 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop1): bucket 0:2 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop1): bucket 0:3 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop1): bucket 0:3 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop1): bucket 0:4 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop1): bucket 0:4 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop1): bucket 0:5 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop1): bucket 0:5 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop1): bucket 0:6 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop1): bucket 0:6 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop1): bucket 0:7 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop1): bucket 0:7 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop1): bucket 0:8 gen 0 has wrong data_type: got free, should be sb, fixing bcachefs (loop1): bucket 0:8 gen 0 data type sb has wrong dirty_sectors: got 0, should be 8, fixing bcachefs (loop1): bucket 0:9 gen 0 has wrong data_type: got free, should be journal, fixing bcachefs (loop1): bucket 0:9 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop1): bucket 0:10 gen 0 has wrong data_type: got free, should be journal, fixing Ratelimiting new instances of previous error bcachefs (loop1): bucket 0:10 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing Ratelimiting new instances of previous error done bcachefs (loop1): going read-write workqueue: Failed to create a rescuer kthread for wq "bcachefs": -EINTR bcachefs (loop1): flushing journal and stopping allocators, journal seq 10 bcachefs (loop1): flushing journal and stopping allocators complete, journal seq 10 bcachefs (loop1): unclean shutdown complete, journal seq 10 bcachefs (loop1): error in recovery: ENOMEM_fs_other_alloc emergency read only at seq 10 bcachefs (loop1): bch2_fs_start(): error starting filesystem ENOMEM_fs_other_alloc bcachefs (loop1): shutting down bcachefs (loop1): shutdown complete bcachefs: bch2_fs_get_tree() error: ENOMEM_fs_other_alloc