ntpd segfaults on start
Cy Schubert
Cy.Schubert at cschubert.com
Sat Sep 7 16:28:24 UTC 2019
In message <20190907161749.GJ2559 at kib.kiev.ua>, Konstantin Belousov writes:
> On Sat, Sep 07, 2019 at 08:45:21AM -0700, Cy Schubert wrote:
> > I've been able to set the memlock rlimit as low as 20 MB. The issue is
> > letting it default to 0 which allows ntp to mlockall() anything it wants.
> > ntpd on my sandbox is currently using 18 MB.
>
> Default stack size on amd64 is 512M, and default stack gap percentage is
> 3%. This means that the gap can be as large as ~17MB. If 3MB is enough
> for the stack of the main thread of ntpd, then fine.
The default stack is 200K, which is also tuneable in ntp.conf.
rlimit [memlock Nmegabytes | stacksize N4kPages filenum
Nfiledescriptors]
memlock Nmegabytes
Specify the number of megabytes of memory that should
be
allocated and locked. Probably only available under
Linux, this option may be useful when dropping root
(the
-i option). The default is 32 megabytes on non-Linux
machines, and -1 under Linux. -1 means "do not lock
the
process into memory". 0 means "lock whatever memory
the
process wants into memory".
stacksize N4kPages
Specifies the maximum size of the process stack on
systems with the mlockall() function. Defaults to 50
4k
pages (200 4k pages in OpenBSD).
filenum Nfiledescriptors
Specifies the maximum number of file descriptors ntpd
may
have open at once. Defaults to the system default.
--
Cheers,
Cy Schubert <Cy.Schubert at cschubert.com>
FreeBSD UNIX: <cy at FreeBSD.org> Web: http://www.FreeBSD.org
The need of the many outweighs the greed of the few.
More information about the freebsd-current
mailing list