In message <[email protected]>, 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 <[email protected]>
FreeBSD UNIX:  <[email protected]>   Web:  http://www.FreeBSD.org

        The need of the many outweighs the greed of the few.


_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to