./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor1090053374 <...> Warning: Permanently added '10.128.0.131' (ED25519) to the list of known hosts. execve("./syz-executor1090053374", ["./syz-executor1090053374"], 0x7ffddfa9d870 /* 10 vars */) = 0 brk(NULL) = 0x5555793a0000 brk(0x5555793a0d00) = 0x5555793a0d00 arch_prctl(ARCH_SET_FS, 0x5555793a0380) = 0 set_tid_address(0x5555793a0650) = 5219 set_robust_list(0x5555793a0660, 24) = 0 rseq(0x5555793a0ca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor1090053374", 4096) = 28 getrandom("\x40\x2c\x06\x10\x3b\xc4\xae\x09", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x5555793a0d00 brk(0x5555793c1d00) = 0x5555793c1d00 brk(0x5555793c2000) = 0x5555793c2000 mprotect(0x7f8eeb86d000, 16384, PROT_READ) = 0 mmap(0x1ffff000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x1ffff000 mmap(0x20000000, 16777216, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x20000000 mmap(0x21000000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x21000000 write(1, "executing program\n", 18executing program ) = 18 memfd_create("syzkaller", 0) = 3 mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8ee3200000 write(3, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"..., 16777216) = 16777216 munmap(0x7f8ee3200000, 138412032) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 close(4) = 0 mkdir("./file2", 0777) = 0 [ 56.289889][ T5219] loop0: detected capacity change from 0 to 32768 [ 56.364097][ T5219] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,nojournal_transaction_names,reconstruct_alloc,version_upgrade=none [ 56.381715][ T5219] [ 56.384039][ T5219] ============================================ [ 56.390166][ T5219] WARNING: possible recursive locking detected [ 56.396300][ T5219] 6.12.0-rc2-syzkaller-00100-geb952c47d154 #0 Not tainted [ 56.403385][ T5219] -------------------------------------------- [ 56.409513][ T5219] syz-executor109/5219 is trying to acquire lock: [ 56.415912][ T5219] ffff888078300908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_replicas_entry_validate+0x2a/0x80 [ 56.425832][ T5219] [ 56.425832][ T5219] but task is already holding lock: [ 56.433191][ T5219] ffff888078300908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 56.442910][ T5219] [ 56.442910][ T5219] other info that might help us debug this: [ 56.450969][ T5219] Possible unsafe locking scenario: [ 56.450969][ T5219] [ 56.458411][ T5219] CPU0 [ 56.461669][ T5219] ---- [ 56.464936][ T5219] lock(&c->sb_lock); [ 56.468989][ T5219] lock(&c->sb_lock); [ 56.473043][ T5219] [ 56.473043][ T5219] *** DEADLOCK *** [ 56.473043][ T5219] [ 56.481182][ T5219] May be due to missing lock nesting notation [ 56.481182][ T5219] [ 56.489480][ T5219] 2 locks held by syz-executor109/5219: [ 56.495003][ T5219] #0: ffff888078300278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 56.504293][ T5219] #1: ffff888078300908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 56.514447][ T5219] [ 56.514447][ T5219] stack backtrace: [ 56.520323][ T5219] CPU: 1 UID: 0 PID: 5219 Comm: syz-executor109 Not tainted 6.12.0-rc2-syzkaller-00100-geb952c47d154 #0 [ 56.531417][ T5219] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 [ 56.541549][ T5219] Call Trace: [ 56.544821][ T5219] [ 56.547736][ T5219] dump_stack_lvl+0x241/0x360 [ 56.552409][ T5219] ? __pfx_dump_stack_lvl+0x10/0x10 [ 56.557591][ T5219] ? __pfx__printk+0x10/0x10 [ 56.562191][ T5219] ? lockdep_unlock+0x16a/0x300 [ 56.567119][ T5219] print_deadlock_bug+0x483/0x620 [ 56.572126][ T5219] validate_chain+0x15e2/0x5920 [ 56.576959][ T5219] ? __pfx___bfs+0x10/0x10 [ 56.581356][ T5219] ? __pfx_validate_chain+0x10/0x10 [ 56.586538][ T5219] ? mark_lock+0x9a/0x360 [ 56.590846][ T5219] ? __lock_acquire+0x1384/0x2050 [ 56.595889][ T5219] ? mark_lock+0x9a/0x360 [ 56.600219][ T5219] __lock_acquire+0x1384/0x2050 [ 56.605076][ T5219] lock_acquire+0x1ed/0x550 [ 56.609571][ T5219] ? bch2_replicas_entry_validate+0x2a/0x80 [ 56.615453][ T5219] ? __pfx_lock_acquire+0x10/0x10 [ 56.620485][ T5219] ? lockdep_hardirqs_on+0x99/0x150 [ 56.625681][ T5219] ? __pfx___might_resched+0x10/0x10 [ 56.630962][ T5219] ? _raw_spin_unlock_irqrestore+0xdd/0x140 [ 56.636846][ T5219] ? __pfx__raw_spin_unlock_irqrestore+0x10/0x10 [ 56.643168][ T5219] ? stack_trace_save+0x118/0x1d0 [ 56.648181][ T5219] __mutex_lock+0x136/0xd70 [ 56.652667][ T5219] ? bch2_replicas_entry_validate+0x2a/0x80 [ 56.658558][ T5219] ? kasan_save_track+0x51/0x80 [ 56.663521][ T5219] ? kasan_save_track+0x3f/0x80 [ 56.668385][ T5219] ? __kasan_kmalloc+0x98/0xb0 [ 56.673160][ T5219] ? __kmalloc_node_track_caller_noprof+0x225/0x440 [ 56.679732][ T5219] ? kmemdup_noprof+0x2a/0x60 [ 56.684398][ T5219] ? bch2_read_superblock_clean+0xd6/0x520 [ 56.690187][ T5219] ? bch2_replicas_entry_validate+0x2a/0x80 [ 56.696062][ T5219] ? bch2_fs_start+0x356/0x5b0 [ 56.700808][ T5219] ? __pfx___mutex_lock+0x10/0x10 [ 56.705814][ T5219] ? do_syscall_64+0xf3/0x230 [ 56.710483][ T5219] bch2_replicas_entry_validate+0x2a/0x80 [ 56.716187][ T5219] journal_entry_data_usage_validate+0x2b6/0x690 [ 56.722499][ T5219] ? __pfx_journal_entry_data_usage_validate+0x10/0x10 [ 56.729333][ T5219] ? journal_entry_usage_validate+0xc2/0x360 [ 56.735317][ T5219] ? __pfx_journal_entry_usage_validate+0x10/0x10 [ 56.741712][ T5219] ? rcu_is_watching+0x15/0xb0 [ 56.746460][ T5219] ? trace_kmalloc+0x1f/0xd0 [ 56.751032][ T5219] ? __kmalloc_node_track_caller_noprof+0x242/0x440 [ 56.757605][ T5219] ? kmemdup_noprof+0x45/0x60 [ 56.762265][ T5219] ? bch2_journal_entry_validate+0x6a/0xf0 [ 56.768054][ T5219] bch2_read_superblock_clean+0x207/0x520 [ 56.773759][ T5219] bch2_fs_recovery+0x1f4/0x39c0 [ 56.778682][ T5219] ? mark_lock+0x9a/0x360 [ 56.782992][ T5219] ? __lock_acquire+0x1384/0x2050 [ 56.788022][ T5219] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 56.793422][ T5219] ? __pfx_lock_release+0x10/0x10 [ 56.798444][ T5219] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 56.804076][ T5219] ? __pfx_lock_release+0x10/0x10 [ 56.809092][ T5219] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 56.814730][ T5219] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 56.820435][ T5219] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 56.826081][ T5219] ? llist_reverse_order+0x72/0x90 [ 56.831196][ T5219] bch2_fs_start+0x356/0x5b0 [ 56.835773][ T5219] bch2_fs_get_tree+0xd68/0x1710 [ 56.840700][ T5219] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 56.846064][ T5219] ? generic_parse_monolithic+0x387/0x400 [ 56.851773][ T5219] ? cap_capable+0x1b4/0x250 [ 56.856346][ T5219] ? safesetid_security_capable+0xb2/0x1d0 [ 56.862135][ T5219] vfs_get_tree+0x90/0x2b0 [ 56.866541][ T5219] do_new_mount+0x2be/0xb40 [ 56.871029][ T5219] ? __pfx_do_new_mount+0x10/0x10 [ 56.876044][ T5219] __se_sys_mount+0x2d6/0x3c0 [ 56.880729][ T5219] ? __pfx___se_sys_mount+0x10/0x10 [ 56.885913][ T5219] ? do_syscall_64+0x100/0x230 [ 56.890662][ T5219] ? __x64_sys_mount+0x20/0xc0 [ 56.895414][ T5219] do_syscall_64+0xf3/0x230 [ 56.899898][ T5219] ? clear_bhb_loop+0x35/0x90 [ 56.904553][ T5219] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 56.910459][ T5219] RIP: 0033:0x7f8eeb7f5a7a [ 56.914862][ T5219] Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 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 b8 ff ff ff f7 d8 64 89 01 48 [ 56.934471][ T5219] RSP: 002b:00007ffc125256b8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 56.942893][ T5219] RAX: ffffffffffffffda RBX: 00007ffc125256d0 RCX: 00007f8eeb7f5a7a [ 56.950856][ T5219] RDX: 0000000020005b00 RSI: 0000000020005b40 RDI: 00007ffc125256d0 [ 56.958836][ T5219] RBP: 0000000000000004 R08: 00007ffc12525710 R09: 0000000000005b34 [ 56.966794][ T5219] R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000000 [ 56.974770][ T5219] R13: 00007ffc12525710 R14: 0000000000000003 R15: 0000000001000000 [ 56.982745][ T5219]