./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor3320273596 <...> Warning: Permanently added '10.128.1.217' (ED25519) to the list of known hosts. execve("./syz-executor3320273596", ["./syz-executor3320273596"], 0x7ffe61d83860 /* 10 vars */) = 0 brk(NULL) = 0x55557afa2000 brk(0x55557afa2d00) = 0x55557afa2d00 arch_prctl(ARCH_SET_FS, 0x55557afa2380) = 0 set_tid_address(0x55557afa2650) = 5227 set_robust_list(0x55557afa2660, 24) = 0 rseq(0x55557afa2ca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor3320273596", 4096) = 28 getrandom("\xb5\x29\x3d\x87\x2d\x76\xed\xac", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x55557afa2d00 brk(0x55557afc3d00) = 0x55557afc3d00 brk(0x55557afc4000) = 0x55557afc4000 mprotect(0x7f54a8d65000, 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) = 0x7f54a0800000 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(0x7f54a0800000, 138412032) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 close(4) = 0 mkdir("./file0", 0777) = 0 [ 53.334842][ T5227] loop0: detected capacity change from 0 to 32768 [ 53.418637][ T5227] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=errors=continue,compression=lz4,norecovery,recovery_pass_last=journal_replay,nojournal_transaction_names,nocow [ 53.436413][ T5227] [ 53.438746][ T5227] ============================================ [ 53.444887][ T5227] WARNING: possible recursive locking detected [ 53.451027][ T5227] 6.12.0-rc1-next-20241003-syzkaller #0 Not tainted [ 53.457595][ T5227] -------------------------------------------- [ 53.463739][ T5227] syz-executor332/5227 is trying to acquire lock: [ 53.470135][ T5227] ffff888072d80908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_replicas_entry_validate+0x2a/0x80 [ 53.479979][ T5227] [ 53.479979][ T5227] but task is already holding lock: [ 53.487324][ T5227] ffff888072d80908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 53.497056][ T5227] [ 53.497056][ T5227] other info that might help us debug this: [ 53.505098][ T5227] Possible unsafe locking scenario: [ 53.505098][ T5227] [ 53.512532][ T5227] CPU0 [ 53.515795][ T5227] ---- [ 53.519058][ T5227] lock(&c->sb_lock); [ 53.523116][ T5227] lock(&c->sb_lock); [ 53.527174][ T5227] [ 53.527174][ T5227] *** DEADLOCK *** [ 53.527174][ T5227] [ 53.535298][ T5227] May be due to missing lock nesting notation [ 53.535298][ T5227] [ 53.543596][ T5227] 2 locks held by syz-executor332/5227: [ 53.549127][ T5227] #0: ffff888072d80278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 53.558433][ T5227] #1: ffff888072d80908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 53.568598][ T5227] [ 53.568598][ T5227] stack backtrace: [ 53.574475][ T5227] CPU: 0 UID: 0 PID: 5227 Comm: syz-executor332 Not tainted 6.12.0-rc1-next-20241003-syzkaller #0 [ 53.585159][ T5227] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 [ 53.595210][ T5227] Call Trace: [ 53.598477][ T5227] [ 53.601396][ T5227] dump_stack_lvl+0x241/0x360 [ 53.606077][ T5227] ? __pfx_dump_stack_lvl+0x10/0x10 [ 53.611268][ T5227] ? __pfx__printk+0x10/0x10 [ 53.615848][ T5227] ? lockdep_unlock+0x16a/0x300 [ 53.620708][ T5227] print_deadlock_bug+0x483/0x620 [ 53.625733][ T5227] validate_chain+0x15e2/0x5920 [ 53.630586][ T5227] ? __pfx_validate_chain+0x10/0x10 [ 53.635774][ T5227] ? mark_lock+0x9a/0x360 [ 53.640093][ T5227] ? __lock_acquire+0x1384/0x2050 [ 53.645109][ T5227] ? mark_lock+0x9a/0x360 [ 53.649428][ T5227] ? mark_lock+0x9a/0x360 [ 53.653746][ T5227] ? __pfx_lockdep_hardirqs_on_prepare+0x10/0x10 [ 53.660071][ T5227] __lock_acquire+0x1384/0x2050 [ 53.664915][ T5227] lock_acquire+0x1ed/0x550 [ 53.669436][ T5227] ? bch2_replicas_entry_validate+0x2a/0x80 [ 53.675318][ T5227] ? __pfx_lock_acquire+0x10/0x10 [ 53.680333][ T5227] ? __pfx_kfence_guarded_alloc+0x10/0x10 [ 53.686040][ T5227] ? __pfx___might_resched+0x10/0x10 [ 53.691313][ T5227] ? native_apic_msr_write+0x39/0x50 [ 53.696596][ T5227] __mutex_lock+0x136/0xd70 [ 53.701089][ T5227] ? bch2_replicas_entry_validate+0x2a/0x80 [ 53.706966][ T5227] ? __kfence_alloc+0x274/0x370 [ 53.711804][ T5227] ? __kmalloc_node_track_caller_noprof+0x3ff/0x4c0 [ 53.718380][ T5227] ? bch2_read_superblock_clean+0xd6/0x520 [ 53.724170][ T5227] ? bch2_fs_recovery+0x1f4/0x39c0 [ 53.729268][ T5227] ? bch2_fs_get_tree+0xd68/0x1710 [ 53.734368][ T5227] ? vfs_get_tree+0x90/0x2b0 [ 53.738942][ T5227] ? do_new_mount+0x2be/0xb40 [ 53.743608][ T5227] ? __se_sys_mount+0x2d6/0x3c0 [ 53.748445][ T5227] ? do_syscall_64+0xf3/0x230 [ 53.753107][ T5227] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 53.759163][ T5227] ? bch2_replicas_entry_validate+0x2a/0x80 [ 53.765054][ T5227] ? __pfx___mutex_lock+0x10/0x10 [ 53.770090][ T5227] bch2_replicas_entry_validate+0x2a/0x80 [ 53.775802][ T5227] journal_entry_data_usage_validate+0x2b6/0x690 [ 53.782120][ T5227] ? __pfx_journal_entry_data_usage_validate+0x10/0x10 [ 53.788958][ T5227] ? journal_entry_usage_validate+0xc2/0x360 [ 53.794935][ T5227] ? __pfx_journal_entry_usage_validate+0x10/0x10 [ 53.801346][ T5227] ? rcu_is_watching+0x15/0xb0 [ 53.806106][ T5227] ? trace_kmalloc+0x1f/0xd0 [ 53.810687][ T5227] ? __kmalloc_node_track_caller_noprof+0x2a8/0x4c0 [ 53.817265][ T5227] ? kmemdup_noprof+0x45/0x60 [ 53.821930][ T5227] ? bch2_journal_entry_validate+0x6a/0xf0 [ 53.827730][ T5227] bch2_read_superblock_clean+0x207/0x520 [ 53.833439][ T5227] bch2_fs_recovery+0x1f4/0x39c0 [ 53.838368][ T5227] ? mark_lock+0x9a/0x360 [ 53.842683][ T5227] ? __lock_acquire+0x1384/0x2050 [ 53.847695][ T5227] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 53.853062][ T5227] ? __pfx_lock_release+0x10/0x10 [ 53.858072][ T5227] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 53.863689][ T5227] ? __pfx_lock_release+0x10/0x10 [ 53.868704][ T5227] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 53.874323][ T5227] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 53.880028][ T5227] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 53.885649][ T5227] ? llist_reverse_order+0x72/0x90 [ 53.890759][ T5227] bch2_fs_start+0x356/0x5b0 [ 53.895427][ T5227] bch2_fs_get_tree+0xd68/0x1710 [ 53.900364][ T5227] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 53.905730][ T5227] ? generic_parse_monolithic+0x387/0x400 [ 53.911440][ T5227] ? apparmor_capable+0x13b/0x1b0 [ 53.916452][ T5227] vfs_get_tree+0x90/0x2b0 [ 53.920856][ T5227] do_new_mount+0x2be/0xb40 [ 53.925347][ T5227] ? __pfx_do_new_mount+0x10/0x10 [ 53.930361][ T5227] __se_sys_mount+0x2d6/0x3c0 [ 53.935025][ T5227] ? __pfx___se_sys_mount+0x10/0x10 [ 53.940208][ T5227] ? do_syscall_64+0x100/0x230 [ 53.944962][ T5227] ? __x64_sys_mount+0x20/0xc0 [ 53.949712][ T5227] do_syscall_64+0xf3/0x230 [ 53.954204][ T5227] ? clear_bhb_loop+0x35/0x90 [ 53.958878][ T5227] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 53.964769][ T5227] RIP: 0033:0x7f54a8ced8fa [ 53.969258][ T5227] 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 [ 53.988848][ T5227] RSP: 002b:00007ffcc730b258 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 53.997247][ T5227] RAX: ffffffffffffffda RBX: 00007ffcc730b270 RCX: 00007f54a8ced8fa [ 54.005203][ T5227] RDX: 0000000020005d80 RSI: 0000000020000000 RDI: 00007ffcc730b270 [ 54.013160][ T5227] RBP: 0000000000000004 R08: 00007ffcc730b2b0 R09: 0000000000005daf [ 54.021116][ T5227] R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000000 [ 54.029070][ T5227] R13: 00007ffcc730b2b0 R14: 0000000000000003 R15: 0000000001000000 [ 54.037120][ T5227]