Warning: Permanently added '[localhost]:13180' (ED25519) to the list of known hosts. executing program [ 64.132623][ T5103] loop0: detected capacity change from 0 to 32768 [ 64.211344][ T5103] 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 [ 64.218439][ T5103] bcachefs (loop0): recovering from clean shutdown, journal seq 10 [ 64.222319][ T5103] bcachefs (loop0): Version upgrade required: [ 64.222319][ T5103] Version upgrade from 0.24: unwritten_extents to 1.7: mi_btree_bitmap incomplete [ 64.222319][ T5103] Doing incompatible version upgrade from 0.24: unwritten_extents to 1.13: inode_has_child_snapshots [ 64.222319][ T5103] 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 [ 64.249453][ T5103] bcachefs (loop0): dropping and reconstructing all alloc info [ 64.261469][ T5103] bcachefs (loop0): check_topology... done [ 64.263655][ T5103] bcachefs (loop0): accounting_read... done [ 64.266527][ T5103] bcachefs (loop0): alloc_read... done [ 64.268671][ T5103] bcachefs (loop0): stripes_read... done [ 64.271376][ T5103] bcachefs (loop0): snapshots_read... done [ 64.273749][ T5103] bcachefs (loop0): check_allocations... done [ 64.289957][ T5103] bcachefs (loop0): going read-write [ 64.295777][ T5103] bcachefs (loop0): done starting filesystem [ 64.317435][ T24] audit: type=1800 audit(1729369100.777:2): pid=5103 uid=0 auid=4294967295 ses=4294967295 subj=unconfined op=collect_data cause=failed(directio) comm="syz-executor733" name="file1" dev="loop0" ino=536870912 res=0 errno=0 [ 64.342014][ T24] audit: type=1800 audit(1729369100.787:3): pid=5103 uid=0 auid=4294967295 ses=4294967295 subj=unconfined op=collect_data cause=failed(directio) comm="syz-executor733" name="file1" dev="loop0" ino=536870912 res=0 errno=0 [ 64.554197][ T5115] [ 64.555204][ T5115] ====================================================== [ 64.557845][ T5115] WARNING: possible circular locking dependency detected [ 64.560702][ T5115] 6.12.0-rc3-syzkaller-00389-g3d5ad2d4eca3 #0 Not tainted [ 64.564250][ T5115] ------------------------------------------------------ [ 64.566538][ T5115] syz-executor733/5115 is trying to acquire lock: [ 64.568960][ T5115] ffff888038550128 (bcachefs_btree){+.+.}-{0:0}, at: __bch2_trans_relock+0x382/0x5f0 [ 64.572656][ T5115] [ 64.572656][ T5115] but task is already holding lock: [ 64.575583][ T5115] ffff8880424e1548 (&c->fsck_error_msgs_lock){+.+.}-{3:3}, at: __bch2_fsck_err+0x3dc/0x15f0 [ 64.580570][ T5115] [ 64.580570][ T5115] which lock already depends on the new lock. [ 64.580570][ T5115] [ 64.584283][ T5115] [ 64.584283][ T5115] the existing dependency chain (in reverse order) is: [ 64.587540][ T5115] [ 64.587540][ T5115] -> #1 (&c->fsck_error_msgs_lock){+.+.}-{3:3}: [ 64.590787][ T5115] lock_acquire+0x1ed/0x550 [ 64.592732][ T5115] __mutex_lock+0x136/0xd70 [ 64.594627][ T5115] __bch2_fsck_err+0x3dc/0x15f0 [ 64.596771][ T5115] bch2_check_alloc_hole_freespace+0x816/0x1180 [ 64.599303][ T5115] bch2_check_alloc_info+0x20f8/0x5330 [ 64.601598][ T5115] bch2_run_recovery_pass+0xf0/0x1e0 [ 64.603973][ T5115] bch2_run_online_recovery_passes+0x85/0x150 [ 64.606473][ T5115] bch2_fsck_online_thread_fn+0x1da/0x410 [ 64.608882][ T5115] thread_with_stdio_fn+0x5f/0x130 [ 64.610979][ T5115] kthread+0x2f0/0x390 [ 64.612784][ T5115] ret_from_fork+0x4b/0x80 [ 64.614592][ T5115] ret_from_fork_asm+0x1a/0x30 [ 64.616630][ T5115] [ 64.616630][ T5115] -> #0 (bcachefs_btree){+.+.}-{0:0}: [ 64.619571][ T5115] validate_chain+0x18ef/0x5920 [ 64.621635][ T5115] __lock_acquire+0x1384/0x2050 [ 64.623540][ T5115] lock_acquire+0x1ed/0x550 [ 64.625395][ T5115] __bch2_trans_relock+0x397/0x5f0 [ 64.627486][ T5115] __bch2_fsck_err+0x131d/0x15f0 [ 64.629511][ T5115] bch2_check_alloc_hole_freespace+0x816/0x1180 [ 64.631982][ T5115] bch2_check_alloc_info+0x20f8/0x5330 [ 64.634326][ T5115] bch2_run_recovery_pass+0xf0/0x1e0 [ 64.636557][ T5115] bch2_run_online_recovery_passes+0x85/0x150 [ 64.639122][ T5115] bch2_fsck_online_thread_fn+0x1da/0x410 [ 64.641652][ T5115] thread_with_stdio_fn+0x5f/0x130 [ 64.643841][ T5115] kthread+0x2f0/0x390 [ 64.645685][ T5115] ret_from_fork+0x4b/0x80 [ 64.647493][ T5115] ret_from_fork_asm+0x1a/0x30 [ 64.649480][ T5115] [ 64.649480][ T5115] other info that might help us debug this: [ 64.649480][ T5115] [ 64.653005][ T5115] Possible unsafe locking scenario: [ 64.653005][ T5115] [ 64.655608][ T5115] CPU0 CPU1 [ 64.657680][ T5115] ---- ---- [ 64.659643][ T5115] lock(&c->fsck_error_msgs_lock); [ 64.661549][ T5115] lock(bcachefs_btree); [ 64.664153][ T5115] lock(&c->fsck_error_msgs_lock); [ 64.667097][ T5115] lock(bcachefs_btree); [ 64.668909][ T5115] [ 64.668909][ T5115] *** DEADLOCK *** [ 64.668909][ T5115] [ 64.671973][ T5115] 3 locks held by syz-executor733/5115: [ 64.674081][ T5115] #0: ffff888042480278 (&c->state_lock){++++}-{3:3}, at: bch2_run_online_recovery_passes+0x32/0x150 [ 64.678114][ T5115] #1: ffff888042484398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7de/0xd20 [ 64.681973][ T5115] #2: ffff8880424e1548 (&c->fsck_error_msgs_lock){+.+.}-{3:3}, at: __bch2_fsck_err+0x3dc/0x15f0 [ 64.686003][ T5115] [ 64.686003][ T5115] stack backtrace: [ 64.688193][ T5115] CPU: 0 UID: 0 PID: 5115 Comm: syz-executor733 Not tainted 6.12.0-rc3-syzkaller-00389-g3d5ad2d4eca3 #0 [ 64.692192][ T5115] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 64.695938][ T5115] Call Trace: [ 64.697238][ T5115] [ 64.698380][ T5115] dump_stack_lvl+0x241/0x360 [ 64.700222][ T5115] ? __pfx_dump_stack_lvl+0x10/0x10 [ 64.702145][ T5115] ? __pfx__printk+0x10/0x10 [ 64.703942][ T5115] print_circular_bug+0x13a/0x1b0 [ 64.705784][ T5115] check_noncircular+0x36a/0x4a0 [ 64.707743][ T5115] ? __pfx_validate_chain+0x10/0x10 [ 64.709930][ T5115] ? __pfx_check_noncircular+0x10/0x10 [ 64.712184][ T5115] ? lockdep_lock+0x123/0x2b0 [ 64.714080][ T5115] ? __pfx_lockdep_hardirqs_on_prepare+0x10/0x10 [ 64.716566][ T5115] validate_chain+0x18ef/0x5920 [ 64.718491][ T5115] ? __lock_acquire+0x1384/0x2050 [ 64.720414][ T5115] ? __pfx_validate_chain+0x10/0x10 [ 64.722172][ T5115] ? mark_lock+0x9a/0x360 [ 64.723785][ T5115] ? __pfx_lock_acquire+0x10/0x10 [ 64.725881][ T5115] __lock_acquire+0x1384/0x2050 [ 64.727794][ T5115] lock_acquire+0x1ed/0x550 [ 64.729370][ T5115] ? __bch2_trans_relock+0x382/0x5f0 [ 64.731282][ T5115] ? __pfx_lock_acquire+0x10/0x10 [ 64.733111][ T5115] ? __pfx_bch2_stdio_redirect_readline_timeout+0x10/0x10 [ 64.735704][ T5115] ? btree_path_get_locks+0x491/0x5c0 [ 64.737674][ T5115] __bch2_trans_relock+0x397/0x5f0 [ 64.739659][ T5115] ? __bch2_trans_relock+0x382/0x5f0 [ 64.741685][ T5115] ? __pfx___bch2_trans_relock+0x10/0x10 [ 64.743674][ T5115] __bch2_fsck_err+0x131d/0x15f0 [ 64.745540][ T5115] ? __pfx___bch2_fsck_err+0x10/0x10 [ 64.747631][ T5115] ? bch2_get_key_or_hole+0x97b/0xfe0 [ 64.749517][ T5115] ? bch2_check_alloc_hole_freespace+0x601/0x1180 [ 64.751587][ T5115] bch2_check_alloc_hole_freespace+0x816/0x1180 [ 64.753636][ T5115] ? __pfx_bch2_check_alloc_hole_freespace+0x10/0x10 [ 64.755836][ T5115] ? bch2_dev_tryget_noerror+0x20/0x340 [ 64.757760][ T5115] ? bch2_check_alloc_info+0x1f36/0x5330 [ 64.759601][ T5115] bch2_check_alloc_info+0x20f8/0x5330 [ 64.761570][ T5115] ? bch2_check_alloc_info+0x26e/0x5330 [ 64.763616][ T5115] ? __pfx_bch2_check_alloc_info+0x10/0x10 [ 64.765660][ T5115] ? stack_trace_save+0x118/0x1d0 [ 64.767546][ T5115] ? __pfx_stack_trace_save+0x10/0x10 [ 64.769520][ T5115] ? lockdep_unlock+0x16a/0x300 [ 64.771215][ T5115] ? mark_lock+0x2ae/0x360 [ 64.772978][ T5115] ? __lock_acquire+0x1384/0x2050 [ 64.774867][ T5115] ? bch2_check_alloc_info+0x26e/0x5330 [ 64.777000][ T5115] ? mark_lock+0x9a/0x360 [ 64.778317][ T5115] ? bch2_check_alloc_info+0x26e/0x5330 [ 64.780068][ T5115] ? bch2_check_alloc_info+0x26e/0x5330 [ 64.781807][ T5115] ? __pfx__raw_spin_unlock_irqrestore+0x10/0x10 [ 64.783921][ T5115] ? bch2_check_alloc_info+0x26e/0x5330 [ 64.785847][ T5115] ? __wake_up_common_lock+0x18c/0x1e0 [ 64.788056][ T5115] ? bch2_stdio_redirect_vprintf+0x4ea/0x570 [ 64.790098][ T5115] ? __pfx_bch2_stdio_redirect_vprintf+0x10/0x10 [ 64.792138][ T5115] ? __bch2_print+0x1fc/0x220 [ 64.793709][ T5115] ? lockdep_hardirqs_on_prepare+0x43d/0x780 [ 64.795757][ T5115] ? bch2_run_recovery_pass+0x6d/0x1e0 [ 64.797681][ T5115] ? __pfx___bch2_print+0x10/0x10 [ 64.799348][ T5115] ? lockdep_hardirqs_on+0x99/0x150 [ 64.801069][ T5115] bch2_run_recovery_pass+0xf0/0x1e0 [ 64.803022][ T5115] bch2_run_online_recovery_passes+0x85/0x150 [ 64.805145][ T5115] bch2_fsck_online_thread_fn+0x1da/0x410 [ 64.807587][ T5115] thread_with_stdio_fn+0x5f/0x130 [ 64.809971][ T5115] ? __pfx_thread_with_stdio_fn+0x10/0x10 [ 64.812511][ T5115] kthread+0x2f0/0x390 [ 64.814422][ T5115] ? __pfx_thread_with_stdio_fn+0x10/0x10 [ 64.816836][ T5115] ? __pfx_kthread+0x10/0x10 [ 64.818838][ T5115] ret_from_fork+0x4b/0x80 [ 64.820796][ T5115] ? __pfx_kthread+0x10/0x10 [ 64.822581][ T5115] ret_from_fork_asm+0x1a/0x30 [ 64.824363][ T5115] [ 64.850655][ T5103] syz-executor733 (5103) used greatest stack depth: 18072 bytes left [ 64.862579][ T5115] syz-executor733 (5115) used greatest stack depth: 11824 bytes left VM DIAGNOSIS: 20:18:21 Registers: info registers vcpu 0 CPU#0 RAX=000000000000006c RBX=ffffffff9a715e60 RCX=0000000000000000 RDX=00000000000003f8 RSI=0000000000000000 RDI=0000000000000020 RBP=0000000000000000 RSP=ffffc9000b0e6110 R8 =ffffffff854a6d7b R9 =1ffff1100674f046 R10=dffffc0000000000 R11=ffffffff854a6d30 R12=dffffc0000000000 R13=ffffffff9a410f08 R14=000000000000006c 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=00007f157d6b3348 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