Bug 130809

Summary: Ntpd crashes with DNS name servers
Product: [Fedora] Fedora Reporter: Göran Uddeborg <goeran>
Component: ntpAssignee: Harald Hoyer <harald>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-27 21:42:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 123268    
Attachments:
Description Flags
My complete ntp.conf for reference.
none
IP-tables on the affected machine
none
Core file from ntpd none

Description Göran Uddeborg 2004-08-24 20:59:58 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.6) Gecko/20040312

Description of problem:
It seems ntp crashes when I give servers specified by their DNS names.
 According to the manual this should be allowed.

Version-Release number of selected component (if applicable):
ntp-4.2.0-8

How reproducible:
Always

Steps to Reproduce:
1. Add a line "server ntp1.chalmers.se" to ntp.conf
2. Restart ntpd
    

Actual Results:  No ntpd comes up.  When running it directly from the
command line, it crashes with a segmentation fault.

Additional info:

If I replace "ntp1.chalmers.se" with its IP adress, 129.16.9.19, it
works fine.

Comment 1 Göran Uddeborg 2004-08-24 21:01:47 UTC
Created attachment 103041 [details]
My complete ntp.conf for reference.

This one works.  But replacing any of the server IPs with it's domain name,
then it doesn't work any more.

Comment 2 Harald Hoyer 2004-08-25 08:49:38 UTC
how does it crash?
maybe like bug #128648 ??

Comment 3 Göran Uddeborg 2004-08-25 09:37:55 UTC
Created attachment 103060 [details]
IP-tables on the affected machine

No, it does not seem to be related.  I don't have a firewall on this machine,
only NAT is done.  See the attachment for details.  So this part of the init
script is not invoked.

And it is ntpd itself which crashes.  I tried to start it from the command line
with a -d flags, and it crashes, see below.  (If the config file alone is not
enough to trigger this, if it only happens on this system, I could have a
closer look and try to debug it.  But not the next few weeks.)

mimmi### ntpd -U ntp -p /var/run/ntpd.pid -g -d
ntpd 4.2.0 Tue Jun 15 21:05:33 EDT 2004 (1)
addto_syslog: ntpd 4.2.0 Tue Jun 15 21:05:33 EDT 2004 (1)
addto_syslog: signal_no_reset: signal 13 had flags 4000000
addto_syslog: precision = 1.000 usec
create_sockets(123)
addto_syslog: no IPv6 interfaces found
bind() fd 4, family 2, port 123, addr 0.0.0.0, flags=8
bind() fd 5, family 2, port 123, addr 127.0.0.1, flags=0
bind() fd 6, family 2, port 123, addr 172.17.0.1, flags=8
bind() fd 7, family 2, port 123, addr 213.65.50.224, flags=8
init_io: maxactivefd 7
local_clock: at 0 state 0
Segmentation fault (core dumped)
Exit 139

Comment 4 Harald Hoyer 2004-08-25 10:18:36 UTC
seems to work for me with ntp-4.2.0.a.20040616-3
could you try to update?

Comment 5 Göran Uddeborg 2004-08-25 20:34:40 UTC
Hmm, it still crashes for me with ntp-4.2.0.a.20040616-3.

But if this then is something which only happens here, I guess I'll
have to investigate this more.  It will have to wait a little, though.

Comment 6 Harald Hoyer 2004-08-26 07:35:13 UTC
could you please attach the coredump ntp created?


Comment 7 Göran Uddeborg 2004-08-26 20:49:43 UTC
Created attachment 103140 [details]
Core file from ntpd

A core file I can always provide you with! :-)

The command line arguments and the output is as shown below.  It is slightly
different from the one in comment 3 since I have upgraded since then.

mimmi### ntpd -u ntp:ntp -p /var/run/ntpd.pid -g -d
ntpd 4.2.0a Tue Aug 17 08:38:25 EDT 2004 (1)
addto_syslog: ntpd 4.2.0a Tue Aug 17 08:38:25 EDT 2004 (1)
addto_syslog: signal_no_reset: signal 13 had flags 4000000
addto_syslog: precision = 1.000 usec
create_sockets(123)
addto_syslog: no IPv6 interfaces found
bind() fd 4, family 2, port 123, addr 0.0.0.0, flags=8
addto_syslog: Listening on interface wildcard, 0.0.0.0#123
bind() fd 5, family 2, port 123, addr 127.0.0.1, flags=0
addto_syslog: Listening on interface lo, 127.0.0.1#123
bind() fd 6, family 2, port 123, addr 172.17.0.1, flags=8
addto_syslog: Listening on interface eth0, 172.17.0.1#123
bind() fd 7, family 2, port 123, addr 213.65.50.224, flags=8
addto_syslog: Listening on interface eth1, 213.65.50.224#123
init_io: maxactivefd 7
local_clock: time 0 clock 0.000000 offset 0.000000 freq 0.000 state 0
Segmentation fault (core dumped)
Exit 139

Comment 8 Harald Hoyer 2004-08-27 13:30:12 UTC
ok... I could not analyze the core file :-/

Please install the ntp-debuginfo rpm also and please run:

# gdb /usr/sbin/ntpd
> run -u ntp:ntp -p /var/run/ntpd.pid -g -d
....
Segmentation fault
> backtrace

and attach the output of the backtrace
Thank you very much in advance!

Comment 9 Göran Uddeborg 2004-08-27 21:42:32 UTC
I did a bit of debugging, and during that I discovered the machine in
question had an old libcap installed.  (For some reason, I don't know
why.)  After fixing that, I don't get the crashes any more.

I'm very sorry for making all this noise about a false alarm!