[ntp:questions] ntpd 4.2.4 crash on NetBSD/i386

Pierre Dubuc pldubuc at yahoo.ca
Sat Feb 24 20:18:19 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I just got a new NetBSD box running. It's an old 486 with 16MB RAM and 
515MB hard drive. The NetBSD 3.1 GENERIC kernel takes up more than half
the RAM, and launching the stock ntpd (4.2.0) that's part of the 
distribution failed with a message saying "mlockall(): Cannot allocate
memory". There is a 64MB swap partition on the machine.

I figured things were too tight, so I built a custom kernel, without USB,
SCSI, IPV6, parallel port, and so on. Basically, the only options left
are those for devices I want to use and IPV4. A few file systems are
disabled as well, but the NTP option is still present. The machine boots
fine, with no errors that I notice. I've got more RAM available for ntpd.

>From that point, if I try again to run the stock ntpd (4.2.0), it crashes
on startup with a ntpd.core in the root. I figured I'd try to reduce the
size of the ntpd object by building the current distribution from source
(4.2.4). It worked well on my NetBSD/macppc before, so I decided to do
the same for the 486.

I ran ./configure --disable-all-clocks --disable-debug
                   --enable-local-clock --disable-ipv6

The make and installation were successful. However, I still get a crash 
on ntpd startup, again with a core dump. I'm out of ideas.


Here's my ntpd.conf

pidfile         /var/run/ntpd.pid
driftfile       /etc/ntp.drift
keys            /etc/ntp.keys
statsdir        /var/NTP

trustedkey      1
controlkey      1
requestkey      1

server          192.168.3.14 iburst # That's the NetBSD/macppc machine

statistics      loopstats
enable          stats

restrict        localhost
restrict        192.168.3.0 mask 255.255.255.0
restrict        default nomodify


Looking at /var/log/messages doesn't say much... (I have manually put in 
0.000 in the drift file as a startup value, since I don't know yet what
value will end up there).

Feb 24 14:39:49 localhost ntpd[28722]: ntpd 4.2.4 at 1.1437-o Sat Feb 24 
18:04:36 GMT 2007 (1)
Feb 24 14:39:51 localhost ntpd[28576]: precision = 1250.000 usec
Feb 24 14:39:51 localhost ntpd[28576]: Listening on interface #0 wildcard, 
0.0.0.0#123 Disabled
Feb 24 14:39:51 localhost ntpd[28576]: Listening on interface #1 we1, 
192.168.3.41#123 Enabled
Feb 24 14:39:51 localhost ntpd[28576]: Listening on interface #2 lo0, 
127.0.0.1#123 Enabled
Feb 24 14:39:51 localhost ntpd[28576]: Listening on routing socket on fd 
#23 for interface updates
Feb 24 14:39:51 localhost ntpd[28576]: kernel time sync status 0040
Feb 24 14:39:52 localhost ntpd[28576]: frequency initialized 0.000 PPM 
from /etc/ntp.drift

That's all she wrote.


Here's the dmesg, in case it may help

NetBSD 3.1 (I486) #2: Sat Feb 24 09:14:17 EST 2007
         pldubuc at localhost.localhost:/usr/src/sys/arch/i386/compile/I486
total memory = 15616 KB
avail memory = 13180 KB
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel 486DX (486-class)
isa0 at mainbus0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns8250 or ns16450, no fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns8250 or ns16450, no fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
atabus0 at wdc0 channel 0
we1 at isa0 port 0x300-0x31f iomem 0xcc000-0xcdfff irq 10
we1: SMC8416T Ethernet (16-bit)
we1: Ethernet address 00:e0:29:16:74:09
vga0 at isa0 port 0x3b0-0x3df iomem 0xa0000-0xbffff
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation), using 
wskbd0
wsmux1: connecting to wsdisplay0
pcppi0 at isa0 port 0x61
sysbeep0 at pcppi0
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
wd0 at atabus0 drive 0: <NEC Corporation D3717>
wd0: drive supports 16-sector PIO transfers, chs addressing
wd0: 515 MB, 1048 cyl, 16 head, 63 sec, 512 bytes/sect x 1056384 sectors
wd0: drive supports PIO mode 3
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)


I'm open to suggestions at this point. I also question whether there are 
specific kernel options that must be turned on in order for ntpd to work 
(other than basic networking, I mean).

Thanks a bunch.

- -- 
Pierre Dubuc
pldubuc at yahoo.ca
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)

iEYEARECAAYFAkXgnZYACgkQaMA1iJ2qYmLMwgCg2q4PuJinIlgNKYet7VQiijAc
uXkAnjlVZ27o/1QQon1AGLQQvhgkdE+w
=IYBa
-----END PGP SIGNATURE-----




More information about the questions mailing list