Bug 168997

Summary: general protection fault logged when starting ntp service
Product: [Fedora] Fedora Reporter: Frank Vera <zibebs>
Component: ntpAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: praszyk
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-27 13:30:02 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:
Attachments:
Description Flags
ntpd including autotrace+autodebug
none
Requested /tmp/ntp* trace files
none
ntp-4.2.0.a.20050816-2.src.rpm
none
/tmp/ntpd.* (second time)
none
ntp-4.2.0.a.20050816-2.src.rpm
none
ntpd-trace3.tgz
none
ntp-4.2.0.a.20050816-2.src.rpm
none
ntpd-trace4.tgz
none
new ntp-4.2.0.a.20050816-2.src.rpm
none
ntpd-trace5.tgz none

Description Frank Vera 2005-09-21 21:43:14 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

Description of problem:
Starting the ntpd service returns:
Starting ntpd: [  OK  ]
However, when ps -ef|grep nt[p] is run, there is no ntp daemon running.
dmeg shows that ntpd crashed.

This is happening on two x86_64 (Opteron) machines. I'll have two more in the next few days to test again.

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

How reproducible:
Always

Steps to Reproduce:
1. /sbin/service ntpd start
2. ps -ef | grep nt[p] to verify that no ntpd process is running
3. dmesg to see: ntpd[11657] general protection rip:2aaaab0e6e35 rsp:7fffff8f5d00 error:0
  

Actual Results:  ntpd didn't keep running

Expected Results:  ntpd should continue running.

Additional info:

dmesg shows: ntpd[11657] general protection rip:2aaaab0e6e35 rsp:7fffff8f5d00 error:0
after running /sbin/service ntpd start

Comment 1 Petr Raszyk 2005-09-22 13:39:37 UTC
I will prepare a 'new' version (ntp-stable-4.2.0a-20050816).
It will (additionally) include spec. trace-logs to localize 
this bug in your environment.
It takes ca. 1 day for me.
I will send you this as "*.src.rpm". Can you repeat your scenario
with this new version ?


Comment 2 Frank Vera 2005-09-23 16:25:39 UTC
I didn't know if you were waiting for a response, but yes I'll try with the 
changes. I need to have something other than ntpdate running under cron for 
time synchronization.  Thanks.

Comment 3 Petr Raszyk 2005-10-21 14:37:42 UTC
Created attachment 120255 [details]
ntpd including autotrace+autodebug

Can you compile and install ntp-4.2.0.a.20050816-2.src.rpm ?
It creates two /tmp/ntpd.PID files (one for PARENT, one for CHILD).
It contains autotrace+autodebug informations.
Can you send me, please, this files ?

Comment 4 Frank Vera 2005-12-01 14:43:00 UTC
Created attachment 121688 [details]
Requested /tmp/ntp* trace files

Attached are the trace files that were after installing and running ntp from
ntp-4.2.0.a.20050816-2.src.rpm.  Would you like me to include trace files from
the other machines where I am having this problem?

Comment 5 Petr Raszyk 2005-12-01 15:38:50 UTC
Many thanks for these files.
It crashes simply on allocation in the file 
ntp/devel/ntp-stable-4.2.0a-20050816/ntpd/ntp_io.c -> add_socket_to_list()
-------------------------------

void add_socket_to_listadd_socket_to_list (SOCKET fd)
  {
  vsock_t	*lsock = (vsock_t *)malloc(sizeof(vsock_t));
  lsock->fd = fd;
  
  ISC_LIST_APPEND(sockets_list, lsock, link);
  }
   
------------------------------

There is no check if malloc() fails. But this is not primary problem.
ntpd sets limits for allocation and these limits are probably not enough.
The problem is known, it was fixed but the limits are not OK yet.
I will send you new *.src.rpm in 1-2 days.
I think, i can fix this bug.



Comment 6 Petr Raszyk 2005-12-05 11:07:59 UTC
Created attachment 121844 [details]
ntp-4.2.0.a.20050816-2.src.rpm

Please, can you repeat the test ?
Does it work (now) ?
Can you send me, please, these files (/tmp/ntpd.*) ?

Comment 7 Frank Vera 2005-12-06 12:02:33 UTC
Created attachment 121902 [details]
/tmp/ntpd.* (second time)

Looks like it failed again.

Comment 8 Petr Raszyk 2005-12-06 16:18:58 UTC
Created attachment 121917 [details]
ntp-4.2.0.a.20050816-2.src.rpm

OK. 
Please, can you try it with new *.src.rpm again ?

Comment 9 Frank Vera 2005-12-06 17:03:45 UTC
Created attachment 121918 [details]
ntpd-trace3.tgz

It's still failing.

Comment 10 Petr Raszyk 2006-01-16 19:57:32 UTC
Created attachment 123257 [details]
ntp-4.2.0.a.20050816-2.src.rpm


Please, can you try it with new *.src.rpm again ?
I hope we get 'the point' where we overwrite (sockets_list).

Comment 11 Frank Vera 2006-01-18 15:17:24 UTC
Created attachment 123376 [details]
ntpd-trace4.tgz

I'm sorry to say that it didn't work.

Comment 12 Petr Raszyk 2006-01-19 10:52:12 UTC
Created attachment 123419 [details]
 new ntp-4.2.0.a.20050816-2.src.rpm


Many thanks !
Please, can you try it with new *.src.rpm again ?
I hope it works now.
I have time for this issue. You can get an answer today.

Comment 13 Frank Vera 2006-01-19 13:02:23 UTC
Created attachment 123426 [details]
ntpd-trace5.tgz

Wonderful! It didn't crash this time and it actually synchronized with a server
after a few minutes.

Comment 14 Petr Raszyk 2006-01-19 14:34:44 UTC
Many thanks !

GERMAN ONLY: Vielen Dank fuer Ihre Zusammenarbeit !



Comment 15 Frank Vera 2006-01-19 17:07:30 UTC
(In reply to comment #14)
> Many thanks !
> 
> GERMAN ONLY: Vielen Dank fuer Ihre Zusammenarbeit !
> 
> 

Sie sind willkommen.

Comment 16 Miroslav Lichvar 2006-06-26 15:11:35 UTC
Is this still an issue? Looks like duplicate of bug #177052.

Comment 17 Miroslav Lichvar 2006-07-27 13:30:02 UTC
Ok, I assume it's fixed in the last update.