------------[ cut here ]------------ btree trans held srcu lock (delaying memory reclaim) for 29 seconds WARNING: CPU: 0 PID: 6156 at fs/bcachefs/btree_iter.c:3030 check_srcu_held_too_long fs/bcachefs/btree_iter.c:3028 [inline] WARNING: CPU: 0 PID: 6156 at fs/bcachefs/btree_iter.c:3030 bch2_trans_srcu_unlock+0x516/0x5c0 fs/bcachefs/btree_iter.c:3044 Modules linked in: CPU: 0 UID: 0 PID: 6156 Comm: syz.2.36 Not tainted 6.12.0-syzkaller-11677-g2ba9f676d0a2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 RIP: 0010:check_srcu_held_too_long fs/bcachefs/btree_iter.c:3028 [inline] RIP: 0010:bch2_trans_srcu_unlock+0x516/0x5c0 fs/bcachefs/btree_iter.c:3044 Code: 2b 3e 49 c1 ef 02 48 b9 c3 f5 28 5c 8f c2 f5 28 4c 89 f8 48 f7 e1 48 c1 ea 02 48 c7 c7 40 a2 52 8c 48 89 d6 e8 cb 4a 3b fd 90 <0f> 0b 90 90 49 89 df e9 ae fe ff ff 44 89 e9 80 e1 07 fe c1 38 c1 RSP: 0018:ffffc900057d7000 EFLAGS: 00010246 RAX: def3c61abd32fc00 RBX: 1ffff1100249d008 RCX: 0000000000080000 RDX: ffffc9000d92a000 RSI: 000000000000a1b5 RDI: 000000000000a1b6 RBP: 00000000ffffb0d9 R08: ffffffff81568b22 R09: 1ffff110170c519a R10: dffffc0000000000 R11: ffffed10170c519b R12: 1ffff1100249d00e R13: ffff8880124e8042 R14: ffff8880124e8070 R15: 00000000000002e3 FS: 00007f4b2bce76c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f33399a2000 CR3: 00000000309ac000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_trans_begin+0x178c/0x1bf0 fs/bcachefs/btree_iter.c:3121 bch2_logged_op_start+0xd0/0x310 fs/bcachefs/logged_ops.c:92 bch2_truncate+0x19e/0x2d0 fs/bcachefs/io_misc.c:294 bchfs_truncate+0x85f/0xc90 fs/bcachefs/fs-io.c:464 notify_change+0xbca/0xe90 fs/attr.c:552 do_truncate+0x220/0x310 fs/open.c:65 handle_truncate fs/namei.c:3449 [inline] do_open fs/namei.c:3832 [inline] path_openat+0x2e1e/0x3590 fs/namei.c:3987 do_filp_open+0x27f/0x4e0 fs/namei.c:4014 do_sys_openat2+0x13e/0x1d0 fs/open.c:1402 do_sys_open fs/open.c:1417 [inline] __do_sys_creat fs/open.c:1495 [inline] __se_sys_creat fs/open.c:1489 [inline] __x64_sys_creat+0x123/0x170 fs/open.c:1489 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4b2af80849 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f4b2bce7058 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007f4b2b145fa0 RCX: 00007f4b2af80849 RDX: 0000000000000000 RSI: 000000000000000a RDI: 0000000020000000 RBP: 00007f4b2aff3986 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4b2b145fa0 R15: 00007fffcff496c8