ports/125453: ntp should no longer use mlockall()

Travis Mikalson bofh at terranova.net
Wed Jul 9 22:20:01 UTC 2008

>Number:         125453
>Category:       ports
>Synopsis:       ntp should no longer use mlockall()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 09 22:20:00 UTC 2008
>Originator:     Travis Mikalson
>Release:        7.0-RELEASE
TerraNovaNet, Inc.
FreeBSD XXXX.terranova.net 7.0-RELEASE FreeBSD 7.0-RELEASE #5: Tue Mar 18 18:20:59 EDT 2008     tog at XXXX.terranova.net:/usr/obj/usr/src/sys/XXXX  amd64
Ntpd 4.2.4p4 from ports should probably not use mlockall() for FreeBSD 5.x or later. mlockall() does not work under amd64 and FreeBSD also now has SO_TIMESTAMP.

i386 seems to work with mlockall(), but using amd64, having ntpd compiled with HAVE_MLOCKALL causes the following when you start ntpd:
Jul  9 16:22:47 <ntp.notice> XXXX ntpd[82826]: ntpd 4.2.4p4 at 1.1520-o Wed Jul  9 20:21:24 UTC 2008 (1)
Jul  9 16:22:47 <ntp.err> XXXX ntpd[82827]: mlockall(): Resource temporarily unavailable

See also:

Patch attached (goes in files/ directory of the net/ntp or net/ntp-devel port...)

Tested for both ntp and ntp-devel port.

Patch attached with submission follows:

--- config.h.in 2007-09-10 20:27:45.000000000 -0400
+++ config.h.in.new     2008-07-09 16:42:49.366051556 -0400
@@ -494,7 +494,7 @@

 /* Define to 1 if you have the `mlockall' function. */
+/* #undef HAVE_MLOCKALL */

 /* Define to 1 if you have the `mmap' function. */
 #undef HAVE_MMAP


More information about the freebsd-ports-bugs mailing list