From nobody Sat Jan 27 10:15:49 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TMVnd5c8Nz588RG for ; Sat, 27 Jan 2024 10:15:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TMVnd3DvJz4ckG for ; Sat, 27 Jan 2024 10:15:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706350549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wu1AituXPXP7wHH1mEV/XISgUOY47xqd/W65VLB7KuQ=; b=cxIJOM8GvWlyT6puDhBUPeyL8Yo3H6514U4QoUXp7jLepMnqKNwKZHb7G0vrm4t5eH2Eay 4k9kONsAUcxvKezI1LE5JJEP9JxCs3NwOtR5tnAKQPBX/ju71DVv7HkwFxWQBuSj8Vt7Hy ZwSyLuP3Ww/aOZ/f66EvCJnMZWFjg+MFzZwjtnGjCghTXWtFYgV9jOTNeLhMnup9oIilCv eAr1/qOWUkAp164bjSA3s404VGLfkaVpjZJ6q37k79QjGw4kIqBCEGEJwHDLmLigDCkMqG xdg1VWDLitbps/jiR/HgAD+u51g6bOEKEJB6mATg8SOjbrW2/QPWrw9c3HtoNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706350549; a=rsa-sha256; cv=none; b=MQ4i9fb3cqwwztwFehWVwOakoEu5Tbd+vvjwf1NAk1UkysLgx+zcc+z2TFsSoRksL9XVVY iYjCN/BW8XTSRJ9yitlcTkytcRXTrzXhJcDbKl5tpNOe77G/5nTWAbm5k44PQK0cJvVx78 rmF3rkNAtkAcFexWdgBwfFGtnCu9Osmu4dJUBBvkm+BJ3lLc5KLc+fOwbn8IuCazUNfidP yDg8V1TcGgwKlUE5usW4MlWnkYhO/yc1pauhniMrJO/r44RYxwI1sRWfU8sfcLsgHvsJ8e rEHAgjZtTUxkwTiZLewDeSeV3ZGxdS+uF4Ljt9S/ChF/tVM3NspyhS6zjUF4Ng== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TMVnd2Hf4zLkP for ; Sat, 27 Jan 2024 10:15:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 40RAFn7t053181 for ; Sat, 27 Jan 2024 10:15:49 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 40RAFnVF053180 for bugs@FreeBSD.org; Sat, 27 Jan 2024 10:15:49 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 276660] vnode_init can take several minutes to complete Date: Sat, 27 Jan 2024 10:15:49 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jfc@mit.edu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276660 Bug ID: 276660 Summary: vnode_init can take several minutes to complete Product: Base System Version: 13.2-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: jfc@mit.edu Occasionally a process on my 13.2 server will get stuck in vnode_init for 5= -15 minutes. ^T says the stack trace is constant but the process is accumulating CPU tim= e: load: 28.91 cmd: git 7038 [running] 430.92r 0.00u 425.79s 100% 6908k __mtx_lock_sleep+0xf8 __mtx_lock_flags+0x9d vnode_init+0xc3 keg_alloc_slab+0x277 zone_import+0x143 cache_alloc+0x3ed cache_alloc_retry+= 0x23 getnewvnode_reserve+0x20 zfs_zget+0x1f zfs_dirent_lookup+0x16d zfs_dirlook+= 0x7f zfs_lookup+0x3e0 zfs_freebsd_cachedlookup+0x74 vfs_cache_lookup+0xa7 cache_fplookup_noentry+0x23e cache_fplookup+0x565 namei+0x1e9 kern_accessat+0x195=20 This is the context of the mtx_lock call from vnode_init: vp->v_holdcnt =3D VHOLD_NO_SMR; vp->v_type =3D VNON; mtx_lock(&vnode_list_mtx); TAILQ_INSERT_BEFORE(vnode_list_free_marker, vp, v_vnodelist); mtx_unlock(&vnode_list_mtx); return (0); When this happened last October I posted to the freebsd-fs list[1]. Mateusz Guzik[2] described the root cause: "That codepath which appeared stalled may very well have been making progress. There is an API deficiency in UMA where it calls the constructor/destructor for each object separately." [1]https://lists.freebsd.org/archives/freebsd-fs/2023-October/002693.html [2]https://lists.freebsd.org/archives/freebsd-fs/2023-October/002701.html My system is a 24 core / 48 thread AMD EPYC 7402P. Memory stats reported by top are Mem: 3784M Active, 79G Inact, 15G Laundry, 47G Wired, 739M Buf, 12G Free ARC: 34G Total, 19G MFU, 11G MRU, 3584K Anon, 3870M Header, 239M Other 28G Compressed, 33G Uncompressed, 1.19:1 Ratio Swap: 64G Total, 3439M Used, 61G Free, 5% Inuse There are also two find processes started by cron apparently exhibiting the same behavior, runnable with large CPU time instead of waiting on I/O. Interesting sysctl values are: vm.uma.VNODE.bucket_size: 121 vfs.vnode.vnlru.uma_reclaim_calls: 0 vfs.vnode.vnlru.kicks: 0 vfs.vnode.vnlru.max_free_per_call: 10000 vfs.vnode.vnlru.failed_runs: 0 vfs.vnode.vnlru.direct_recycles_free: 74572815 vfs.vnode.vnlru.recycles_free: 37066685 vfs.vnode.vnlru.recycles: 0 vfs.vnode.stats.alloc_sleeps: 0 vfs.vnode.stats.free: 648453 vfs.vnode.stats.skipped_requeues: 6851950 vfs.vnode.stats.created: 116854230 vfs.vnode.stats.count: 973318 vfs.vnode.param.wantfree: 681059 vfs.vnode.param.limit: 2724237 --=20 You are receiving this mail because: You are the assignee for the bug.=