[Nagiosplug-devel] More check_ntp bugs...
Thomas Guyot-Sionnest
dermoth at aei.ca
Thu Mar 29 13:43:58 CEST 2007
While trying to debug the jitter bug on my home computer (Ubuntu 6.10,
X86_64) I found one more on the realloc call at check_ntp.c:543. I just
have no idea what's the proper way to fix that...
(gdb) run -H pool.ntp.org -j 2 -k 3
Starting program:
/home/dermoth/DEV/src/nagios-plugins/nagiosplug/plugins/check_ntp -H
pool.ntp.org -j 2 -k 3
*** glibc detected ***
/home/dermoth/DEV/src/nagios-plugins/nagiosplug/plugins/check_ntp:
realloc(): invalid next size: 0x0000000000508630 ***
======= Backtrace: =========
/lib/libc.so.6[0x2b2132d251ed]
/lib/libc.so.6(__libc_realloc+0x11c)[0x2b2132d25bfc]
/home/dermoth/DEV/src/nagios-plugins/nagiosplug/plugins/check_ntp[0x401ba6]
/home/dermoth/DEV/src/nagios-plugins/nagiosplug/plugins/check_ntp[0x402d46]
/lib/libc.so.6(__libc_start_main+0xf4)[0x2b2132cd20c4]
/home/dermoth/DEV/src/nagios-plugins/nagiosplug/plugins/check_ntp[0x401339]
======= Memory map: ========
00400000-00407000 r-xp 00000000 08:02 1665960
/home/dermoth/DEV/src/nagios-plugins/nagiosplug/plugins/check_ntp
00506000-00507000 rw-p 00006000 08:02 1665960
/home/dermoth/DEV/src/nagios-plugins/nagiosplug/plugins/check_ntp
00507000-00528000 rw-p 00507000 00:00 0
[heap]
2b21327eb000-2b2132807000 r-xp 00000000 08:02 21045
/lib/ld-2.4.so
2b2132807000-2b213280a000 rw-p 2b2132807000 00:00 0
2b2132906000-2b2132908000 rw-p 0001b000 08:02 21045
/lib/ld-2.4.so
2b2132908000-2b213291b000 r-xp 00000000 08:02 34268
/lib/libnsl-2.4.so
2b213291b000-2b2132a1b000 ---p 00013000 08:02 34268
/lib/libnsl-2.4.so
2b2132a1b000-2b2132a1d000 rw-p 00013000 08:02 34268
/lib/libnsl-2.4.so
2b2132a1d000-2b2132a1f000 rw-p 2b2132a1d000 00:00 0
2b2132a1f000-2b2132a30000 r-xp 00000000 08:02 111584
/lib/libresolv-2.4.so
2b2132a30000-2b2132b30000 ---p 00011000 08:02 111584
/lib/libresolv-2.4.so
2b2132b30000-2b2132b32000 rw-p 00011000 08:02 111584
/lib/libresolv-2.4.so
2b2132b32000-2b2132b34000 rw-p 2b2132b32000 00:00 0
2b2132b34000-2b2132bb4000 r-xp 00000000 08:02 30271
/lib/libm-2.4.so
2b2132bb4000-2b2132cb3000 ---p 00080000 08:02 30271
/lib/libm-2.4.so
2b2132cb3000-2b2132cb5000 rw-p 0007f000 08:02 30271
/lib/libm-2.4.so
2b2132cb5000-2b2132deb000 r-xp 00000000 08:02 21053
/lib/libc-2.4.so
2b2132deb000-2b2132eeb000 ---p 00136000 08:02 21053
/lib/libc-2.4.so
2b2132eeb000-2b2132eee000 r--p 00136000 08:02 21053
/lib/libc-2.4.so
2b2132eee000-2b2132ef0000 rw-p 00139000 08:02 21053
/lib/libc-2.4.so
2b2132ef0000-2b2132ef7000 rw-p 2b2132ef0000 00:00 0
2b2132ef7000-2b2132f01000 r-xp 00000000 08:02 81267
/lib/libnss_files-2.4.so
2b2132f01000-2b2133000000 ---p 0000a000 08:02 81267
/lib/libnss_files-2.4.so
2b2133000000-2b2133002000 rw-p 00009000 08:02 81267
/lib/libnss_files-2.4.so
2b2133002000-2b2133006000 r-xp 00000000 08:02 81258
/lib/libnss_dns-2.4.so
2b2133006000-2b2133106000 ---p 00004000 08:02 81258
/lib/libnss_dns-2.4.so
2b2133106000-2b2133108000 rw-p 00004000 08:02 81258
/lib/libnss_dns-2.4.so
2b2133200000-2b2133221000 rw-p 2b2133200000 00:00 0
2b2133221000-2b2133300000 ---p 2b2133221000 00:00 0
2b2133300000-2b213330d000 r-xp 00000000 08:02 5424
/lib/libgcc_s.so.1
2b213330d000-2b213340c000 ---p 0000d000 08:02 5424
/lib/libgcc_s.so.1
2b213340c000-2b213340d000 rw-p 0000c000 08:02 5424
/lib/libgcc_s.so.1
7fff782a9000-7fff782bf000 rw-p 7fff782a9000 00:00 0
[stack]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0
[vdso]
Program received signal SIGABRT, Aborted.
0x00002b2132ce547b in raise () from /lib/libc.so.6
(gdb) bt
#0 0x00002b2132ce547b in raise () from /lib/libc.so.6
#1 0x00002b2132ce6da0 in abort () from /lib/libc.so.6
#2 0x00002b2132d1c53b in __fsetlocking () from /lib/libc.so.6
#3 0x00002b2132d251ed in valloc () from /lib/libc.so.6
#4 0x00002b2132d25bfc in realloc () from /lib/libc.so.6
#5 0x0000000000401ba6 in jitter_request (host=<value optimized out>,
status=0x7fff782bb658) at check_ntp.c:543
#6 0x0000000000402d46 in main (argc=<value optimized out>, argv=<value
optimized out>) at check_ntp.c:748
(gdb)
More information about the Devel
mailing list