Warning: Permanently added '[localhost]:40990' (ED25519) to the list of known hosts. executing program [ 63.587572][ T5096] loop0: detected capacity change from 0 to 32768 [ 63.653423][ T5096] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=xxhash,compression=lz4,fsck,norecovery,nojournal_transaction_names,reconstruct_alloc,no_data_io [ 63.661796][ T5096] bcachefs (loop0): recovering from clean shutdown, journal seq 10 [ 63.665448][ T5096] bcachefs (loop0): Version upgrade required: [ 63.665448][ T5096] Version upgrade from 0.24: unwritten_extents to 1.7: mi_btree_bitmap incomplete [ 63.665448][ T5096] Doing incompatible version upgrade from 0.24: unwritten_extents to 1.13: inode_has_child_snapshots [ 63.665448][ T5096] running recovery passes: check_allocations,check_alloc_info,check_lrus,check_btree_backpointers,check_backpointers_to_extents,check_extents_to_backpointers,check_alloc_to_lru_refs,bucket_gens_init,check_snapshot_trees,check_snapshots,check_subvols,check_subvol_children,delete_dead_snapshots,check_inodes,check_extents,check_indirect_extents,check_dirents,check_xattrs,check_root,check_unreachable_inodes,check_subvolume_structure,check_directory_structure,check_nlinks,set_fs_needs_rebalance [ 63.694036][ T5096] bcachefs (loop0): dropping and reconstructing all alloc info [ 63.705316][ T5096] bcachefs (loop0): check_topology... done [ 63.707622][ T5096] bcachefs (loop0): accounting_read... done [ 63.710950][ T5096] bcachefs (loop0): alloc_read... done [ 63.713143][ T5096] bcachefs (loop0): stripes_read... done [ 63.715435][ T5096] bcachefs (loop0): snapshots_read... done [ 63.717799][ T5096] bcachefs (loop0): check_allocations... done [ 63.733565][ T5096] bcachefs (loop0): going read-write [ 63.739854][ T5096] bcachefs (loop0): done starting filesystem [ 63.766739][ T24] audit: type=1800 audit(1729365995.251:2): pid=5096 uid=0 auid=4294967295 ses=4294967295 subj=unconfined op=collect_data cause=failed(directio) comm="syz-executor148" name="file1" dev="loop0" ino=536870912 res=0 errno=0 [ 63.787502][ T24] audit: type=1800 audit(1729365995.251:3): pid=5096 uid=0 auid=4294967295 ses=4294967295 subj=unconfined op=collect_data cause=failed(directio) comm="syz-executor148" name="file1" dev="loop0" ino=536870912 res=0 errno=0 [ 64.006720][ T5108] [ 64.007730][ T5108] ====================================================== [ 64.010224][ T5108] WARNING: possible circular locking dependency detected [ 64.012788][ T5108] 6.12.0-rc3-syzkaller-00389-g3d5ad2d4eca3 #0 Not tainted [ 64.016289][ T5108] ------------------------------------------------------ [ 64.018875][ T5108] syz-executor148/5108 is trying to acquire lock: [ 64.021310][ T5108] ffff888045044128 (bcachefs_btree){+.+.}-{0:0}, at: __bch2_trans_relock+0x382/0x5f0 [ 64.024855][ T5108] [ 64.024855][ T5108] but task is already holding lock: [ 64.027638][ T5108] ffff888045161548 (&c->fsck_error_msgs_lock){+.+.}-{3:3}, at: __bch2_fsck_err+0x3dc/0x15f0 [ 64.031362][ T5108] [ 64.031362][ T5108] which lock already depends on the new lock. [ 64.031362][ T5108] [ 64.035188][ T5108] [ 64.035188][ T5108] the existing dependency chain (in reverse order) is: [ 64.038864][ T5108] [ 64.038864][ T5108] -> #1 (&c->fsck_error_msgs_lock){+.+.}-{3:3}: [ 64.042368][ T5108] lock_acquire+0x1ed/0x550 [ 64.044398][ T5108] __mutex_lock+0x136/0xd70 [ 64.046250][ T5108] __bch2_fsck_err+0x3dc/0x15f0 [ 64.048305][ T5108] bch2_check_alloc_hole_freespace+0x816/0x1180 [ 64.050892][ T5108] bch2_check_alloc_info+0x20f8/0x5330 [ 64.053260][ T5108] bch2_run_recovery_pass+0xf0/0x1e0 [ 64.055464][ T5108] bch2_run_online_recovery_passes+0x85/0x150 [ 64.057717][ T5108] bch2_fsck_online_thread_fn+0x1da/0x410 [ 64.059960][ T5108] thread_with_stdio_fn+0x5f/0x130 [ 64.062045][ T5108] kthread+0x2f0/0x390 [ 64.063860][ T5108] ret_from_fork+0x4b/0x80 [ 64.065770][ T5108] ret_from_fork_asm+0x1a/0x30 [ 64.067664][ T5108] [ 64.067664][ T5108] -> #0 (bcachefs_btree){+.+.}-{0:0}: [ 64.070450][ T5108] validate_chain+0x18ef/0x5920 [ 64.072418][ T5108] __lock_acquire+0x1384/0x2050 [ 64.074341][ T5108] lock_acquire+0x1ed/0x550 [ 64.076247][ T5108] __bch2_trans_relock+0x397/0x5f0 [ 64.078399][ T5108] __bch2_fsck_err+0x131d/0x15f0 [ 64.080390][ T5108] bch2_check_alloc_hole_freespace+0x816/0x1180 [ 64.082826][ T5108] bch2_check_alloc_info+0x20f8/0x5330 [ 64.084919][ T5108] bch2_run_recovery_pass+0xf0/0x1e0 [ 64.087051][ T5108] bch2_run_online_recovery_passes+0x85/0x150 [ 64.089475][ T5108] bch2_fsck_online_thread_fn+0x1da/0x410 [ 64.091810][ T5108] thread_with_stdio_fn+0x5f/0x130 [ 64.093931][ T5108] kthread+0x2f0/0x390 [ 64.095653][ T5108] ret_from_fork+0x4b/0x80 [ 64.097506][ T5108] ret_from_fork_asm+0x1a/0x30 [ 64.099510][ T5108] [ 64.099510][ T5108] other info that might help us debug this: [ 64.099510][ T5108] [ 64.103193][ T5108] Possible unsafe locking scenario: [ 64.103193][ T5108] [ 64.105838][ T5108] CPU0 CPU1 [ 64.107856][ T5108] ---- ---- [ 64.109764][ T5108] lock(&c->fsck_error_msgs_lock); [ 64.111649][ T5108] lock(bcachefs_btree); [ 64.114093][ T5108] lock(&c->fsck_error_msgs_lock); [ 64.116883][ T5108] lock(bcachefs_btree); [ 64.118537][ T5108] [ 64.118537][ T5108] *** DEADLOCK *** [ 64.118537][ T5108] [ 64.121505][ T5108] 3 locks held by syz-executor148/5108: [ 64.123566][ T5108] #0: ffff888045100278 (&c->state_lock){++++}-{3:3}, at: bch2_run_online_recovery_passes+0x32/0x150 [ 64.127515][ T5108] #1: ffff888045104398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7de/0xd20 [ 64.131533][ T5108] #2: ffff888045161548 (&c->fsck_error_msgs_lock){+.+.}-{3:3}, at: __bch2_fsck_err+0x3dc/0x15f0 [ 64.135400][ T5108] [ 64.135400][ T5108] stack backtrace: [ 64.137589][ T5108] CPU: 0 UID: 0 PID: 5108 Comm: syz-executor148 Not tainted 6.12.0-rc3-syzkaller-00389-g3d5ad2d4eca3 #0 [ 64.141628][ T5108] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 64.145585][ T5108] Call Trace: [ 64.146822][ T5108] [ 64.147906][ T5108] dump_stack_lvl+0x241/0x360 [ 64.149640][ T5108] ? __pfx_dump_stack_lvl+0x10/0x10 [ 64.151682][ T5108] ? __pfx__printk+0x10/0x10 [ 64.153372][ T5108] print_circular_bug+0x13a/0x1b0 [ 64.155285][ T5108] check_noncircular+0x36a/0x4a0 [ 64.157137][ T5108] ? __pfx_validate_chain+0x10/0x10 [ 64.159144][ T5108] ? __pfx_check_noncircular+0x10/0x10 [ 64.161120][ T5108] ? lockdep_lock+0x123/0x2b0 [ 64.162886][ T5108] ? __pfx_lockdep_hardirqs_on_prepare+0x10/0x10 [ 64.165262][ T5108] validate_chain+0x18ef/0x5920 [ 64.167049][ T5108] ? __lock_acquire+0x1384/0x2050 [ 64.168922][ T5108] ? __pfx_validate_chain+0x10/0x10 [ 64.170835][ T5108] ? mark_lock+0x9a/0x360 [ 64.172474][ T5108] ? __pfx_lock_acquire+0x10/0x10 [ 64.174360][ T5108] __lock_acquire+0x1384/0x2050 [ 64.176131][ T5108] lock_acquire+0x1ed/0x550 [ 64.177844][ T5108] ? __bch2_trans_relock+0x382/0x5f0 [ 64.179884][ T5108] ? __pfx_lock_acquire+0x10/0x10 [ 64.181716][ T5108] ? __pfx_bch2_stdio_redirect_readline_timeout+0x10/0x10 [ 64.184304][ T5108] ? btree_path_get_locks+0x491/0x5c0 [ 64.186165][ T5108] __bch2_trans_relock+0x397/0x5f0 [ 64.188067][ T5108] ? __bch2_trans_relock+0x382/0x5f0 [ 64.189991][ T5108] ? __pfx___bch2_trans_relock+0x10/0x10 [ 64.191986][ T5108] __bch2_fsck_err+0x131d/0x15f0 [ 64.193533][ T5108] ? __pfx___bch2_fsck_err+0x10/0x10 [ 64.195197][ T5108] ? bch2_get_key_or_hole+0x97b/0xfe0 [ 64.197077][ T5108] ? bch2_check_alloc_hole_freespace+0x601/0x1180 [ 64.199342][ T5108] bch2_check_alloc_hole_freespace+0x816/0x1180 [ 64.201537][ T5108] ? __pfx_bch2_check_alloc_hole_freespace+0x10/0x10 [ 64.203801][ T5108] ? bch2_dev_tryget_noerror+0x20/0x340 [ 64.205816][ T5108] ? bch2_check_alloc_info+0x1f36/0x5330 [ 64.207811][ T5108] bch2_check_alloc_info+0x20f8/0x5330 [ 64.209782][ T5108] ? bch2_check_alloc_info+0x26e/0x5330 [ 64.211818][ T5108] ? __pfx_bch2_check_alloc_info+0x10/0x10 [ 64.213790][ T5108] ? stack_trace_save+0x118/0x1d0 [ 64.215646][ T5108] ? __pfx_stack_trace_save+0x10/0x10 [ 64.217694][ T5108] ? lockdep_unlock+0x16a/0x300 [ 64.219546][ T5108] ? mark_lock+0x2ae/0x360 [ 64.221222][ T5108] ? __lock_acquire+0x1384/0x2050 [ 64.223113][ T5108] ? bch2_check_alloc_info+0x26e/0x5330 [ 64.225212][ T5108] ? mark_lock+0x9a/0x360 [ 64.226755][ T5108] ? bch2_check_alloc_info+0x26e/0x5330 [ 64.228843][ T5108] ? bch2_check_alloc_info+0x26e/0x5330 [ 64.230920][ T5108] ? __pfx__raw_spin_unlock_irqrestore+0x10/0x10 [ 64.233284][ T5108] ? bch2_check_alloc_info+0x26e/0x5330 [ 64.235465][ T5108] ? __wake_up_common_lock+0x18c/0x1e0 [ 64.237514][ T5108] ? bch2_stdio_redirect_vprintf+0x4ea/0x570 [ 64.239769][ T5108] ? __pfx_bch2_stdio_redirect_vprintf+0x10/0x10 [ 64.242094][ T5108] ? __bch2_print+0x1fc/0x220 [ 64.243895][ T5108] ? lockdep_hardirqs_on_prepare+0x43d/0x780 [ 64.246115][ T5108] ? bch2_run_recovery_pass+0x6d/0x1e0 [ 64.248006][ T5108] ? __pfx___bch2_print+0x10/0x10 [ 64.249857][ T5108] ? lockdep_hardirqs_on+0x99/0x150 [ 64.251791][ T5108] bch2_run_recovery_pass+0xf0/0x1e0 [ 64.253855][ T5108] bch2_run_online_recovery_passes+0x85/0x150 [ 64.255992][ T5108] bch2_fsck_online_thread_fn+0x1da/0x410 [ 64.258173][ T5108] thread_with_stdio_fn+0x5f/0x130 [ 64.260281][ T5108] ? __pfx_thread_with_stdio_fn+0x10/0x10 [ 64.262556][ T5108] kthread+0x2f0/0x390 [ 64.264068][ T5108] ? __pfx_thread_with_stdio_fn+0x10/0x10 [ 64.266103][ T5108] ? __pfx_kthread+0x10/0x10 [ 64.267905][ T5108] ret_from_fork+0x4b/0x80 [ 64.269648][ T5108] ? __pfx_kthread+0x10/0x10 [ 64.271408][ T5108] ret_from_fork_asm+0x1a/0x30 [ 64.273276][ T5108] [ 64.296952][ T5096] syz-executor148 (5096) used greatest stack depth: 17872 bytes left [ 64.300117][ T5108] syz-executor148 (5108) used greatest stack depth: 12208 bytes left executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program VM DIAGNOSIS: 19:26:35 Registers: info registers vcpu 0 CPU#0 RAX=000000000000007a RBX=ffffffff9a715e60 RCX=0000000000000000 RDX=00000000000003f8 RSI=0000000000000000 RDI=0000000000000020 RBP=0000000000000000 RSP=ffffc9000b2b6110 R8 =ffffffff854a6d7b R9 =1ffff11000074046 R10=dffffc0000000000 R11=ffffffff854a6d30 R12=dffffc0000000000 R13=ffffffff9a410f05 R14=000000000000007a R15=00000000000003f8 RIP=ffffffff854a6dae RFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =0000 0000000000000000 ffffffff 00c00000 CS =0010 0000000000000000 ffffffff 00a09b00 DPL=0 CS64 [-RA] SS =0018 0000000000000000 ffffffff 00c09300 DPL=0 DS [-WA] DS =0000 0000000000000000 ffffffff 00c00000 FS =0000 0000000000000000 ffffffff 00c00000 GS =0000 ffff88801fc00000 ffffffff 00c00000 LDT=0000 0000000000000000 ffffffff 00c00000 TR =0040 fffffe0000003000 00004087 00008b00 DPL=0 TSS64-busy GDT= fffffe0000001000 0000007f IDT= fffffe0000000000 00000fff CR0=80050033 CR2=00007fabdf624678 CR3=000000000e734000 CR4=00352ef0 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 DR6=00000000fffe0ff0 DR7=0000000000000400 EFER=0000000000000d01 FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80 FPR0=0000000000000000 0000 FPR1=0000000000000000 0000 FPR2=0000000000000000 0000 FPR3=0000000000000000 0000 FPR4=0000000000000000 0000 FPR5=0000000000000000 0000 FPR6=0000000000000000 0000 FPR7=0000000000000000 0000 Opmask00=0000000000000000 Opmask01=0000000000000000 Opmask02=0000000000000000 Opmask03=0000000000000000 Opmask04=0000000000000000 Opmask05=0000000000000000 Opmask06=0000000000000000 Opmask07=0000000000000000 ZMM00=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM01=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM02=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM03=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM04=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM05=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM06=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM07=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM08=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM09=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM10=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM11=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM12=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM13=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM14=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM15=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM16=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM17=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM18=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM19=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM20=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM21=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM22=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM23=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM24=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM25=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM26=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM27=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM28=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM29=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM30=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ZMM31=0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000