ntpd problems after port updates

Dean E. Weimer dweimer at dweimer.net
Mon Apr 23 19:08:17 UTC 2012


On 23.04.2012 13:19, Chuck Swiger wrote:
> On Apr 23, 2012, at 11:13 AM, Dean E. Weimer wrote:
>> I am running NTPD built from ports on system that has had world 
>> rebuilt without ntp.  After doing some port updates this morning to 
>> the latest OpenSSL which caused ntp to rebuild as its built against 
>> the OpenSSL port.  ntpd now core dumps at start, in order to attempt 
>> and resolve the issue I tried starting ntpd with the -d switch added, 
>> at which point it loads fine without any problems.
>
> If you run 'ldd /usr/local/bin/ntpd', that might be informative.
>
>> Only option checked when doing make config on the port is the with 
>> OpenSSL option.
>
> Consider not doing this-- OpenSSL has a much worse security history
> than ntpd itself does.  In particular, the ASN.1 parser is infamous
> for trouble, such as CVE-2012-2110.
>
>> if I execute: /usr/local/bin/ntpd -p /var/run/ntpd.pid
>> The result is a signal 11 core dump.
>
> Run gdb against ntpd and the coredump you've gotten to see the crash
> backtrace.  Or run ntpd under gdb.
>

Tried rebuilding without the with SSL option set, oddly it started once 
after that, but a restart caused same behavior.  gdb doesn't give me 
anything that I know how to interpret, gdb -c /ntpd.core.  (I haven't 
really used gdb before, so if I am not doing something correctly with 
it, please feel free to let me know)

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and 
you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for 
details.
This GDB was configured as "amd64-marcel-freebsd".
Core was generated by `ntpd'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000008006878c0 in ?? ()
(gdb) bt
#0  0x00000008006878c0 in ?? ()
#1  0x0000000000000c78 in ?? ()
#2  0x00000008006bf800 in ?? ()
#3  0x00007fff00000001 in ?? ()
#4  0x0000000800687836 in ?? ()
#5  0x00007fffffffcb60 in ?? ()
#6  0x00007fffffffcb48 in ?? ()
#7  0x0000000000000066 in ?? ()
#8  0x000000080142b570 in ?? ()
#9  0x00007fffffffcf80 in ?? ()
#10 0x0000000000000003 in ?? ()
#11 0x00007fffffffcfc0 in ?? ()
#12 0x000000080166037f in ?? ()
#13 0x00007fffffffcd70 in ?? ()
#14 0x00000008006bf800 in ?? ()
[..snip..]
#532 0x0000000000000008 in ?? ()
#533 0x0000000000000000 in ?? ()
#534 0x0000000000000009 in ?? ()
#535 0x00000000004040d0 in ?? ()
#536 0x0000000000000007 in ?? ()
#537 0x000000080067f000 in ?? ()
#538 0x000000000000000f in ?? ()
#539 <signal handler called>
#540 0x0000000000000000 in ?? ()
Previous frame inner to this frame (corrupt stack?)


Running from within gdb didn't give me much either.
proxy1# gdb
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and 
you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for 
details.
This GDB was configured as "amd64-marcel-freebsd".
(gdb) set args -c /etc/ntp.conf
(gdb) file /usr/local/bin/ntpd
Reading symbols from /usr/local/bin/ntpd...(no debugging symbols 
found)...done.
(gdb) run
Starting program: /usr/local/bin/ntpd -c /etc/ntp.conf
(no debugging symbols found)...(no debugging symbols found)...(no 
debugging symbols found)...(no debugging symbols found)...(no debugging 
symbols found)...(no debugging symbols found)...(no debugging symbols 
found)...[New LWP 100873]
(no debugging symbols found)...[New Thread 801c07400 (LWP 100873/ntpd)]

Program exited normally.
(gdb) quit
proxy1# tail -f /var/log/messages
[..snip..]
Apr 23 13:55:43 proxy1 ntpd[95834]: ntpd 4.2.6p5 at 1.2349 Mon Apr 23 
18:23:07 UTC 2012 (1)
Apr 23 13:55:43 proxy1 ntpd[95836]: proto: precision = 0.699 usec
Apr 23 13:55:43 proxy1 kernel: pid 95836 (ntpd), uid 0: exited on 
signal 5 (core dumped)

However it seems to have made it farther before crashing.
gdb -c /ntpd.core
[..snip..]
#832 0x0000000000000005 in ?? ()
#833 0x0000000000000008 in ?? ()
#834 0x0000000000000006 in ?? ()
#835 0x0000000000001000 in ?? ()
#836 0x0000000000000008 in ?? ()
#837 0x0000000000000000 in ?? ()
#838 0x0000000000000009 in ?? ()
#839 0x00000000004040d0 in ?? ()
#840 0x0000000000000007 in ?? ()
#841 0x000000080067f000 in ?? ()
#842 0x000000000000000f in ?? ()
#843 <signal handler called>
#844 0x0000000000000000 in ?? ()
Previous frame inner to this frame (corrupt stack?)

Of course it still runs fine with the -d option set.

-- 
Thanks,
  Dean E. Weimer
  http://www.dweimer.net/


More information about the freebsd-questions mailing list