From nobody Wed Aug 30 14:36:41 2023 X-Original-To: current@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 4RbRh628z4z4s9kY for ; Wed, 30 Aug 2023 14:36:54 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from mailgate.Leidinger.net (mailgate.leidinger.net [IPv6:2a00:1828:2000:313::1:5]) (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 ECDSA (P-256) client-digest SHA256) (Client CN "mailgate.leidinger.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RbRh4698cz4gJr for ; Wed, 30 Aug 2023 14:36:52 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=leidinger.net header.s=outgoing-alex header.b=pCHhcWK1; spf=pass (mx1.freebsd.org: domain of Alexander@Leidinger.net designates 2a00:1828:2000:313::1:5 as permitted sender) smtp.mailfrom=Alexander@Leidinger.net; dmarc=pass (policy=quarantine) header.from=leidinger.net Received: from webmail2.leidinger.net (roundcube.Leidinger.net [192.168.1.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: Alexander@Leidinger.net) by outgoing.leidinger.net (Postfix) with ESMTPSA id 0E62C600; Wed, 30 Aug 2023 16:36:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leidinger.net; s=outgoing-alex; t=1693406204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Ies/mIBrp5hv2TREObnP05oNeR/mA2BOHDI785m4GrM=; b=pCHhcWK1O/JVC6z/5Y4iRRjmdHh9GJ3FmsVZMadgS1y0w+D7hHMO2D/iJXuaqKwSXBkz3W uHUXmEBPgRh+yo7osi+BwDSugyKtF6Qu7c4kBo0S0c9415k5h6yfRDsLtDY04B6FnFzy+e RSW/VX1lpWbrNEszO3zeM508hKYMfRGsWX5R1WsDg5QMsWob0zF9l9T29KyXhv169EArSq pM2/cWteSCURxqpxuoSjF51X2QMz7Uhiv6RjjJAJiRHjp2jlwD7ob0h6uevqTe8EJ6EzWc JZpSJmmn+c/nDuqTcBjBarPJdZ9JyHqQbBSC9wMmA2sA2nQIpDNxcgAQKSAgQw== List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Date: Wed, 30 Aug 2023 16:36:41 +0200 From: Alexander Leidinger To: =?UTF-8?Q?Mina_Gali=C4=87?= Cc: current@freebsd.org Subject: Re: 100% CPU time for sysctl command, not killable In-Reply-To: References: <67616bb5b074851832053a0286c3c2fa@Leidinger.net> <-2rv9P1fc0I_nDQomzn-3shvEyCOkCA84lNmp7B3RdDOr9qBwG5QXZNT0R4ZPq0Z1S4-PyGC1xbVoNjPNHNmajxFq-ygNfDS4AqGzB0ylRU=@igalic.co> Message-ID: X-Sender: Alexander@Leidinger.net Content-Type: multipart/alternative; boundary="=_ecfc975d1cc88a7ac32bdd744aa7025e" X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[leidinger.net,quarantine]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_ALLOW(-0.20)[leidinger.net:s=outgoing-alex]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MLMMJ_DEST(0.00)[current@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:34240, ipnet:2a00:1828::/32, country:DE]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_TRACE(0.00)[leidinger.net:+]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4RbRh4698cz4gJr --=_ecfc975d1cc88a7ac32bdd744aa7025e Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed Am 2023-08-20 21:23, schrieb Alexander Leidinger: > Am 2023-08-20 18:55, schrieb Mina Galić: > procstat(1) kstack could be helpful here. > > -------- Original Message -------- > On 20 Aug 2023, 17:29, Alexander Leidinger Alexander@Leidinger.net> > wrote: > Hi, sysctl kern.maxvnodes=1048576000 results in 100% CPU and a > non-killable sysctl program. This is somewhat unexpected... Bye, > Alexander. -- http://www.Leidinger.net Alexander@Leidinger.net: PGP > 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP > 0x8F31830F9F2772BF PID TID COMM TDNAME KSTACK 94391 118678 sysctl - sysctl_maxvnodes sysctl_root_handler_locked sysctl_root userland_sysctl sys___sysctl amd64_syscall fast_syscall_common I experimented a bit by multiplying my initial value of 104857600. It fails between 5 and 6 times the initial value. sysctl kern.maxvnodes=524288000 is successful within 4 seconds. sysctl kern.maxvnodes=629145600 goes into a loop with the same procstat -k output. Bye, Alexander. -- http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_ecfc975d1cc88a7ac32bdd744aa7025e Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8

Am 2023-08-20 21:23, schrieb Alexander Leidinger:

Am 2023-08-20 18:55, schrieb Mina Gali=C4=87:

procstat(1) kstack could be helpful here.
 
-------- Original Message --------
On 20 Aug 2023, 17:29, Alexand= er Leidinger Alexander@Leidinger.net> wrote:

Hi, sysctl kern.maxvnodes= =3D1048576000 results in 100% CPU and a non-killable sysctl program. This i= s somewhat unexpected... Bye, Alexander. -- http://www.Leidinger.net Alexan= der@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@F= reeBSD.org : PGP 0x8F31830F9F2772BF

  PID    TID COMM           &nbs= p;    TDNAME              KSTA= CK                     &n= bsp; 
94391 118678 sysctl           &nbs= p;  -                   s= ysctl_maxvnodes sysctl_root_handler_locked sysctl_root userland_sysctl sys_= __sysctl amd64_syscall fast_syscall_common 


I experimented a bit by multiplying my initial value of 104857600. It fa= ils between 5 and 6 times the initial value.

sysctl kern.maxvnodes=3D524288000 is successful within 4 seconds.

sysctl kern.maxvnodes=3D629145600 goes into a loop with the same procsta= t -k output.

Bye,

Alexander.

--
--=_ecfc975d1cc88a7ac32bdd744aa7025e--