[Nagiosplug-devel] [ nagiosplug-Bugs-1556886 ] check_ntp ---> Memory fault

SourceForge.net noreply at sourceforge.net
Thu Mar 29 13:37:48 CEST 2007


Bugs item #1556886, was opened at 2006-09-12 03:24
Message generated for change (Comment added) made by dermoth
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1556886&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Argument proccessing
Group: CVS
Status: Pending
Resolution: None
Priority: 5
Private: No
Submitted By: Ciro Iriarte (cyruspy)
Assigned to: Ton Voon (tonvoon)
Summary: check_ntp ---> Memory fault

Initial Comment:
The plugin works fine if i don't ask for jitter
checking, but if i do it just gives Memory Fault.

Linux x86_64:

asusis-ope2:/etc/nagios #
/usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2 -k 3
Segmentation fault
asusis-ope2:/etc/nagios #
/usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j
2.0 -k 3.0
Segmentation fault
asusis-ope2:/etc/nagios #
/usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j
2,0 -k 3,0
Segmentation fault


Tru64:

iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins>
./check_ntp -H 10.129.4.140 -j 2 -k 3
Memory fault
iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins>
./check_ntp -H 10.129.4.140 -j 2.0 -k 3.0
Memory fault
iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins>
./check_ntp -H 10.129.4.140 -j 2,0 -k 3,0
Memory fault


----------------------------------------------------------------------

>Comment By: Thomas Guyot (dermoth)
Date: 2007-03-29 07:37

Message:
Logged In: YES 
user_id=375623
Originator: NO

The attached patch fixes the segfault on my prod servers, but returns a
warning because it can't seems to get the jitter. While getting the jitter
seems to be the root of the problem I believe it wouldn't be a bad idea to
apply this patch as well.

I'll leave the patch to whoever fix the problem though because I don't
understand much about NTP ;)
File Added: check_ntp.startofvalue.patch

----------------------------------------------------------------------

Comment By: Thomas Guyot (dermoth)
Date: 2007-03-29 06:41

Message:
Logged In: YES 
user_id=375623
Originator: NO

I just tested on my servers and I get SEGV for both 1.4.6 and HEAD:

root at josianne:/tmp/nagiosplug# plugins/check_ntp -H 64.94.137.1 -j 2 -k 3
root at josianne:/tmp/nagiosplug# plugins/check_ntp -H 64.94.137.1     
NTP OK: Offset -0.0002659001038 secs|offset=-0.0002659001038
root at josianne:/tmp/nagiosplug# gdb plugins/check_ntp
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i486-slackware-linux"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run -H 64.94.137.1 -j 2 -k 3
Starting program: /tmp/nagiosplug/plugins/check_ntp -H 64.94.137.1 -j 2 -k
3

Program received signal SIGSEGV, Segmentation fault.
0xb7e5a9a1 in ____strtod_l_internal () from /lib/tls/libc.so.6
(gdb) bt
#0  0xb7e5a9a1 in ____strtod_l_internal () from /lib/tls/libc.so.6
#1  0xb7e57ec8 in __strtod_internal () from /lib/tls/libc.so.6
#2  0x0804a1af in jitter_request (host=0x804f0b0 "64.94.137.1",
status=0xbfd903f0) at /usr/include/stdlib.h:327
#3  0x0804a8a2 in main (argc=7, argv=0xbfd90494) at check_ntp.c:748


----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 2007-03-29 05:38

Message:
Logged In: YES 
user_id=664364
Originator: NO

Ciro,

Can you please try the snapshot as I think this is fixed.

Ton

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1556886&group_id=29880




More information about the Devel mailing list