From owner-svn-src-head@freebsd.org Thu Sep 19 12:46:46 2019 Return-Path: Delivered-To: svn-src-head@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 D160A122428; Thu, 19 Sep 2019 12:46:46 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46YxS53M34z3CC7; Thu, 19 Sep 2019 12:46:45 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id AvpYil7hDUIS2Avpaiznxv; Thu, 19 Sep 2019 06:46:43 -0600 X-Authority-Analysis: v=2.3 cv=N41X6F1B c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=J70Eh1EUuV4A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=M9TVV_1QxNmupA89uy4A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 88B4DFA; Thu, 19 Sep 2019 05:46:40 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x8JCke0o003919; Thu, 19 Sep 2019 05:46:40 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x8JCke4Y003916; Thu, 19 Sep 2019 05:46:40 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201909191246.x8JCke4Y003916@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Dimitry Andric cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r352304 - in head: . usr.sbin/ntp usr.sbin/ntp/ntpd In-reply-to: <4ccdcc18-6412-e606-4a74-314033a5f9c1@FreeBSD.org> References: <201909132020.x8DKK62j025066@repo.freebsd.org> <4ccdcc18-6412-e606-4a74-314033a5f9c1@FreeBSD.org> Comments: In-reply-to Dimitry Andric message dated "Thu, 19 Sep 2019 11:30:12 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 19 Sep 2019 05:46:40 -0700 X-CMAE-Envelope: MS4wfLhdgsmdiNKbT0mddolIEthE+HI9pWYlc9No05zpzFnvtU7dSpI+o9oxiFA/xd0LXWmjIB0vsAcfThmi/IFeRWNeLyGvzwi2YGrUcDBXdQhqDmDWUzvO 41gkbrpWRkYk+ipO4UKOKgCGOXHVCuaGq1VpNOy+9LUTgi06ZjdacK29LGsd99miaJn6XsX7dqkJo3J1FtFESDi+RVwQOBEzyH0+He4+1S7qc/3OWVso5Jd8 BWBJBGpWMckFyl9inBQoslJUGRFMIkaULCKL5G4FelLBArHFgxyr/N/zUfITuMUMLyqivURgw7VU26u679+7AA== X-Rspamd-Queue-Id: 46YxS53M34z3CC7 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.13) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-4.03 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; IP_SCORE(-2.43)[ip: (-6.59), ipnet: 64.59.128.0/20(-3.08), asn: 6327(-2.39), country: CA(-0.09)]; RCVD_IN_DNSWL_NONE(0.00)[13.134.59.64.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2019 12:46:46 -0000 In message <4ccdcc18-6412-e606-4a74-314033a5f9c1@FreeBSD.org>, Dimitry Andric w rites: > 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 > > > > Log: > > No longer mlock() ntpd pages by default in memory thus allowing its > > pages to page as necessary. > > > > To restore historic BSD behaviour add the following to ntp.conf: > > rlimit memlock 32 > > Apparently this does not completely work, as I still see: > > ntpd[824]: ntpd 4.2.8p12-a (1): Starting > ntpd[825]: Cannot set RLIMIT_MEMLOCK: Operation not permitted > > even while my ntp.conf is almost entirely vanilla (it only has a > different "server" line). > > Even explicitly adding: > > rlimit memlock -1 > > does not work, it results in the same error. > > -Dimitry Can you try this please? 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 != -1 /* * The default RLIMIT_MEMLOCK is very low on Linux systems. * Unless we increase this limit malloc calls are likely to -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.