./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor615059912 <...> Warning: Permanently added '10.128.0.187' (ED25519) to the list of known hosts. execve("./syz-executor615059912", ["./syz-executor615059912"], 0x7fffc131b2e0 /* 10 vars */) = 0 brk(NULL) = 0x555568d31000 brk(0x555568d31d00) = 0x555568d31d00 arch_prctl(ARCH_SET_FS, 0x555568d31380) = 0 set_tid_address(0x555568d31650) = 5218 set_robust_list(0x555568d31660, 24) = 0 rseq(0x555568d31ca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor615059912", 4096) = 27 getrandom("\x25\x7c\xac\x36\xd4\x10\x40\x61", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x555568d31d00 brk(0x555568d52d00) = 0x555568d52d00 brk(0x555568d53000) = 0x555568d53000 mprotect(0x7f17ae3c5000, 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) = 0x7f17a5e00000 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(0x7f17a5e00000, 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 [ 59.974787][ T5218] loop0: detected capacity change from 0 to 32768 [ 60.069411][ T5218] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=errors=continue,compression=zstd,no_splitbrain_check [ 60.081928][ T5218] [ 60.084261][ T5218] ============================================ [ 60.090395][ T5218] WARNING: possible recursive locking detected [ 60.096532][ T5218] 6.12.0-rc2-syzkaller-00260-g9e4c6c1ad9a1 #0 Not tainted [ 60.103622][ T5218] -------------------------------------------- [ 60.109751][ T5218] syz-executor615/5218 is trying to acquire lock: [ 60.116142][ T5218] ffff888075080908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_replicas_entry_validate+0x2a/0x80 [ 60.126035][ T5218] [ 60.126035][ T5218] but task is already holding lock: [ 60.133389][ T5218] ffff888075080908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 60.143122][ T5218] [ 60.143122][ T5218] other info that might help us debug this: [ 60.151163][ T5218] Possible unsafe locking scenario: [ 60.151163][ T5218] [ 60.158593][ T5218] CPU0 [ 60.161854][ T5218] ---- [ 60.165115][ T5218] lock(&c->sb_lock); [ 60.169170][ T5218] lock(&c->sb_lock); [ 60.173223][ T5218] [ 60.173223][ T5218] *** DEADLOCK *** [ 60.173223][ T5218] [ 60.181350][ T5218] May be due to missing lock nesting notation [ 60.181350][ T5218] [ 60.189669][ T5218] 2 locks held by syz-executor615/5218: [ 60.195206][ T5218] #0: ffff888075080278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 60.204517][ T5218] #1: ffff888075080908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 60.214683][ T5218] [ 60.214683][ T5218] stack backtrace: [ 60.220564][ T5218] CPU: 0 UID: 0 PID: 5218 Comm: syz-executor615 Not tainted 6.12.0-rc2-syzkaller-00260-g9e4c6c1ad9a1 #0 [ 60.231660][ T5218] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 [ 60.241706][ T5218] Call Trace: [ 60.244983][ T5218] [ 60.247901][ T5218] dump_stack_lvl+0x241/0x360 [ 60.252618][ T5218] ? __pfx_dump_stack_lvl+0x10/0x10 [ 60.257800][ T5218] ? __pfx__printk+0x10/0x10 [ 60.262376][ T5218] ? lockdep_unlock+0x16a/0x300 [ 60.267250][ T5218] print_deadlock_bug+0x483/0x620 [ 60.272264][ T5218] validate_chain+0x15e2/0x5920 [ 60.277106][ T5218] ? __pfx_validate_chain+0x10/0x10 [ 60.282290][ T5218] ? mark_lock+0x9a/0x360 [ 60.286606][ T5218] ? __lock_acquire+0x1384/0x2050 [ 60.291626][ T5218] ? mark_lock+0x9a/0x360 [ 60.295946][ T5218] ? mark_lock+0x9a/0x360 [ 60.300259][ T5218] ? __pfx_lockdep_hardirqs_on_prepare+0x10/0x10 [ 60.306575][ T5218] __lock_acquire+0x1384/0x2050 [ 60.311429][ T5218] lock_acquire+0x1ed/0x550 [ 60.315933][ T5218] ? bch2_replicas_entry_validate+0x2a/0x80 [ 60.321813][ T5218] ? __pfx_lock_acquire+0x10/0x10 [ 60.326829][ T5218] ? __pfx_kfence_guarded_alloc+0x10/0x10 [ 60.332565][ T5218] ? __pfx___might_resched+0x10/0x10 [ 60.337858][ T5218] ? native_apic_msr_write+0x39/0x50 [ 60.343147][ T5218] __mutex_lock+0x136/0xd70 [ 60.347656][ T5218] ? bch2_replicas_entry_validate+0x2a/0x80 [ 60.353534][ T5218] ? __kfence_alloc+0x274/0x370 [ 60.358376][ T5218] ? __kmalloc_node_track_caller_noprof+0x395/0x440 [ 60.364960][ T5218] ? bch2_read_superblock_clean+0xd6/0x520 [ 60.370751][ T5218] ? bch2_fs_recovery+0x1f4/0x39c0 [ 60.375855][ T5218] ? bch2_fs_get_tree+0xd68/0x1710 [ 60.380969][ T5218] ? vfs_get_tree+0x90/0x2b0 [ 60.385556][ T5218] ? do_new_mount+0x2be/0xb40 [ 60.390237][ T5218] ? __se_sys_mount+0x2d6/0x3c0 [ 60.395087][ T5218] ? do_syscall_64+0xf3/0x230 [ 60.399769][ T5218] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 60.405857][ T5218] ? bch2_replicas_entry_validate+0x2a/0x80 [ 60.411738][ T5218] ? __pfx___mutex_lock+0x10/0x10 [ 60.416752][ T5218] bch2_replicas_entry_validate+0x2a/0x80 [ 60.422465][ T5218] journal_entry_data_usage_validate+0x2b6/0x690 [ 60.428790][ T5218] ? __pfx_journal_entry_data_usage_validate+0x10/0x10 [ 60.435629][ T5218] ? journal_entry_usage_validate+0xc2/0x360 [ 60.441598][ T5218] ? __pfx_journal_entry_usage_validate+0x10/0x10 [ 60.448086][ T5218] ? rcu_is_watching+0x15/0xb0 [ 60.452872][ T5218] ? trace_kmalloc+0x1f/0xd0 [ 60.457476][ T5218] ? __kmalloc_node_track_caller_noprof+0x242/0x440 [ 60.464048][ T5218] ? kmemdup_noprof+0x45/0x60 [ 60.468733][ T5218] ? bch2_journal_entry_validate+0x6a/0xf0 [ 60.474619][ T5218] bch2_read_superblock_clean+0x207/0x520 [ 60.480327][ T5218] bch2_fs_recovery+0x1f4/0x39c0 [ 60.485255][ T5218] ? mark_lock+0x9a/0x360 [ 60.489577][ T5218] ? __lock_acquire+0x1384/0x2050 [ 60.494613][ T5218] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 60.499981][ T5218] ? __pfx_lock_release+0x10/0x10 [ 60.505318][ T5218] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 60.511113][ T5218] ? __pfx_lock_release+0x10/0x10 [ 60.516137][ T5218] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 60.521761][ T5218] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 60.527470][ T5218] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 60.533092][ T5218] ? llist_reverse_order+0x72/0x90 [ 60.538208][ T5218] bch2_fs_start+0x356/0x5b0 [ 60.542798][ T5218] bch2_fs_get_tree+0xd68/0x1710 [ 60.547736][ T5218] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 60.553094][ T5218] ? smack_fs_context_parse_param+0xff/0x170 [ 60.559126][ T5218] ? generic_parse_monolithic+0x387/0x400 [ 60.564843][ T5218] ? cap_capable+0x1b4/0x250 [ 60.569460][ T5218] ? safesetid_security_capable+0xb2/0x1d0 [ 60.575260][ T5218] vfs_get_tree+0x90/0x2b0 [ 60.579672][ T5218] do_new_mount+0x2be/0xb40 [ 60.584166][ T5218] ? __pfx_do_new_mount+0x10/0x10 [ 60.589192][ T5218] __se_sys_mount+0x2d6/0x3c0 [ 60.593871][ T5218] ? __pfx___se_sys_mount+0x10/0x10 [ 60.599061][ T5218] ? do_syscall_64+0x100/0x230 [ 60.603814][ T5218] ? __x64_sys_mount+0x20/0xc0 [ 60.608568][ T5218] do_syscall_64+0xf3/0x230 [ 60.613058][ T5218] ? clear_bhb_loop+0x35/0x90 [ 60.617755][ T5218] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 60.623648][ T5218] RIP: 0033:0x7f17ae34dd3a [ 60.628058][ 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 [ 60.647657][ T5218] RSP: 002b:00007fffaf1bbe98 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 60.656090][ T5218] RAX: ffffffffffffffda RBX: 00007fffaf1bbeb0 RCX: 00007f17ae34dd3a [ 60.664048][ T5218] RDX: 0000000020005d80 RSI: 0000000020005dc0 RDI: 00007fffaf1bbeb0 [ 60.672007][ T5218] RBP: 0000000000000004 R08: 00007fffaf1bbef0 R09: 0000000000005d7b [ 60.679962][ T5218] R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000000 [ 60.687919][ T5218] R13: 00007fffaf1bbef0 R14: 0000000000000003 R15: 0000000001000000 [ 60.695883][ T5218]