Date: Thu, 19 Sep 2019 19:38:37 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: Cy Schubert <Cy.Schubert@cschubert.com> Cc: src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head@freebsd.org Subject: Re: svn commit: r352304 - in head: . usr.sbin/ntp usr.sbin/ntp/ntpd Message-ID: <F62EAEEC-2EC0-4E23-8F1F-96DB97DED670@FreeBSD.org> In-Reply-To: <201909191246.x8JCke4Y003916@slippy.cwsent.com> References: <201909132020.x8DKK62j025066@repo.freebsd.org> <4ccdcc18-6412-e606-4a74-314033a5f9c1@FreeBSD.org> <201909191246.x8JCke4Y003916@slippy.cwsent.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <Cy.Schubert@cschubert.com> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F62EAEEC-2EC0-4E23-8F1F-96DB97DED670>