./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor3446897814 <...> Warning: Permanently added '10.128.1.222' (ED25519) to the list of known hosts. execve("./syz-executor3446897814", ["./syz-executor3446897814"], 0x7ffc4ea245c0 /* 10 vars */) = 0 brk(NULL) = 0x55557049b000 brk(0x55557049bd00) = 0x55557049bd00 arch_prctl(ARCH_SET_FS, 0x55557049b380) = 0 set_tid_address(0x55557049b650) = 5221 set_robust_list(0x55557049b660, 24) = 0 rseq(0x55557049bca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor3446897814", 4096) = 28 getrandom("\x01\x4e\x59\x3a\xce\x6d\x4f\x79", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x55557049bd00 brk(0x5555704bcd00) = 0x5555704bcd00 brk(0x5555704bd000) = 0x5555704bd000 mprotect(0x7fce5d4c1000, 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) = 0x7fce55000000 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(0x7fce55000000, 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 [ 57.003877][ T5221] loop0: detected capacity change from 0 to 32768 [ 57.081146][ T5221] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=crc64,data_checksum=xxhash,str_hash=crc32c,nojournal_transaction_names,version_upgrade=none [ 57.098846][ T5221] [ 57.101169][ T5221] ============================================ [ 57.107395][ T5221] WARNING: possible recursive locking detected [ 57.113532][ T5221] 6.12.0-rc2-syzkaller-00205-g1d227fcc7222 #0 Not tainted [ 57.120637][ T5221] -------------------------------------------- [ 57.126767][ T5221] syz-executor344/5221 is trying to acquire lock: [ 57.133167][ T5221] ffff888077e80908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_replicas_entry_validate+0x2a/0x80 [ 57.143018][ T5221] [ 57.143018][ T5221] but task is already holding lock: [ 57.150366][ T5221] ffff888077e80908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 57.160085][ T5221] [ 57.160085][ T5221] other info that might help us debug this: [ 57.168127][ T5221] Possible unsafe locking scenario: [ 57.168127][ T5221] [ 57.175575][ T5221] CPU0 [ 57.178835][ T5221] ---- [ 57.182118][ T5221] lock(&c->sb_lock); [ 57.186177][ T5221] lock(&c->sb_lock); [ 57.190233][ T5221] [ 57.190233][ T5221] *** DEADLOCK *** [ 57.190233][ T5221] [ 57.198357][ T5221] May be due to missing lock nesting notation [ 57.198357][ T5221] [ 57.206685][ T5221] 2 locks held by syz-executor344/5221: [ 57.212208][ T5221] #0: ffff888077e80278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 57.221507][ T5221] #1: ffff888077e80908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 57.231672][ T5221] [ 57.231672][ T5221] stack backtrace: [ 57.237589][ T5221] CPU: 0 UID: 0 PID: 5221 Comm: syz-executor344 Not tainted 6.12.0-rc2-syzkaller-00205-g1d227fcc7222 #0 [ 57.248682][ T5221] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 [ 57.258724][ T5221] Call Trace: [ 57.261988][ T5221] [ 57.264910][ T5221] dump_stack_lvl+0x241/0x360 [ 57.269580][ T5221] ? __pfx_dump_stack_lvl+0x10/0x10 [ 57.274759][ T5221] ? __pfx__printk+0x10/0x10 [ 57.279328][ T5221] ? lockdep_unlock+0x16a/0x300 [ 57.284166][ T5221] print_deadlock_bug+0x483/0x620 [ 57.289192][ T5221] validate_chain+0x15e2/0x5920 [ 57.294026][ T5221] ? __pfx___bfs+0x10/0x10 [ 57.298426][ T5221] ? __pfx_validate_chain+0x10/0x10 [ 57.303625][ T5221] ? mark_lock+0x9a/0x360 [ 57.307936][ T5221] ? __lock_acquire+0x1384/0x2050 [ 57.312943][ T5221] ? mark_lock+0x9a/0x360 [ 57.317272][ T5221] __lock_acquire+0x1384/0x2050 [ 57.322112][ T5221] lock_acquire+0x1ed/0x550 [ 57.326599][ T5221] ? bch2_replicas_entry_validate+0x2a/0x80 [ 57.332474][ T5221] ? __pfx_lock_acquire+0x10/0x10 [ 57.337482][ T5221] ? lockdep_hardirqs_on+0x99/0x150 [ 57.342663][ T5221] ? __pfx___might_resched+0x10/0x10 [ 57.347928][ T5221] ? _raw_spin_unlock_irqrestore+0xdd/0x140 [ 57.353813][ T5221] ? __pfx__raw_spin_unlock_irqrestore+0x10/0x10 [ 57.360133][ T5221] ? stack_trace_save+0x118/0x1d0 [ 57.365153][ T5221] __mutex_lock+0x136/0xd70 [ 57.369638][ T5221] ? bch2_replicas_entry_validate+0x2a/0x80 [ 57.375623][ T5221] ? kasan_save_track+0x51/0x80 [ 57.380476][ T5221] ? kasan_save_track+0x3f/0x80 [ 57.385320][ T5221] ? __kasan_kmalloc+0x98/0xb0 [ 57.390067][ T5221] ? __kmalloc_node_track_caller_noprof+0x225/0x440 [ 57.396643][ T5221] ? kmemdup_noprof+0x2a/0x60 [ 57.401312][ T5221] ? bch2_read_superblock_clean+0xd6/0x520 [ 57.407101][ T5221] ? bch2_replicas_entry_validate+0x2a/0x80 [ 57.412980][ T5221] ? bch2_fs_start+0x356/0x5b0 [ 57.417730][ T5221] ? __pfx___mutex_lock+0x10/0x10 [ 57.422740][ T5221] ? do_syscall_64+0xf3/0x230 [ 57.427593][ T5221] bch2_replicas_entry_validate+0x2a/0x80 [ 57.433314][ T5221] journal_entry_data_usage_validate+0x2b6/0x690 [ 57.439652][ T5221] ? __pfx_journal_entry_data_usage_validate+0x10/0x10 [ 57.446490][ T5221] ? journal_entry_usage_validate+0xc2/0x360 [ 57.452456][ T5221] ? __pfx_journal_entry_usage_validate+0x10/0x10 [ 57.458851][ T5221] ? rcu_is_watching+0x15/0xb0 [ 57.463615][ T5221] ? trace_kmalloc+0x1f/0xd0 [ 57.468270][ T5221] ? __kmalloc_node_track_caller_noprof+0x242/0x440 [ 57.474838][ T5221] ? kmemdup_noprof+0x45/0x60 [ 57.479495][ T5221] ? bch2_journal_entry_validate+0x6a/0xf0 [ 57.485282][ T5221] bch2_read_superblock_clean+0x207/0x520 [ 57.491076][ T5221] bch2_fs_recovery+0x1f4/0x39c0 [ 57.496002][ T5221] ? mark_lock+0x9a/0x360 [ 57.500316][ T5221] ? __lock_acquire+0x1384/0x2050 [ 57.505420][ T5221] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 57.510814][ T5221] ? __pfx_lock_release+0x10/0x10 [ 57.515824][ T5221] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 57.521444][ T5221] ? __pfx_lock_release+0x10/0x10 [ 57.526456][ T5221] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 57.532082][ T5221] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 57.537785][ T5221] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 57.543406][ T5221] ? llist_reverse_order+0x72/0x90 [ 57.548495][ T5221] bch2_fs_start+0x356/0x5b0 [ 57.553066][ T5221] bch2_fs_get_tree+0xd68/0x1710 [ 57.557995][ T5221] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 57.563355][ T5221] ? generic_parse_monolithic+0x387/0x400 [ 57.569057][ T5221] ? cap_capable+0x1b4/0x250 [ 57.573628][ T5221] ? safesetid_security_capable+0xb2/0x1d0 [ 57.579413][ T5221] vfs_get_tree+0x90/0x2b0 [ 57.583815][ T5221] do_new_mount+0x2be/0xb40 [ 57.588316][ T5221] ? __pfx_do_new_mount+0x10/0x10 [ 57.593325][ T5221] __se_sys_mount+0x2d6/0x3c0 [ 57.597985][ T5221] ? __pfx___se_sys_mount+0x10/0x10 [ 57.603170][ T5221] ? do_syscall_64+0x100/0x230 [ 57.607926][ T5221] ? __x64_sys_mount+0x20/0xc0 [ 57.612672][ T5221] do_syscall_64+0xf3/0x230 [ 57.617170][ T5221] ? clear_bhb_loop+0x35/0x90 [ 57.621827][ T5221] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 57.627719][ T5221] RIP: 0033:0x7fce5d44997a [ 57.632116][ T5221] 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 [ 57.651704][ T5221] RSP: 002b:00007ffeffc690e8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 57.660099][ T5221] RAX: ffffffffffffffda RBX: 00007ffeffc69100 RCX: 00007fce5d44997a [ 57.668054][ T5221] RDX: 0000000020005b00 RSI: 0000000020005b40 RDI: 00007ffeffc69100 [ 57.676009][ T5221] RBP: 0000000000000004 R08: 00007ffeffc69140 R09: 0000000000005b35 [ 57.683960][ T5221] R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000000 [ 57.691912][ T5221] R13: 00007ffeffc69140 R14: 0000000000000003 R15: 0000000001000000 [ 57.699871][ T5221]