Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 537964 - net-misc/ntp-4.2.8-r1 - /usr/sbin/ntpd fails to resolve host names in /etc/ntp.conf
Summary: net-misc/ntp-4.2.8-r1 - /usr/sbin/ntpd fails to resolve host names in /etc/nt...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-27 12:55 UTC by Alexander Zubkov
Modified: 2015-01-30 17:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge--info.txt,4.49 KB, text/plain)
2015-01-27 12:55 UTC, Alexander Zubkov
Details
strace of good run (ntp.ok.strace,885.36 KB, text/plain)
2015-01-27 12:56 UTC, Alexander Zubkov
Details
ntp.bad.strace.gz (ntp.bad.strace.gz,52.12 KB, application/gzip)
2015-01-27 12:57 UTC, Alexander Zubkov
Details
debug of good run (ntp.ok.debug,5.50 KB, text/plain)
2015-01-27 12:57 UTC, Alexander Zubkov
Details
debug of bad run (ntp.bad.debug,3.84 KB, text/plain)
2015-01-27 12:58 UTC, Alexander Zubkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Zubkov 2015-01-27 12:55:02 UTC
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.
Comment 1 Alexander Zubkov 2015-01-27 12:56:13 UTC
Created attachment 394992 [details]
strace of good run
Comment 2 Alexander Zubkov 2015-01-27 12:57:17 UTC
Created attachment 394994 [details]
ntp.bad.strace.gz
Comment 3 Alexander Zubkov 2015-01-27 12:57:56 UTC
Created attachment 394996 [details]
debug of good run
Comment 4 Alexander Zubkov 2015-01-27 12:58:20 UTC
Created attachment 394998 [details]
debug of bad run
Comment 5 Thomas Deutschmann (RETIRED) gentoo-dev 2015-01-28 08:40:26 UTC
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"
Comment 6 Alexander Zubkov 2015-01-28 21:38:13 UTC
> 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.