./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor3747994508 <...> Warning: Permanently added '10.128.0.247' (ED25519) to the list of known hosts. execve("./syz-executor3747994508", ["./syz-executor3747994508"], 0x7ffee2c03630 /* 10 vars */) = 0 brk(NULL) = 0x55556b5ed000 brk(0x55556b5edd00) = 0x55556b5edd00 arch_prctl(ARCH_SET_FS, 0x55556b5ed380) = 0 set_tid_address(0x55556b5ed650) = 5219 set_robust_list(0x55556b5ed660, 24) = 0 rseq(0x55556b5edca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor3747994508", 4096) = 28 getrandom("\xc7\x07\x74\x6b\x4c\x11\xa1\xbc", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x55556b5edd00 brk(0x55556b60ed00) = 0x55556b60ed00 brk(0x55556b60f000) = 0x55556b60f000 mprotect(0x7f85dc9d9000, 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) = 0x7f85d4400000 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(0x7f85d4400000, 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 [ 51.172804][ T5219] loop0: detected capacity change from 0 to 32768 [ 51.251925][ T5219] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=crc64,data_checksum=xxhash,str_hash=crc32c,nojournal_transaction_names,version_upgrade=none [ 51.269492][ T5219] [ 51.271808][ T5219] ============================================ [ 51.277952][ T5219] WARNING: possible recursive locking detected [ 51.284083][ T5219] 6.12.0-rc2-syzkaller-00291-g09f6b0c8904b #0 Not tainted [ 51.291165][ T5219] -------------------------------------------- [ 51.297292][ T5219] syz-executor374/5219 is trying to acquire lock: [ 51.303701][ T5219] ffff888079300908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_replicas_entry_validate+0x2a/0x80 [ 51.313525][ T5219] [ 51.313525][ T5219] but task is already holding lock: [ 51.320863][ T5219] ffff888079300908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 51.330577][ T5219] [ 51.330577][ T5219] other info that might help us debug this: [ 51.338613][ T5219] Possible unsafe locking scenario: [ 51.338613][ T5219] [ 51.346041][ T5219] CPU0 [ 51.349296][ T5219] ---- [ 51.352549][ T5219] lock(&c->sb_lock); [ 51.356599][ T5219] lock(&c->sb_lock); [ 51.360648][ T5219] [ 51.360648][ T5219] *** DEADLOCK *** [ 51.360648][ T5219] [ 51.368769][ T5219] May be due to missing lock nesting notation [ 51.368769][ T5219] [ 51.377065][ T5219] 2 locks held by syz-executor374/5219: [ 51.382587][ T5219] #0: ffff888079300278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 51.391873][ T5219] #1: ffff888079300908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 [ 51.402030][ T5219] [ 51.402030][ T5219] stack backtrace: [ 51.407910][ T5219] CPU: 0 UID: 0 PID: 5219 Comm: syz-executor374 Not tainted 6.12.0-rc2-syzkaller-00291-g09f6b0c8904b #0 [ 51.418998][ T5219] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 [ 51.429038][ T5219] Call Trace: [ 51.432297][ T5219] [ 51.435209][ T5219] dump_stack_lvl+0x241/0x360 [ 51.439879][ T5219] ? __pfx_dump_stack_lvl+0x10/0x10 [ 51.445059][ T5219] ? __pfx__printk+0x10/0x10 [ 51.449627][ T5219] ? lockdep_unlock+0x16a/0x300 [ 51.454462][ T5219] print_deadlock_bug+0x483/0x620 [ 51.459468][ T5219] validate_chain+0x15e2/0x5920 [ 51.464300][ T5219] ? __pfx___bfs+0x10/0x10 [ 51.468697][ T5219] ? __pfx_validate_chain+0x10/0x10 [ 51.473877][ T5219] ? mark_lock+0x9a/0x360 [ 51.478185][ T5219] ? __lock_acquire+0x1384/0x2050 [ 51.483193][ T5219] ? mark_lock+0x9a/0x360 [ 51.487499][ T5219] __lock_acquire+0x1384/0x2050 [ 51.492335][ T5219] lock_acquire+0x1ed/0x550 [ 51.496823][ T5219] ? bch2_replicas_entry_validate+0x2a/0x80 [ 51.502701][ T5219] ? __pfx_lock_acquire+0x10/0x10 [ 51.507725][ T5219] ? lockdep_hardirqs_on+0x99/0x150 [ 51.512905][ T5219] ? __pfx___might_resched+0x10/0x10 [ 51.518176][ T5219] ? _raw_spin_unlock_irqrestore+0xdd/0x140 [ 51.524056][ T5219] ? __pfx__raw_spin_unlock_irqrestore+0x10/0x10 [ 51.530365][ T5219] ? stack_trace_save+0x118/0x1d0 [ 51.535371][ T5219] __mutex_lock+0x136/0xd70 [ 51.539852][ T5219] ? bch2_replicas_entry_validate+0x2a/0x80 [ 51.545724][ T5219] ? kasan_save_track+0x51/0x80 [ 51.550555][ T5219] ? kasan_save_track+0x3f/0x80 [ 51.555385][ T5219] ? __kasan_kmalloc+0x98/0xb0 [ 51.560128][ T5219] ? __kmalloc_node_track_caller_noprof+0x225/0x440 [ 51.566699][ T5219] ? kmemdup_noprof+0x2a/0x60 [ 51.571355][ T5219] ? bch2_read_superblock_clean+0xd6/0x520 [ 51.577138][ T5219] ? bch2_replicas_entry_validate+0x2a/0x80 [ 51.583010][ T5219] ? bch2_fs_start+0x356/0x5b0 [ 51.587759][ T5219] ? __pfx___mutex_lock+0x10/0x10 [ 51.592759][ T5219] ? do_syscall_64+0xf3/0x230 [ 51.597418][ T5219] bch2_replicas_entry_validate+0x2a/0x80 [ 51.603125][ T5219] journal_entry_data_usage_validate+0x2b6/0x690 [ 51.609438][ T5219] ? __pfx_journal_entry_data_usage_validate+0x10/0x10 [ 51.616266][ T5219] ? journal_entry_usage_validate+0xc2/0x360 [ 51.622227][ T5219] ? __pfx_journal_entry_usage_validate+0x10/0x10 [ 51.628619][ T5219] ? rcu_is_watching+0x15/0xb0 [ 51.633369][ T5219] ? trace_kmalloc+0x1f/0xd0 [ 51.637935][ T5219] ? __kmalloc_node_track_caller_noprof+0x242/0x440 [ 51.644504][ T5219] ? kmemdup_noprof+0x45/0x60 [ 51.649162][ T5219] ? bch2_journal_entry_validate+0x6a/0xf0 [ 51.654947][ T5219] bch2_read_superblock_clean+0x207/0x520 [ 51.660645][ T5219] bch2_fs_recovery+0x1f4/0x39c0 [ 51.665568][ T5219] ? mark_lock+0x9a/0x360 [ 51.669874][ T5219] ? __lock_acquire+0x1384/0x2050 [ 51.674880][ T5219] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 51.680237][ T5219] ? __pfx_lock_release+0x10/0x10 [ 51.685245][ T5219] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 51.690861][ T5219] ? __pfx_lock_release+0x10/0x10 [ 51.695869][ T5219] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 51.701482][ T5219] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 51.707182][ T5219] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 51.712798][ T5219] ? llist_reverse_order+0x72/0x90 [ 51.717888][ T5219] bch2_fs_start+0x356/0x5b0 [ 51.722461][ T5219] bch2_fs_get_tree+0xd68/0x1710 [ 51.727384][ T5219] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 51.732737][ T5219] ? generic_parse_monolithic+0x387/0x400 [ 51.738444][ T5219] ? cap_capable+0x1b4/0x250 [ 51.743015][ T5219] ? safesetid_security_capable+0xb2/0x1d0 [ 51.748805][ T5219] vfs_get_tree+0x90/0x2b0 [ 51.753205][ T5219] do_new_mount+0x2be/0xb40 [ 51.757687][ T5219] ? __pfx_do_new_mount+0x10/0x10 [ 51.762691][ T5219] __se_sys_mount+0x2d6/0x3c0 [ 51.767351][ T5219] ? __pfx___se_sys_mount+0x10/0x10 [ 51.772528][ T5219] ? do_syscall_64+0x100/0x230 [ 51.777271][ T5219] ? __x64_sys_mount+0x20/0xc0 [ 51.782014][ T5219] do_syscall_64+0xf3/0x230 [ 51.786496][ T5219] ? clear_bhb_loop+0x35/0x90 [ 51.791165][ T5219] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 51.797052][ T5219] RIP: 0033:0x7f85dc96197a [ 51.801454][ 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 [ 51.821038][ T5219] RSP: 002b:00007fffeff0a398 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 51.829450][ T5219] RAX: ffffffffffffffda RBX: 00007fffeff0a3b0 RCX: 00007f85dc96197a [ 51.837406][ T5219] RDX: 0000000020005b00 RSI: 0000000020005b40 RDI: 00007fffeff0a3b0 [ 51.845361][ T5219] RBP: 0000000000000004 R08: 00007fffeff0a3f0 R09: 0000000000005b25 [ 51.853313][ T5219] R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000000 [ 51.861264][ T5219] R13: 00007fffeff0a3f0 R14: 0000000000000003 R15: 0000000001000000 [ 51.869217][ T5219]