./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor3974224207 <...> Warning: Permanently added '10.128.1.76' (ED25519) to the list of known hosts. execve("./syz-executor3974224207", ["./syz-executor3974224207"], 0x7ffcdbeea120 /* 10 vars */) = 0 brk(NULL) = 0x55558154f000 brk(0x55558154fd00) = 0x55558154fd00 arch_prctl(ARCH_SET_FS, 0x55558154f380) = 0 set_tid_address(0x55558154f650) = 5219 set_robust_list(0x55558154f660, 24) = 0 rseq(0x55558154fca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor3974224207", 4096) = 28 getrandom("\x5c\x3e\x9a\xad\x31\x8b\xa7\x30", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x55558154fd00 brk(0x555581570d00) = 0x555581570d00 brk(0x555581571000) = 0x555581571000 mprotect(0x7f9319777000, 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) = 0x7f9311200000 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(0x7f9311200000, 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 [ 56.367481][ T5219] loop0: detected capacity change from 0 to 32768 [ 56.448782][ T5219] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=errors=continue,compression=lz4,nojournal_transaction_names [ 56.462048][ T5219] [ 56.464369][ T5219] ============================================ [ 56.470495][ T5219] WARNING: possible recursive locking detected [ 56.476633][ T5219] 6.12.0-rc2-syzkaller-00205-g1d227fcc7222 #0 Not tainted [ 56.483724][ T5219] -------------------------------------------- [ 56.489849][ T5219] syz-executor397/5219 is trying to acquire lock: [ 56.496248][ T5219] ffff888078500908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_replicas_entry_validate+0x2a/0x80 [ 56.506088][ T5219] [ 56.506088][ T5219] but task is already holding lock: [ 56.513437][ T5219] ffff888078500908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 56.523158][ T5219] [ 56.523158][ T5219] other info that might help us debug this: [ 56.531196][ T5219] Possible unsafe locking scenario: [ 56.531196][ T5219] [ 56.538624][ T5219] CPU0 [ 56.541880][ T5219] ---- [ 56.545137][ T5219] lock(&c->sb_lock); [ 56.549203][ T5219] lock(&c->sb_lock); [ 56.553257][ T5219] [ 56.553257][ T5219] *** DEADLOCK *** [ 56.553257][ T5219] [ 56.561383][ T5219] May be due to missing lock nesting notation [ 56.561383][ T5219] [ 56.569692][ T5219] 2 locks held by syz-executor397/5219: [ 56.575233][ T5219] #0: ffff888078500278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 56.584543][ T5219] #1: ffff888078500908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 56.594713][ T5219] [ 56.594713][ T5219] stack backtrace: [ 56.600597][ T5219] CPU: 1 UID: 0 PID: 5219 Comm: syz-executor397 Not tainted 6.12.0-rc2-syzkaller-00205-g1d227fcc7222 #0 [ 56.611693][ T5219] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 [ 56.621740][ T5219] Call Trace: [ 56.625013][ T5219] [ 56.627933][ T5219] dump_stack_lvl+0x241/0x360 [ 56.632610][ T5219] ? __pfx_dump_stack_lvl+0x10/0x10 [ 56.637797][ T5219] ? __pfx__printk+0x10/0x10 [ 56.642374][ T5219] ? lockdep_unlock+0x16a/0x300 [ 56.647219][ T5219] print_deadlock_bug+0x483/0x620 [ 56.652235][ T5219] validate_chain+0x15e2/0x5920 [ 56.657080][ T5219] ? __pfx_validate_chain+0x10/0x10 [ 56.662270][ T5219] ? mark_lock+0x9a/0x360 [ 56.666590][ T5219] ? __lock_acquire+0x1384/0x2050 [ 56.671609][ T5219] ? mark_lock+0x9a/0x360 [ 56.675925][ T5219] __lock_acquire+0x1384/0x2050 [ 56.680771][ T5219] lock_acquire+0x1ed/0x550 [ 56.685264][ T5219] ? bch2_replicas_entry_validate+0x2a/0x80 [ 56.691145][ T5219] ? __pfx_lock_acquire+0x10/0x10 [ 56.696161][ T5219] ? lockdep_hardirqs_on+0x99/0x150 [ 56.701354][ T5219] ? __pfx___might_resched+0x10/0x10 [ 56.706629][ T5219] ? _raw_spin_unlock_irqrestore+0xdd/0x140 [ 56.712515][ T5219] ? __pfx__raw_spin_unlock_irqrestore+0x10/0x10 [ 56.718837][ T5219] ? stack_trace_save+0x118/0x1d0 [ 56.723853][ T5219] __mutex_lock+0x136/0xd70 [ 56.728340][ T5219] ? bch2_replicas_entry_validate+0x2a/0x80 [ 56.734223][ T5219] ? kasan_save_track+0x51/0x80 [ 56.739060][ T5219] ? kasan_save_track+0x3f/0x80 [ 56.743898][ T5219] ? __kasan_kmalloc+0x98/0xb0 [ 56.748675][ T5219] ? __kmalloc_node_track_caller_noprof+0x225/0x440 [ 56.755269][ T5219] ? kmemdup_noprof+0x2a/0x60 [ 56.759945][ T5219] ? bch2_read_superblock_clean+0xd6/0x520 [ 56.765744][ T5219] ? bch2_replicas_entry_validate+0x2a/0x80 [ 56.771626][ T5219] ? bch2_fs_start+0x356/0x5b0 [ 56.776387][ T5219] ? __pfx___mutex_lock+0x10/0x10 [ 56.781404][ T5219] ? do_syscall_64+0xf3/0x230 [ 56.786076][ T5219] bch2_replicas_entry_validate+0x2a/0x80 [ 56.791786][ T5219] journal_entry_data_usage_validate+0x2b6/0x690 [ 56.798104][ T5219] ? __pfx_journal_entry_data_usage_validate+0x10/0x10 [ 56.804944][ T5219] ? journal_entry_usage_validate+0xc2/0x360 [ 56.810915][ T5219] ? __pfx_journal_entry_usage_validate+0x10/0x10 [ 56.817318][ T5219] ? rcu_is_watching+0x15/0xb0 [ 56.822072][ T5219] ? trace_kmalloc+0x1f/0xd0 [ 56.826649][ T5219] ? __kmalloc_node_track_caller_noprof+0x242/0x440 [ 56.833226][ T5219] ? kmemdup_noprof+0x45/0x60 [ 56.837895][ T5219] ? bch2_journal_entry_validate+0x6a/0xf0 [ 56.843690][ T5219] bch2_read_superblock_clean+0x207/0x520 [ 56.849402][ T5219] bch2_fs_recovery+0x1f4/0x39c0 [ 56.854330][ T5219] ? mark_lock+0x9a/0x360 [ 56.858650][ T5219] ? __lock_acquire+0x1384/0x2050 [ 56.863669][ T5219] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 56.869059][ T5219] ? __pfx_lock_release+0x10/0x10 [ 56.874074][ T5219] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 56.879699][ T5219] ? __pfx_lock_release+0x10/0x10 [ 56.884733][ T5219] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 56.890359][ T5219] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 56.896071][ T5219] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 56.901696][ T5219] ? llist_reverse_order+0x72/0x90 [ 56.906796][ T5219] bch2_fs_start+0x356/0x5b0 [ 56.911381][ T5219] bch2_fs_get_tree+0xd68/0x1710 [ 56.916325][ T5219] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 56.921692][ T5219] ? smack_fs_context_parse_param+0xff/0x170 [ 56.927672][ T5219] ? generic_parse_monolithic+0x387/0x400 [ 56.933387][ T5219] ? cap_capable+0x1b4/0x250 [ 56.937968][ T5219] ? safesetid_security_capable+0xb2/0x1d0 [ 56.943765][ T5219] vfs_get_tree+0x90/0x2b0 [ 56.948172][ T5219] do_new_mount+0x2be/0xb40 [ 56.952670][ T5219] ? __pfx_do_new_mount+0x10/0x10 [ 56.957687][ T5219] __se_sys_mount+0x2d6/0x3c0 [ 56.962358][ T5219] ? __pfx___se_sys_mount+0x10/0x10 [ 56.967549][ T5219] ? do_syscall_64+0x100/0x230 [ 56.972303][ T5219] ? __x64_sys_mount+0x20/0xc0 [ 56.977058][ T5219] do_syscall_64+0xf3/0x230 [ 56.981550][ T5219] ? clear_bhb_loop+0x35/0x90 [ 56.986213][ T5219] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 56.992112][ T5219] RIP: 0033:0x7f93196ff9ba [ 56.996520][ 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 [ 57.016122][ T5219] RSP: 002b:00007ffc08bb9b48 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 57.024528][ T5219] RAX: ffffffffffffffda RBX: 00007ffc08bb9b60 RCX: 00007f93196ff9ba [ 57.032662][ T5219] RDX: 0000000020005d80 RSI: 0000000020005dc0 RDI: 00007ffc08bb9b60 [ 57.040627][ T5219] RBP: 0000000000000004 R08: 00007ffc08bb9ba0 R09: 0000000000005d76 [ 57.048588][ T5219] R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000000 [ 57.056554][ T5219] R13: 00007ffc08bb9ba0 R14: 0000000000000003 R15: 0000000001000000 [ 57.064519][ T5219]