./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor2821796527

<...>
Warning: Permanently added '10.128.0.133' (ED25519) to the list of known hosts.
execve("./syz-executor2821796527", ["./syz-executor2821796527"], 0x7ffca421e500 /* 10 vars */) = 0
brk(NULL)                               = 0x555560ca2000
brk(0x555560ca2d00)                     = 0x555560ca2d00
arch_prctl(ARCH_SET_FS, 0x555560ca2380) = 0
set_tid_address(0x555560ca2650)         = 5241
set_robust_list(0x555560ca2660, 24)     = 0
rseq(0x555560ca2ca0, 0x20, 0, 0x53053053) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlink("/proc/self/exe", "/root/syz-executor2821796527", 4096) = 28
getrandom("\xe7\x99\x1b\x07\xdf\xd1\x93\xdc", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x555560ca2d00
brk(0x555560cc3d00)                     = 0x555560cc3d00
brk(0x555560cc4000)                     = 0x555560cc4000
mprotect(0x7f9513988000, 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) = 0x7f950b400000
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(0x7f950b400000, 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
[  196.420180][ T5241] loop0: detected capacity change from 0 to 32768
[  196.499994][ T5241] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=errors=continue,compression=lz4,nojournal_transaction_names
[  196.513360][ T5241] 
[  196.515693][ T5241] ============================================
[  196.521819][ T5241] WARNING: possible recursive locking detected
[  196.527966][ T5241] 6.12.0-rc2-syzkaller-00100-geb952c47d154 #0 Not tainted
[  196.535065][ T5241] --------------------------------------------
[  196.541192][ T5241] syz-executor282/5241 is trying to acquire lock:
[  196.547630][ T5241] ffff888077980908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_replicas_entry_validate+0x2a/0x80
[  196.557988][ T5241] 
[  196.557988][ T5241] but task is already holding lock:
[  196.565333][ T5241] ffff888077980908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520
[  196.575157][ T5241] 
[  196.575157][ T5241] other info that might help us debug this:
[  196.583202][ T5241]  Possible unsafe locking scenario:
[  196.583202][ T5241] 
[  196.590667][ T5241]        CPU0
[  196.593936][ T5241]        ----
[  196.597202][ T5241]   lock(&c->sb_lock);
[  196.601271][ T5241]   lock(&c->sb_lock);
[  196.605331][ T5241] 
[  196.605331][ T5241]  *** DEADLOCK ***
[  196.605331][ T5241] 
[  196.613459][ T5241]  May be due to missing lock nesting notation
[  196.613459][ T5241] 
[  196.621775][ T5241] 2 locks held by syz-executor282/5241:
[  196.627318][ T5241]  #0: ffff888077980278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0
[  196.636652][ T5241]  #1: ffff888077980908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520
[  196.646853][ T5241] 
[  196.646853][ T5241] stack backtrace:
[  196.652921][ T5241] CPU: 1 UID: 0 PID: 5241 Comm: syz-executor282 Not tainted 6.12.0-rc2-syzkaller-00100-geb952c47d154 #0
[  196.664025][ T5241] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
[  196.674164][ T5241] Call Trace:
[  196.677436][ T5241]  <TASK>
[  196.680361][ T5241]  dump_stack_lvl+0x241/0x360
[  196.685043][ T5241]  ? __pfx_dump_stack_lvl+0x10/0x10
[  196.690234][ T5241]  ? __pfx__printk+0x10/0x10
[  196.694827][ T5241]  ? lockdep_unlock+0x16a/0x300
[  196.699679][ T5241]  print_deadlock_bug+0x483/0x620
[  196.704702][ T5241]  validate_chain+0x15e2/0x5920
[  196.709554][ T5241]  ? __pfx___bfs+0x10/0x10
[  196.713962][ T5241]  ? __pfx_validate_chain+0x10/0x10
[  196.719159][ T5241]  ? mark_lock+0x9a/0x360
[  196.723480][ T5241]  ? __lock_acquire+0x1384/0x2050
[  196.728520][ T5241]  ? mark_lock+0x9a/0x360
[  196.732851][ T5241]  __lock_acquire+0x1384/0x2050
[  196.737711][ T5241]  lock_acquire+0x1ed/0x550
[  196.742306][ T5241]  ? bch2_replicas_entry_validate+0x2a/0x80
[  196.748203][ T5241]  ? __pfx_lock_acquire+0x10/0x10
[  196.753227][ T5241]  ? lockdep_hardirqs_on+0x99/0x150
[  196.758444][ T5241]  ? __pfx___might_resched+0x10/0x10
[  196.763722][ T5241]  ? _raw_spin_unlock_irqrestore+0xdd/0x140
[  196.769611][ T5241]  ? __pfx__raw_spin_unlock_irqrestore+0x10/0x10
[  196.775937][ T5241]  ? stack_trace_save+0x118/0x1d0
[  196.780956][ T5241]  __mutex_lock+0x136/0xd70
[  196.785454][ T5241]  ? bch2_replicas_entry_validate+0x2a/0x80
[  196.791351][ T5241]  ? kasan_save_track+0x51/0x80
[  196.796216][ T5241]  ? kasan_save_track+0x3f/0x80
[  196.801060][ T5241]  ? __kasan_kmalloc+0x98/0xb0
[  196.805824][ T5241]  ? __kmalloc_node_track_caller_noprof+0x225/0x440
[  196.812399][ T5241]  ? kmemdup_noprof+0x2a/0x60
[  196.817067][ T5241]  ? bch2_read_superblock_clean+0xd6/0x520
[  196.822863][ T5241]  ? bch2_replicas_entry_validate+0x2a/0x80
[  196.828748][ T5241]  ? bch2_fs_start+0x356/0x5b0
[  196.833507][ T5241]  ? __pfx___mutex_lock+0x10/0x10
[  196.838519][ T5241]  ? do_syscall_64+0xf3/0x230
[  196.843192][ T5241]  bch2_replicas_entry_validate+0x2a/0x80
[  196.848902][ T5241]  journal_entry_data_usage_validate+0x2b6/0x690
[  196.855228][ T5241]  ? __pfx_journal_entry_data_usage_validate+0x10/0x10
[  196.862074][ T5241]  ? journal_entry_usage_validate+0xc2/0x360
[  196.868045][ T5241]  ? __pfx_journal_entry_usage_validate+0x10/0x10
[  196.874457][ T5241]  ? rcu_is_watching+0x15/0xb0
[  196.879212][ T5241]  ? trace_kmalloc+0x1f/0xd0
[  196.883791][ T5241]  ? __kmalloc_node_track_caller_noprof+0x242/0x440
[  196.890371][ T5241]  ? kmemdup_noprof+0x45/0x60
[  196.895046][ T5241]  ? bch2_journal_entry_validate+0x6a/0xf0
[  196.900845][ T5241]  bch2_read_superblock_clean+0x207/0x520
[  196.906560][ T5241]  bch2_fs_recovery+0x1f4/0x39c0
[  196.911495][ T5241]  ? mark_lock+0x9a/0x360
[  196.915818][ T5241]  ? __lock_acquire+0x1384/0x2050
[  196.920839][ T5241]  ? __pfx_bch2_fs_recovery+0x10/0x10
[  196.926230][ T5241]  ? __pfx_lock_release+0x10/0x10
[  196.931276][ T5241]  ? bch2_get_next_online_dev+0x2b/0x4f0
[  196.936911][ T5241]  ? __pfx_lock_release+0x10/0x10
[  196.941941][ T5241]  ? bch2_get_next_online_dev+0x2b/0x4f0
[  196.947571][ T5241]  ? bch2_get_next_online_dev+0x4b9/0x4f0
[  196.953287][ T5241]  ? bch2_get_next_online_dev+0x2b/0x4f0
[  196.958918][ T5241]  ? llist_reverse_order+0x72/0x90
[  196.964024][ T5241]  bch2_fs_start+0x356/0x5b0
[  196.968611][ T5241]  bch2_fs_get_tree+0xd68/0x1710
[  196.973549][ T5241]  ? __pfx_bch2_fs_get_tree+0x10/0x10
[  196.978929][ T5241]  ? generic_parse_monolithic+0x387/0x400
[  196.984666][ T5241]  ? cap_capable+0x1b4/0x250
[  196.989257][ T5241]  ? safesetid_security_capable+0xb2/0x1d0
[  196.995067][ T5241]  vfs_get_tree+0x90/0x2b0
[  196.999486][ T5241]  do_new_mount+0x2be/0xb40
[  197.003990][ T5241]  ? __pfx_do_new_mount+0x10/0x10
[  197.009011][ T5241]  __se_sys_mount+0x2d6/0x3c0
[  197.013687][ T5241]  ? __pfx___se_sys_mount+0x10/0x10
[  197.018878][ T5241]  ? do_syscall_64+0x100/0x230
[  197.023637][ T5241]  ? __x64_sys_mount+0x20/0xc0
[  197.028403][ T5241]  do_syscall_64+0xf3/0x230
[  197.032895][ T5241]  ? clear_bhb_loop+0x35/0x90
[  197.037648][ T5241]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[  197.043551][ T5241] RIP: 0033:0x7f95139108fa
[  197.047966][ T5241] 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
[  197.067577][ T5241] RSP: 002b:00007fff05468a28 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
[  197.075994][ T5241] RAX: ffffffffffffffda RBX: 00007fff05468a40 RCX: 00007f95139108fa
[  197.083965][ T5241] RDX: 0000000020005d80 RSI: 0000000020005dc0 RDI: 00007fff05468a40
[  197.091930][ T5241] RBP: 0000000000000004 R08: 00007fff05468a80 R09: 0000000000005d77
[  197.099891][ T5241] R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000000
[  197.107852][ T5241] R13: 00007fff05468a80 R14: 0000000000000003 R15: 0000000001000000
[  197.115836][ T5241]  </TASK>