Created attachment 394990 [details] emerge --info When running ntp it most of the times do not try to resolve host names given in ntp.conf in server directives. Which ends up with empty peer list. If I try to specify server directives with direct IP-addresses, than it loads them whithout proble. In the case of DNS-names, I can restart it several times with no luck. But sometimes it resolves them too. There is no susch problem with 4.2.6_p5-r10. Here is some example runs: repo ~ # ntpd --version ntpd 4.2.6p5 ntpd 4.2.6p5@1.2349-o Tue Jan 27 12:36:08 UTC 2015 (1) repo ~ # /usr/sbin/ntpd -g -u ntp:ntp repo ~ # ntpq -pn remote refid st t when poll reach delay offset jitter ============================================================================== 2a00:f480:0:102 130.173.91.58 2 u 5 64 1 0.057 173.980 0.008 93.180.0.1 192.36.143.151 2 u 4 64 1 0.231 175.032 0.008 93.180.5.99 140.86.39.10 3 u 3 64 1 0.411 174.437 0.008 repo ~ # killall ntpd ... repo ~ # ntpd --version ntpd 4.2.8@1.3265-o Tue Jan 27 12:45:54 UTC 2015 (1) repo ~ # /usr/sbin/ntpd -g -u ntp:ntp repo ~ # ntpq -pn No association ID's returned repo ~ # killall ntpd repo ~ # /usr/sbin/ntpd -g -u ntp:ntp repo ~ # ntpq -pn remote refid st t when poll reach delay offset jitter ============================================================================== *2a00:f480:0:102 130.173.91.58 2 u - 64 1 0.394 -5.731 0.001 93.180.0.1 .STEP. 16 u - 64 0 0.000 0.000 0.001 93.180.5.99 .STEP. 16 u - 64 0 0.000 0.000 0.001 repo ~ # killall ntpd repo ~ # /usr/sbin/ntpd -g -u ntp:ntp repo ~ # ntpq -pn No association ID's returned repo ~ # killall ntpd repo ~ # /usr/sbin/ntpd -g -u ntp:ntp repo ~ # ntpq -pn No association ID's returned repo ~ # killall ntpd repo ~ # /usr/sbin/ntpd -g -u ntp:ntp repo ~ # ntpq -pn No association ID's returned repo ~ # killall ntpd repo ~ # /usr/sbin/ntpd -g -u ntp:ntp repo ~ # ntpq -pn No association ID's returned repo ~ # killall ntpd Successfull runs are very irregular. Also I have attached debug output from version 4.2.8 emerged with USE=debug. And strace outputs of bad and good runs - I found in them only that libresolv.so.2 in bad case is not loaded.
Created attachment 394992 [details] strace of good run
Created attachment 394994 [details] ntp.bad.strace.gz
Created attachment 394996 [details] debug of good run
Created attachment 394998 [details] debug of bad run
Could it be related to hardened? For me, I don't see such a problem with net-misc/ntp-4.2.8-r2 (regarding changelogs, the only difference between -r1 and -r2 is the documentation installdir). # emerge --info net-misc/ntp Portage 2.2.15 (python 3.4.2-final-0, default/linux/amd64/13.0, gcc-4.9.2, glibc-2.20-r1, 3.18.3-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.18.3-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5405_@_2.00GHz-with-gentoo-2.2 KiB Mem: 16433584 total, 12858884 free KiB Swap: 4194300 total, 4194300 free Timestamp of tree: Tue, 27 Jan 2015 13:45:01 +0000 sh bash 4.3_p33-r1 ld GNU ld (Gentoo 2.24 p1.4) 2.24 distcc 3.2rc1 x86_64-pc-linux-gnu [disabled] app-shells/bash: 4.3_p33-r1 dev-lang/perl: 5.20.1-r4 dev-lang/python: 2.7.9-r1, 3.4.2 dev-util/pkgconfig: 0.28-r2 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.13.8 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.69 sys-devel/automake: 1.13.4, 1.14.1, 1.15 sys-devel/binutils: 2.24-r3 sys-devel/gcc: 4.9.2 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.5 sys-devel/make: 4.1-r1 sys-kernel/linux-headers: 3.18 (virtual/os-headers) sys-libs/glibc: 2.20-r1 ================================================================= Package Settings ================================================================= net-misc/ntp-4.2.8-r2 was built with the following: USE="caps debug ipv6 ssl -openntpd -parse-clocks -samba (-selinux) -snmp -vim-syntax -zeroconf" ABI_X86="64"
> Could it be related to hardened? May be. But interesting is that previous version is not affected. I have several systems with this problem, but all of them are installed from same binary packages and all uses hardenes-sources and hardened profile. This systems have somewhat different hardware though.