./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor811581275 <...> Warning: Permanently added '10.128.1.225' (ED25519) to the list of known hosts. execve("./syz-executor811581275", ["./syz-executor811581275"], 0x7ffc5ca50760 /* 10 vars */) = 0 brk(NULL) = 0x555565a76000 brk(0x555565a76d00) = 0x555565a76d00 arch_prctl(ARCH_SET_FS, 0x555565a76380) = 0 set_tid_address(0x555565a76650) = 5219 set_robust_list(0x555565a76660, 24) = 0 rseq(0x555565a76ca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor811581275", 4096) = 27 getrandom("\xd2\x15\x78\xcc\x4c\x97\xdf\x03", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x555565a76d00 brk(0x555565a97d00) = 0x555565a97d00 brk(0x555565a98000) = 0x555565a98000 mprotect(0x7f3ab91bc000, 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) = 0x7f3ab0c00000 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(0x7f3ab0c00000, 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 [ 66.834497][ T5219] loop0: detected capacity change from 0 to 32768 [ 66.921856][ T5219] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=ro,metadata_checksum=none,data_checksum=xxhash,str_hash=crc64,nojournal_transaction_names,read_only,version_upgrade=none [ 66.940661][ T5219] [ 66.943002][ T5219] ============================================ [ 66.949143][ T5219] WARNING: possible recursive locking detected [ 66.955293][ T5219] 6.12.0-rc2-syzkaller-00205-g1d227fcc7222 #0 Not tainted [ 66.962384][ T5219] -------------------------------------------- [ 66.968535][ T5219] syz-executor811/5219 is trying to acquire lock: [ 66.974968][ T5219] ffff888072700908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_replicas_entry_validate+0x2a/0x80 [ 66.984825][ T5219] [ 66.984825][ T5219] but task is already holding lock: [ 66.992177][ T5219] ffff888072700908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 67.002020][ T5219] [ 67.002020][ T5219] other info that might help us debug this: [ 67.010067][ T5219] Possible unsafe locking scenario: [ 67.010067][ T5219] [ 67.017520][ T5219] CPU0 [ 67.020798][ T5219] ---- [ 67.024083][ T5219] lock(&c->sb_lock); [ 67.028146][ T5219] lock(&c->sb_lock); [ 67.032214][ T5219] [ 67.032214][ T5219] *** DEADLOCK *** [ 67.032214][ T5219] [ 67.040349][ T5219] May be due to missing lock nesting notation [ 67.040349][ T5219] [ 67.048661][ T5219] 2 locks held by syz-executor811/5219: [ 67.054198][ T5219] #0: ffff888072700278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 67.063520][ T5219] #1: ffff888072700908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 67.073729][ T5219] [ 67.073729][ T5219] stack backtrace: [ 67.079614][ T5219] CPU: 0 UID: 0 PID: 5219 Comm: syz-executor811 Not tainted 6.12.0-rc2-syzkaller-00205-g1d227fcc7222 #0 [ 67.090717][ T5219] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 [ 67.101036][ T5219] Call Trace: [ 67.104311][ T5219] [ 67.107236][ T5219] dump_stack_lvl+0x241/0x360 [ 67.111944][ T5219] ? __pfx_dump_stack_lvl+0x10/0x10 [ 67.117168][ T5219] ? __pfx__printk+0x10/0x10 [ 67.121846][ T5219] ? lockdep_unlock+0x16a/0x300 [ 67.126725][ T5219] print_deadlock_bug+0x483/0x620 [ 67.131753][ T5219] validate_chain+0x15e2/0x5920 [ 67.136603][ T5219] ? __pfx___bfs+0x10/0x10 [ 67.141016][ T5219] ? __pfx_validate_chain+0x10/0x10 [ 67.146220][ T5219] ? mark_lock+0x9a/0x360 [ 67.150550][ T5219] ? __lock_acquire+0x1384/0x2050 [ 67.155581][ T5219] ? mark_lock+0x9a/0x360 [ 67.159905][ T5219] __lock_acquire+0x1384/0x2050 [ 67.164773][ T5219] lock_acquire+0x1ed/0x550 [ 67.169285][ T5219] ? bch2_replicas_entry_validate+0x2a/0x80 [ 67.175189][ T5219] ? __pfx_lock_acquire+0x10/0x10 [ 67.180219][ T5219] ? lockdep_hardirqs_on+0x99/0x150 [ 67.185427][ T5219] ? __pfx___might_resched+0x10/0x10 [ 67.190711][ T5219] ? _raw_spin_unlock_irqrestore+0xdd/0x140 [ 67.196608][ T5219] ? __pfx__raw_spin_unlock_irqrestore+0x10/0x10 [ 67.202957][ T5219] ? stack_trace_save+0x118/0x1d0 [ 67.207983][ T5219] __mutex_lock+0x136/0xd70 [ 67.212481][ T5219] ? bch2_replicas_entry_validate+0x2a/0x80 [ 67.218389][ T5219] ? kasan_save_track+0x51/0x80 [ 67.223238][ T5219] ? kasan_save_track+0x3f/0x80 [ 67.228099][ T5219] ? __kasan_kmalloc+0x98/0xb0 [ 67.232864][ T5219] ? __kmalloc_node_track_caller_noprof+0x225/0x440 [ 67.239452][ T5219] ? kmemdup_noprof+0x2a/0x60 [ 67.244129][ T5219] ? bch2_read_superblock_clean+0xd6/0x520 [ 67.249955][ T5219] ? bch2_replicas_entry_validate+0x2a/0x80 [ 67.255850][ T5219] ? bch2_fs_start+0x356/0x5b0 [ 67.260635][ T5219] ? __pfx___mutex_lock+0x10/0x10 [ 67.265653][ T5219] ? do_syscall_64+0xf3/0x230 [ 67.270333][ T5219] bch2_replicas_entry_validate+0x2a/0x80 [ 67.276051][ T5219] journal_entry_data_usage_validate+0x2b6/0x690 [ 67.282381][ T5219] ? __pfx_journal_entry_data_usage_validate+0x10/0x10 [ 67.289235][ T5219] ? journal_entry_usage_validate+0xc2/0x360 [ 67.295220][ T5219] ? __pfx_journal_entry_usage_validate+0x10/0x10 [ 67.301658][ T5219] ? rcu_is_watching+0x15/0xb0 [ 67.306424][ T5219] ? trace_kmalloc+0x1f/0xd0 [ 67.311040][ T5219] ? __kmalloc_node_track_caller_noprof+0x242/0x440 [ 67.317621][ T5219] ? kmemdup_noprof+0x45/0x60 [ 67.322382][ T5219] ? bch2_journal_entry_validate+0x6a/0xf0 [ 67.328187][ T5219] bch2_read_superblock_clean+0x207/0x520 [ 67.333917][ T5219] bch2_fs_recovery+0x1f4/0x39c0 [ 67.338874][ T5219] ? mark_lock+0x9a/0x360 [ 67.343235][ T5219] ? __lock_acquire+0x1384/0x2050 [ 67.348288][ T5219] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 67.353667][ T5219] ? __pfx_lock_release+0x10/0x10 [ 67.358691][ T5219] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 67.364327][ T5219] ? __pfx_lock_release+0x10/0x10 [ 67.369353][ T5219] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 67.374988][ T5219] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 67.380705][ T5219] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 67.386343][ T5219] ? llist_reverse_order+0x72/0x90 [ 67.391454][ T5219] bch2_fs_start+0x356/0x5b0 [ 67.396071][ T5219] bch2_fs_get_tree+0xd68/0x1710 [ 67.401036][ T5219] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 67.406443][ T5219] ? generic_parse_monolithic+0x387/0x400 [ 67.412202][ T5219] ? cap_capable+0x1b4/0x250 [ 67.416818][ T5219] ? safesetid_security_capable+0xb2/0x1d0 [ 67.422626][ T5219] vfs_get_tree+0x90/0x2b0 [ 67.427060][ T5219] do_new_mount+0x2be/0xb40 [ 67.431564][ T5219] ? __pfx_do_new_mount+0x10/0x10 [ 67.436616][ T5219] __se_sys_mount+0x2d6/0x3c0 [ 67.441297][ T5219] ? __pfx___se_sys_mount+0x10/0x10 [ 67.446498][ T5219] ? do_syscall_64+0x100/0x230 [ 67.451259][ T5219] ? __x64_sys_mount+0x20/0xc0 [ 67.456023][ T5219] do_syscall_64+0xf3/0x230 [ 67.460526][ T5219] ? clear_bhb_loop+0x35/0x90 [ 67.465224][ T5219] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 67.471144][ T5219] RIP: 0033:0x7f3ab914497a [ 67.475560][ 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 [ 67.495169][ T5219] RSP: 002b:00007ffc598179b8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 67.503595][ T5219] RAX: ffffffffffffffda RBX: 00007ffc598179c0 RCX: 00007f3ab914497a [ 67.511582][ T5219] RDX: 0000000020005b00 RSI: 0000000020005b40 RDI: 00007ffc598179c0 [ 67.519550][ T5219] RBP: 0000000000000004 R08: 00007ffc59817a00 R09: 0000000000005b43 [ 67.527535][ T5219] R10: 000000000000050b R11: 0000000000000282 R12: 00007ffc59817a00 [ 67.535504][ T5219] R13: 0000000000000003 R14: 0000000001000000 R15: 0000000000000001 [ 67.543509][ T5219]