From owner-svn-src-all@freebsd.org Thu Sep 19 17:38:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 068F0129B24; Thu, 19 Sep 2019 17:38:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46Z3x06Mx3z43qq; Thu, 19 Sep 2019 17:38:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id A2386D1C5; Thu, 19 Sep 2019 17:38:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::d05d:2f14:a99b:7df2] (unknown [IPv6:2001:470:7a58:0:d05d:2f14:a99b:7df2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 0F73B6C02F; Thu, 19 Sep 2019 19:38:43 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_7D33F55E-C322-41B9-AABE-9757195E930D"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: svn commit: r352304 - in head: . usr.sbin/ntp usr.sbin/ntp/ntpd Date: Thu, 19 Sep 2019 19:38:37 +0200 In-Reply-To: <201909191246.x8JCke4Y003916@slippy.cwsent.com> Cc: src-committers , svn-src-all , svn-src-head@freebsd.org To: Cy Schubert References: <201909132020.x8DKK62j025066@repo.freebsd.org> <4ccdcc18-6412-e606-4a74-314033a5f9c1@FreeBSD.org> <201909191246.x8JCke4Y003916@slippy.cwsent.com> X-Mailer: Apple Mail (2.3445.104.11) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2019 17:38:45 -0000 --Apple-Mail=_7D33F55E-C322-41B9-AABE-9757195E930D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 19 Sep 2019, at 14:46, Cy Schubert wrote: >=20 > In message <4ccdcc18-6412-e606-4a74-314033a5f9c1@FreeBSD.org>, Dimitry = Andric writes: >> On 2019-09-13 22:20, Cy Schubert wrote: >>> Author: cy >>> Date: Fri Sep 13 20:20:05 2019 >>> New Revision: 352304 >>> URL: https://svnweb.freebsd.org/changeset/base/352304 >>>=20 >>> Log: >>> No longer mlock() ntpd pages by default in memory thus allowing = its >>> pages to page as necessary. >>>=20 >>> To restore historic BSD behaviour add the following to ntp.conf: >>> rlimit memlock 32 >>=20 >> Apparently this does not completely work, as I still see: >>=20 >> ntpd[824]: ntpd 4.2.8p12-a (1): Starting >> ntpd[825]: Cannot set RLIMIT_MEMLOCK: Operation not permitted >>=20 >> even while my ntp.conf is almost entirely vanilla (it only has a >> different "server" line). >>=20 >> Even explicitly adding: >>=20 >> rlimit memlock -1 >>=20 >> does not work, it results in the same error. >>=20 >> -Dimitry >=20 > Can you try this please? >=20 > diff --git a/contrib/ntp/ntpd/ntpd.c b/contrib/ntp/ntpd/ntpd.c > index 2b14431dc7b..bcfca27a535 100644 > --- a/contrib/ntp/ntpd/ntpd.c > +++ b/contrib/ntp/ntpd/ntpd.c > @@ -999,7 +999,7 @@ ntpdmain( > # if defined(HAVE_MLOCKALL) > # ifdef HAVE_SETRLIMIT > ntp_rlimit(RLIMIT_STACK, DFLT_RLIMIT_STACK * 4096, 4096, "4k"); > -# ifdef RLIMIT_MEMLOCK > +# if defined(RLIMIT_MEMLOCK) && defined(DFLT_RLIMIT_MEMLOCK) && > DFLT_RLIMIT_MEMLOCK !=3D -1 > /* > * The default RLIMIT_MEMLOCK is very low on Linux systems. > * Unless we increase this limit malloc calls are likely to Yes, I already had something similar edited in (though I tested DLT_RLIMIT_MEMLOCK > 0), and that works for me. -Dimitry --Apple-Mail=_7D33F55E-C322-41B9-AABE-9757195E930D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXYO9HQAKCRCwXqMKLiCW o+bKAJ4yObZeTSfli2jwIpS48AeeeeRkAgCgwI2gFdOJWghEdvhTS0n9Ucn8ACI= =qFIb -----END PGP SIGNATURE----- --Apple-Mail=_7D33F55E-C322-41B9-AABE-9757195E930D--