[ntp:bugs] [Bug 1851] ntpd 4.2.7 segfaults at startup under FreeBSD

bugzilla-daemon at ntp.org bugzilla-daemon at ntp.org
Wed Mar 16 14:23:21 UTC 2011


http://bugs.ntp.org/show_bug.cgi?id=1851

--- Comment #4 from Dave Hart <hart at ntp.org> 2011-03-16 14:23:21 UTC ---
(In reply to comment #3)
> The crash in lib/isc/unix/net.c is also puzzling to me.  The lib/isc code is
> largely unchanged from BIND 9 where it gets much wider exposure.  Given the
> recent changes and they way a mutex is used to ensure the ipv4/ipv6 probing is
> done exactly once, my hunch is there's mutex abuse afoot thanks to my
> inadequate attention to threading detail.

After a bit more thought, I retract that hunch.  Martin demonstrated the crash
in probe_ipv6 with similar backtraces initially on a build with pthreads, but
then repeated it without pthreads, so no mutexes would have been used, yet the
crash is in the same place.

I'm still a bit puzzled because this code has worked uneventfully for ntpd and
BIND 9 for a few years

One more tip that may be helpful:  On psp-fb[12].ntp.org ntpd has a habit of
crashing loading a LDAP .so processing /etc/nsswitch.conf inside getaddrinfo().
 Both systems are running FreeBSD 6.4.  It went away for most of the 4.2.7
cycle (while continuing to be a problem for 4.2.6) but has reared up in 4.2.7
again lately.  Adding a dummy call to getaddrinfo() early in ntpdmain() or in
init_logging() works around the problem.  It seems likely to be a problem
exposed by our configuration (or caused by it) but not seen on other FreeBSD
systems.

You might be helped to understand the issue by trying something similar, such
as calling init_lib() earlier.

-- 
Configure bugmail: http://bugs.ntp.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the bugs mailing list