./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor3277869855 <...> Warning: Permanently added '10.128.1.100' (ED25519) to the list of known hosts. execve("./syz-executor3277869855", ["./syz-executor3277869855"], 0x7fffe3ff7e10 /* 10 vars */) = 0 brk(NULL) = 0x555587dbe000 brk(0x555587dbed00) = 0x555587dbed00 arch_prctl(ARCH_SET_FS, 0x555587dbe380) = 0 set_tid_address(0x555587dbe650) = 5218 set_robust_list(0x555587dbe660, 24) = 0 rseq(0x555587dbeca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor3277869855", 4096) = 28 getrandom("\x41\x7a\xa4\x8a\x86\x91\xa6\xca", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x555587dbed00 brk(0x555587ddfd00) = 0x555587ddfd00 brk(0x555587de0000) = 0x555587de0000 mprotect(0x7f9cea2b3000, 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 executing program write(1, "executing program\n", 18) = 18 memfd_create("syzkaller", 0) = 3 mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9ce1c00000 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(0x7f9ce1c00000, 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 [ 58.349411][ T5218] loop0: detected capacity change from 0 to 32768 [ 58.414383][ T5218] 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 [ 58.432205][ T5218] [ 58.434530][ T5218] ============================================ [ 58.440679][ T5218] WARNING: possible recursive locking detected [ 58.446817][ T5218] 6.12.0-rc2-syzkaller-00307-g36c254515dc6 #0 Not tainted [ 58.453902][ T5218] -------------------------------------------- [ 58.460031][ T5218] syz-executor327/5218 is trying to acquire lock: [ 58.466424][ T5218] ffff888072a80908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_replicas_entry_validate+0x2a/0x80 [ 58.476280][ T5218] [ 58.476280][ T5218] but task is already holding lock: [ 58.483624][ T5218] ffff888072a80908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 58.493345][ T5218] [ 58.493345][ T5218] other info that might help us debug this: [ 58.501379][ T5218] Possible unsafe locking scenario: [ 58.501379][ T5218] [ 58.508805][ T5218] CPU0 [ 58.512062][ T5218] ---- [ 58.515322][ T5218] lock(&c->sb_lock); [ 58.519370][ T5218] lock(&c->sb_lock); [ 58.523416][ T5218] [ 58.523416][ T5218] *** DEADLOCK *** [ 58.523416][ T5218] [ 58.531539][ T5218] May be due to missing lock nesting notation [ 58.531539][ T5218] [ 58.539832][ T5218] 2 locks held by syz-executor327/5218: [ 58.545351][ T5218] #0: ffff888072a80278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 58.554640][ T5218] #1: ffff888072a80908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 58.564790][ T5218] [ 58.564790][ T5218] stack backtrace: [ 58.570673][ T5218] CPU: 0 UID: 0 PID: 5218 Comm: syz-executor327 Not tainted 6.12.0-rc2-syzkaller-00307-g36c254515dc6 #0 [ 58.581760][ T5218] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 [ 58.591808][ T5218] Call Trace: [ 58.595072][ T5218] [ 58.597983][ T5218] dump_stack_lvl+0x241/0x360 [ 58.602670][ T5218] ? __pfx_dump_stack_lvl+0x10/0x10 [ 58.607874][ T5218] ? __pfx__printk+0x10/0x10 [ 58.612451][ T5218] ? lockdep_unlock+0x16a/0x300 [ 58.617306][ T5218] print_deadlock_bug+0x483/0x620 [ 58.622316][ T5218] validate_chain+0x15e2/0x5920 [ 58.627167][ T5218] ? __pfx___bfs+0x10/0x10 [ 58.631568][ T5218] ? __pfx_validate_chain+0x10/0x10 [ 58.636771][ T5218] ? mark_lock+0x9a/0x360 [ 58.641083][ T5218] ? __lock_acquire+0x1384/0x2050 [ 58.646092][ T5218] ? mark_lock+0x9a/0x360 [ 58.650401][ T5218] __lock_acquire+0x1384/0x2050 [ 58.655238][ T5218] lock_acquire+0x1ed/0x550 [ 58.659722][ T5218] ? bch2_replicas_entry_validate+0x2a/0x80 [ 58.665598][ T5218] ? __pfx_lock_acquire+0x10/0x10 [ 58.670604][ T5218] ? lockdep_hardirqs_on+0x99/0x150 [ 58.675799][ T5218] ? __pfx___might_resched+0x10/0x10 [ 58.681063][ T5218] ? _raw_spin_unlock_irqrestore+0xdd/0x140 [ 58.686950][ T5218] ? __pfx__raw_spin_unlock_irqrestore+0x10/0x10 [ 58.693270][ T5218] ? stack_trace_save+0x118/0x1d0 [ 58.698288][ T5218] __mutex_lock+0x136/0xd70 [ 58.702780][ T5218] ? bch2_replicas_entry_validate+0x2a/0x80 [ 58.708654][ T5218] ? kasan_save_track+0x51/0x80 [ 58.713486][ T5218] ? kasan_save_track+0x3f/0x80 [ 58.718335][ T5218] ? __kasan_kmalloc+0x98/0xb0 [ 58.723093][ T5218] ? __kmalloc_node_track_caller_noprof+0x225/0x440 [ 58.729663][ T5218] ? kmemdup_noprof+0x2a/0x60 [ 58.734319][ T5218] ? bch2_read_superblock_clean+0xd6/0x520 [ 58.740128][ T5218] ? bch2_replicas_entry_validate+0x2a/0x80 [ 58.746005][ T5218] ? bch2_fs_start+0x356/0x5b0 [ 58.750755][ T5218] ? __pfx___mutex_lock+0x10/0x10 [ 58.755774][ T5218] ? do_syscall_64+0xf3/0x230 [ 58.760434][ T5218] bch2_replicas_entry_validate+0x2a/0x80 [ 58.766150][ T5218] journal_entry_data_usage_validate+0x2b6/0x690 [ 58.772458][ T5218] ? __pfx_journal_entry_data_usage_validate+0x10/0x10 [ 58.779288][ T5218] ? journal_entry_usage_validate+0xc2/0x360 [ 58.785247][ T5218] ? __pfx_journal_entry_usage_validate+0x10/0x10 [ 58.791639][ T5218] ? rcu_is_watching+0x15/0xb0 [ 58.796381][ T5218] ? trace_kmalloc+0x1f/0xd0 [ 58.800947][ T5218] ? __kmalloc_node_track_caller_noprof+0x242/0x440 [ 58.807512][ T5218] ? kmemdup_noprof+0x45/0x60 [ 58.812173][ T5218] ? bch2_journal_entry_validate+0x6a/0xf0 [ 58.817956][ T5218] bch2_read_superblock_clean+0x207/0x520 [ 58.823655][ T5218] bch2_fs_recovery+0x1f4/0x39c0 [ 58.828578][ T5218] ? mark_lock+0x9a/0x360 [ 58.832891][ T5218] ? __lock_acquire+0x1384/0x2050 [ 58.837946][ T5218] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 58.843308][ T5218] ? __pfx_lock_release+0x10/0x10 [ 58.848314][ T5218] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 58.853927][ T5218] ? __pfx_lock_release+0x10/0x10 [ 58.858939][ T5218] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 58.864576][ T5218] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 58.870290][ T5218] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 58.875908][ T5218] ? llist_reverse_order+0x72/0x90 [ 58.880998][ T5218] bch2_fs_start+0x356/0x5b0 [ 58.885573][ T5218] bch2_fs_get_tree+0xd68/0x1710 [ 58.890499][ T5218] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 58.895858][ T5218] ? generic_parse_monolithic+0x387/0x400 [ 58.901564][ T5218] ? cap_capable+0x1b4/0x250 [ 58.906131][ T5218] ? safesetid_security_capable+0xb2/0x1d0 [ 58.911921][ T5218] vfs_get_tree+0x90/0x2b0 [ 58.916339][ T5218] do_new_mount+0x2be/0xb40 [ 58.920825][ T5218] ? __pfx_do_new_mount+0x10/0x10 [ 58.925830][ T5218] __se_sys_mount+0x2d6/0x3c0 [ 58.930491][ T5218] ? __pfx___se_sys_mount+0x10/0x10 [ 58.935671][ T5218] ? do_syscall_64+0x100/0x230 [ 58.940414][ T5218] ? __x64_sys_mount+0x20/0xc0 [ 58.945174][ T5218] do_syscall_64+0xf3/0x230 [ 58.949669][ T5218] ? clear_bhb_loop+0x35/0x90 [ 58.954327][ T5218] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 58.960216][ T5218] RIP: 0033:0x7f9cea23b97a [ 58.964627][ T5218] 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 [ 58.984238][ T5218] RSP: 002b:00007fffdabd9678 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 58.992643][ T5218] RAX: ffffffffffffffda RBX: 00007fffdabd9690 RCX: 00007f9cea23b97a [ 59.000662][ T5218] RDX: 0000000020005b00 RSI: 0000000020005b40 RDI: 00007fffdabd9690 [ 59.008629][ T5218] RBP: 0000000000000004 R08: 00007fffdabd96d0 R09: 0000000000005b30 [ 59.016589][ T5218] R10: 0000000000000002 R11: 0000000000000282 R12: 0000000000000002 [ 59.024575][ T5218] R13: 00007fffdabd96d0 R14: 0000000000000003 R15: 0000000001000000 [ 59.032544][ T5218]