./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor1435787516 <...> Warning: Permanently added '10.128.1.229' (ED25519) to the list of known hosts. execve("./syz-executor1435787516", ["./syz-executor1435787516"], 0x7ffff354fee0 /* 10 vars */) = 0 brk(NULL) = 0x55555e487000 brk(0x55555e487d00) = 0x55555e487d00 arch_prctl(ARCH_SET_FS, 0x55555e487380) = 0 set_tid_address(0x55555e487650) = 5217 set_robust_list(0x55555e487660, 24) = 0 rseq(0x55555e487ca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor1435787516", 4096) = 28 getrandom("\xe0\x87\xfe\x0c\xf1\xf8\x50\xf2", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x55555e487d00 brk(0x55555e4a8d00) = 0x55555e4a8d00 brk(0x55555e4a9000) = 0x55555e4a9000 mprotect(0x7f0925131000, 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) = 0x7f091cc00000 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(0x7f091cc00000, 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 [ 68.486317][ T5217] loop0: detected capacity change from 0 to 32768 [ 68.590479][ T5217] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=errors=continue,metadata_checksum=none,data_checksum=none,compression=lz4,metadata_target=invalid device 255,noshard_inode_numbers,noinodes_use_key_cache,journal_flush_delay=1001,nojournal_transaction_names [ 68.616550][ T5217] [ 68.618896][ T5217] ============================================ [ 68.625034][ T5217] WARNING: possible recursive locking detected [ 68.631179][ T5217] 6.12.0-rc2-syzkaller-00100-geb952c47d154 #0 Not tainted [ 68.638277][ T5217] -------------------------------------------- [ 68.644448][ T5217] syz-executor143/5217 is trying to acquire lock: [ 68.650864][ T5217] ffff888074480908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_replicas_entry_validate+0x2a/0x80 [ 68.660738][ T5217] [ 68.660738][ T5217] but task is already holding lock: [ 68.668101][ T5217] ffff888074480908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 68.678324][ T5217] [ 68.678324][ T5217] other info that might help us debug this: [ 68.686393][ T5217] Possible unsafe locking scenario: [ 68.686393][ T5217] [ 68.693832][ T5217] CPU0 [ 68.697128][ T5217] ---- [ 68.700402][ T5217] lock(&c->sb_lock); [ 68.704468][ T5217] lock(&c->sb_lock); [ 68.708567][ T5217] [ 68.708567][ T5217] *** DEADLOCK *** [ 68.708567][ T5217] [ 68.716729][ T5217] May be due to missing lock nesting notation [ 68.716729][ T5217] [ 68.725049][ T5217] 2 locks held by syz-executor143/5217: [ 68.730613][ T5217] #0: ffff888074480278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 68.739941][ T5217] #1: ffff888074480908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 68.750141][ T5217] [ 68.750141][ T5217] stack backtrace: [ 68.756042][ T5217] CPU: 1 UID: 0 PID: 5217 Comm: syz-executor143 Not tainted 6.12.0-rc2-syzkaller-00100-geb952c47d154 #0 [ 68.767205][ T5217] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 [ 68.777648][ T5217] Call Trace: [ 68.780932][ T5217] [ 68.783866][ T5217] dump_stack_lvl+0x241/0x360 [ 68.788559][ T5217] ? __pfx_dump_stack_lvl+0x10/0x10 [ 68.793762][ T5217] ? __pfx__printk+0x10/0x10 [ 68.798356][ T5217] ? lockdep_unlock+0x16a/0x300 [ 68.803222][ T5217] print_deadlock_bug+0x483/0x620 [ 68.808258][ T5217] validate_chain+0x15e2/0x5920 [ 68.813123][ T5217] ? __pfx_validate_chain+0x10/0x10 [ 68.818329][ T5217] ? mark_lock+0x9a/0x360 [ 68.822684][ T5217] ? __lock_acquire+0x1384/0x2050 [ 68.827730][ T5217] ? mark_lock+0x9a/0x360 [ 68.832067][ T5217] ? mark_lock+0x9a/0x360 [ 68.836398][ T5217] ? __pfx_lockdep_hardirqs_on_prepare+0x10/0x10 [ 68.842752][ T5217] __lock_acquire+0x1384/0x2050 [ 68.847623][ T5217] lock_acquire+0x1ed/0x550 [ 68.852141][ T5217] ? bch2_replicas_entry_validate+0x2a/0x80 [ 68.858040][ T5217] ? __pfx_lock_acquire+0x10/0x10 [ 68.863075][ T5217] ? __pfx_kfence_guarded_alloc+0x10/0x10 [ 68.868819][ T5217] ? __pfx___might_resched+0x10/0x10 [ 68.874134][ T5217] __mutex_lock+0x136/0xd70 [ 68.878654][ T5217] ? bch2_replicas_entry_validate+0x2a/0x80 [ 68.884548][ T5217] ? __kfence_alloc+0x274/0x370 [ 68.889412][ T5217] ? __kmalloc_node_track_caller_noprof+0x395/0x440 [ 68.896009][ T5217] ? bch2_read_superblock_clean+0xd6/0x520 [ 68.901825][ T5217] ? bch2_fs_recovery+0x1f4/0x39c0 [ 68.906944][ T5217] ? bch2_fs_get_tree+0xd68/0x1710 [ 68.912067][ T5217] ? vfs_get_tree+0x90/0x2b0 [ 68.916668][ T5217] ? do_new_mount+0x2be/0xb40 [ 68.921353][ T5217] ? __se_sys_mount+0x2d6/0x3c0 [ 68.926210][ T5217] ? do_syscall_64+0xf3/0x230 [ 68.930883][ T5217] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 68.936951][ T5217] ? bch2_replicas_entry_validate+0x2a/0x80 [ 68.942847][ T5217] ? __pfx___mutex_lock+0x10/0x10 [ 68.947892][ T5217] bch2_replicas_entry_validate+0x2a/0x80 [ 68.953612][ T5217] journal_entry_data_usage_validate+0x2b6/0x690 [ 68.959943][ T5217] ? __pfx_journal_entry_data_usage_validate+0x10/0x10 [ 68.966792][ T5217] ? journal_entry_usage_validate+0xc2/0x360 [ 68.972774][ T5217] ? __pfx_journal_entry_usage_validate+0x10/0x10 [ 68.979185][ T5217] ? rcu_is_watching+0x15/0xb0 [ 68.983948][ T5217] ? trace_kmalloc+0x1f/0xd0 [ 68.988531][ T5217] ? __kmalloc_node_track_caller_noprof+0x242/0x440 [ 68.995124][ T5217] ? kmemdup_noprof+0x45/0x60 [ 68.999805][ T5217] ? bch2_journal_entry_validate+0x6a/0xf0 [ 69.005608][ T5217] bch2_read_superblock_clean+0x207/0x520 [ 69.011325][ T5217] bch2_fs_recovery+0x1f4/0x39c0 [ 69.016258][ T5217] ? mark_lock+0x9a/0x360 [ 69.020585][ T5217] ? __lock_acquire+0x1384/0x2050 [ 69.025615][ T5217] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 69.030997][ T5217] ? __pfx_lock_release+0x10/0x10 [ 69.036024][ T5217] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 69.041658][ T5217] ? __pfx_lock_release+0x10/0x10 [ 69.046687][ T5217] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 69.052324][ T5217] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 69.058049][ T5217] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 69.063691][ T5217] ? llist_reverse_order+0x72/0x90 [ 69.068799][ T5217] bch2_fs_start+0x356/0x5b0 [ 69.073391][ T5217] bch2_fs_get_tree+0xd68/0x1710 [ 69.078340][ T5217] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 69.083706][ T5217] ? smack_fs_context_parse_param+0xff/0x170 [ 69.089694][ T5217] ? generic_parse_monolithic+0x387/0x400 [ 69.095434][ T5217] ? cap_capable+0x1b4/0x250 [ 69.100067][ T5217] ? safesetid_security_capable+0xb2/0x1d0 [ 69.105885][ T5217] vfs_get_tree+0x90/0x2b0 [ 69.110313][ T5217] do_new_mount+0x2be/0xb40 [ 69.114834][ T5217] ? __pfx_do_new_mount+0x10/0x10 [ 69.119883][ T5217] __se_sys_mount+0x2d6/0x3c0 [ 69.124571][ T5217] ? __pfx___se_sys_mount+0x10/0x10 [ 69.129779][ T5217] ? do_syscall_64+0x100/0x230 [ 69.134545][ T5217] ? __x64_sys_mount+0x20/0xc0 [ 69.139318][ T5217] do_syscall_64+0xf3/0x230 [ 69.143817][ T5217] ? clear_bhb_loop+0x35/0x90 [ 69.148491][ T5217] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 69.154431][ T5217] RIP: 0033:0x7f09250b9bca [ 69.158883][ T5217] 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 [ 69.178505][ T5217] RSP: 002b:00007fff8a253538 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 69.186926][ T5217] RAX: ffffffffffffffda RBX: 00007fff8a253550 RCX: 00007f09250b9bca [ 69.194898][ T5217] RDX: 0000000020000180 RSI: 0000000020000140 RDI: 00007fff8a253550 [ 69.202868][ T5217] RBP: 0000000000000004 R08: 00007fff8a253590 R09: 00000000000058f1 [ 69.210839][ T5217] R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000000 [ 69.218828][ T5217] R13: 00007fff8a253590 R14: 0000000000000003 R15: 0000000001000000 [ 69.226805][ T5217]