WARNING: CPU: 0 PID: 6547 at fs/bcachefs/btree_iter.c:3030 check_srcu_held_too_long fs/bcachefs/btree_iter.c:3028 [inline] WARNING: CPU: 0 PID: 6547 at fs/bcachefs/btree_iter.c:3030 bch2_trans_srcu_unlock+0x42c/0x4b0 fs/bcachefs/btree_iter.c:3044 Modules linked in: CPU: 0 UID: 0 PID: 6547 Comm: syz.0.12 Not tainted 6.12.0-syzkaller-g7b1d1d4cfac0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : check_srcu_held_too_long fs/bcachefs/btree_iter.c:3028 [inline] pc : bch2_trans_srcu_unlock+0x42c/0x4b0 fs/bcachefs/btree_iter.c:3044 lr : check_srcu_held_too_long fs/bcachefs/btree_iter.c:3028 [inline] lr : bch2_trans_srcu_unlock+0x42c/0x4b0 fs/bcachefs/btree_iter.c:3044 sp : ffff8000a38664a0 x29: ffff8000a38664d0 x28: 1fffe0001ab6a808 x27: dfff800000000000 x26: 0000000000000000 x25: ffff0000f2e00000 x24: ffff80008f79f000 x23: 1ffff00011ef3e40 x22: 00000000ffff9bab x21: ffffffffffffed87 x20: ffff0000d5b54000 x19: ffff0000d5b54042 x18: 1fffe000366c6876 x17: ffff80008f81d000 x16: ffff800080355c58 x15: 0000000000000001 x14: 1fffe0001ae12c00 x13: 0000000000000000 x12: 0000000000000000 x11: ffff60001ae12c01 x10: 1fffe0001ae12c00 x9 : 84a20396a771e900 x8 : 84a20396a771e900 x7 : ffff8000802c419c x6 : 0000000000000000 x5 : 0000000000000001 x4 : 0000000000000001 x3 : ffff8000802b69e4 x2 : 0000000000000001 x1 : 0000000000000004 x0 : 0000000000000001 Call trace: check_srcu_held_too_long fs/bcachefs/btree_iter.c:3028 [inline] (P) bch2_trans_srcu_unlock+0x42c/0x4b0 fs/bcachefs/btree_iter.c:3044 (P) check_srcu_held_too_long fs/bcachefs/btree_iter.c:3028 [inline] (L) bch2_trans_srcu_unlock+0x42c/0x4b0 fs/bcachefs/btree_iter.c:3044 (L) bch2_trans_begin+0x7c4/0x950 fs/bcachefs/btree_iter.c:3121 bch2_gc_alloc_done fs/bcachefs/btree_gc.c:897 [inline] bch2_check_allocations+0x1b6c/0x48f4 fs/bcachefs/btree_gc.c:1139 bch2_run_recovery_pass+0xe4/0x1d4 fs/bcachefs/recovery_passes.c:191 bch2_run_recovery_passes+0x30c/0x73c fs/bcachefs/recovery_passes.c:244 bch2_fs_recovery+0x32d8/0x55dc fs/bcachefs/recovery.c:861 bch2_fs_start+0x30c/0x53c fs/bcachefs/super.c:1037 bch2_fs_get_tree+0x938/0x1030 fs/bcachefs/fs.c:2170 vfs_get_tree+0x90/0x28c fs/super.c:1814 do_new_mount+0x278/0x900 fs/namespace.c:3507 path_mount+0x590/0xe04 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount fs/namespace.c:4034 [inline] __arm64_sys_mount+0x4d4/0x5ac fs/namespace.c:4034 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 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+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 irq event stamp: 92128 hardirqs last enabled at (92127): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1518 [inline] hardirqs last enabled at (92127): [] finish_lock_switch+0xbc/0x1e4 kernel/sched/core.c:5082 hardirqs last disabled at (92128): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:488 softirqs last enabled at (92114): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (92114): [] handle_softirqs+0xa38/0xbf8 kernel/softirq.c:582 softirqs last disabled at (89603): [] __do_softirq+0x14/0x20 kernel/softirq.c:588 ---[ end trace 0000000000000000 ]--- bucket 0:1 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:1 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:2 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:2 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:3 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:3 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:4 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:4 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:5 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:5 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:6 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:6 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:7 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:7 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:8 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:8 gen 0 data type sb has wrong dirty_sectors: got 0, should be 8, fixing bucket 0:9 gen 0 has wrong data_type: got free, should be journal, fixing bucket 0:9 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:10 gen 0 has wrong data_type: got free, should be journal, fixing bcachefs (loop0): Ratelimiting new instances of previous error bucket 0:10 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing bcachefs (loop0): Ratelimiting new instances of previous error done bcachefs (loop0): going read-write bcachefs (loop0): journal_replay... done bcachefs (loop0): check_alloc_info... incorrect key in freespace btree (got set should be deleted) u64s 13 type alloc_v4 0:25:0 len 0 ver 0: gen 0 oldest_gen 0 data_type journal journal_seq 0 need_discard 0 need_inc_gen 0 dirty_sectors 256 stripe_sectors 0 cached_sectors 0 stripe 0 stripe_redundancy 0 io_time[READ] 0 io_time[WRITE] 0 fragmentation 0 bp_start 8 , fixing incorrect key in freespace btree (got set should be deleted) u64s 13 type alloc_v4 0:37:0 len 0 ver 0: gen 0 oldest_gen 0 data_type btree journal_seq 0 need_discard 0 need_inc_gen 0 dirty_sectors 256 stripe_sectors 0 cached_sectors 0 stripe 0 stripe_redundancy 0 io_time[READ] 0 io_time[WRITE] 0 fragmentation 0 bp_start 8 , fixing incorrect key in freespace btree (got set should be deleted) u64s 13 type alloc_v4 0:42:0 len 0 ver 0: gen 0 oldest_gen 0 data_type btree journal_seq 0 need_discard 0 need_inc_gen 0 dirty_sectors 256 stripe_sectors 0 cached_sectors 0 stripe 0 stripe_redundancy 0 io_time[READ] 0 io_time[WRITE] 0 fragmentation 0 bp_start 8 , fixing 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... missing backpointer for btree=inodes l=1 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 got: u64s 5 type deleted 0:9961472:0 len 0 ver 0 want: u64s 9 type backpointer 0:9961472:0 len 0 ver 0: bucket=0:38:0 btree=inodes l=1 offset=0:0 len=256 pos=SPOS_MAX, fixing missing backpointer for btree=dirents l=1 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 got: u64s 5 type deleted 0:10747904:0 len 0 ver 0 want: u64s 9 type backpointer 0:10747904:0 len 0 ver 0: bucket=0:41:0 btree=dirents l=1 offset=0:0 len=256 pos=SPOS_MAX, fixing missing backpointer for btree=subvolumes l=1 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 got: u64s 5 type deleted 0:9175040:0 len 0 ver 0 want: u64s 9 type backpointer 0:9175040:0 len 0 ver 0: bucket=0:35:0 btree=subvolumes l=1 offset=0:0 len=256 pos=SPOS_MAX, fixing missing backpointer for btree=snapshots l=1 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 got: u64s 5 type deleted 0:8388608:0 len 0 ver 0 want: u64s 9 type backpointer 0:8388608:0 len 0 ver 0: bucket=0:32:0 btree=snapshots l=1 offset=0:0 len=256 pos=SPOS_MAX, fixing 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... snapshot points to missing/incorrect tree: u64s 8 type snapshot 0:4294967295:0 len 0 ver 0: is_subvol 1 deleted 0 parent 0 children 0 0 subvol 1 tree 0, fixing 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): 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): reading quotas bcachefs (loop0): quotas done bcachefs (loop0): bch2_copygc_start(): error creating copygc thread EINTR bcachefs (loop0): error starting copygc thread bcachefs (loop0): bch2_fs_start(): error starting filesystem EINTR bcachefs (loop0): shutting down bcachefs (loop0): going read-only bcachefs (loop0): finished waiting for writes to stop bcachefs (loop0): flushing journal and stopping allocators, journal seq 42 bcachefs (loop0): flushing journal and stopping allocators complete, journal seq 43 bcachefs (loop0): shutdown complete, journal seq 44 bcachefs (loop0): marking filesystem clean bcachefs (loop0): shutdown complete bcachefs: bch2_fs_get_tree() error: EINTR