[Nagiosplug-devel] Re: Plugin check_http segfaulting on OpenBSD 3.4-STABLE

C. Bensend benny at bennyvision.com
Sat Apr 17 20:10:12 CEST 2004


OK, with some hints from Stanley, here are further details of SEGVs from
OpenBSD 3.4-STABLE, running today's CVS snapshot of the plugins:

[nagios at tau ~/nagios-plugins-HEAD-200404171647/plugins]$ gdb check_http
GNU gdb 4.16.1
Copyright 1996 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 "i386-unknown-openbsd3.4"...
(gdb) set args -I 127.0.0.1
(gdb) run
Starting program:
/home/nagios/nagios-plugins-HEAD-200404171647/plugins/check_http -I
127.0.0.1

Program received signal SIGSEGV, Segmentation fault.
0xf1b955a in freeaddrinfo ()
(gdb) backtrace
#0  0xf1b955a in freeaddrinfo ()
#1  0x1c00406b in my_connect (host_name=0x3c009050 "127.0.0.1", port=80,
    sd=0x3c007908, proto=6) at netutils.c:263
#2  0x1c003f22 in my_tcp_connect (host_name=0x3c009050 "127.0.0.1", port=80,
    sd=0x3c007908) at netutils.c:193
#3  0x1c002589 in check_http () at check_http.c:508
#4  0x1c001ba7 in main (argc=3, argv=0xcfbf8db0) at check_http.c:178
#5  0x1c0018f1 in ___start ()
#6  0x1c001867 in _start ()
#7  0xcfbf8ee8 in ?? ()
Error accessing memory address 0x3: Invalid argument.


But.  This isn't a check_http problem:

Program received signal SIGSEGV, Segmentation fault.
0xca3c55a in ?? () from /usr/lib/libc.so.30.1
(gdb) backtrace
#0  0xca3c55a in ?? () from /usr/lib/libc.so.30.1
#1  0x1c0024cb in my_connect (host_name=0xcfbfdce0 "63.227.74.43", port=25,
    sd=0xcfbfd6e8, proto=6) at netutils.c:263
#2  0x1c002382 in my_tcp_connect (host_name=0xcfbfdce0 "63.227.74.43",
    port=25, sd=0xcfbfd6e8) at netutils.c:193
#3  0x1c0015af in main (argc=3, argv=
Error accessing memory address 0x0: Invalid argument.
) at check_smtp.c:119
#4  0x1c001391 in ___start ()
#5  0x1c001307 in _start ()
#6  0xcfbfdc9c in ?? ()
Error accessing memory address 0x3: Invalid argument.

That was from check_smtp.  As soon as I start either service back up and
try again, the plugins behave.  But, if the service is down and I test it,
it SEGVs.

Thoughts?  It looks like netutils.c has something weird going on...

Benny


-- 
"I can't believe it's not carp!"                    -- MXC







More information about the Devel mailing list