check_ping is segfaulting

Marco Ramos mramos at co.sapo.pt
Tue Jun 20 13:18:35 CEST 2006


Hi,

On Tue, 2006-06-20 at 11:51 +0100, Alex Moore wrote:
> Hello,
> 
> Nagios mostly works just fine, but I have found that check_ping will
> always crash when it runs against a couple of particular hosts.
> 
> These hosts have IP addresses: 172.25.1.99 and 172.25.1.98. Check ping
> succeeds for all other hosts, but just not these two. If I use the
> hostnames of these machines instead of the IP addresses in the "address"
> field of the host definitions then it works fine as well. I can't see
> any logical reason why check_ping should crash on these two IP addresses
> but nothing else. This is an example of running check_ping from the
> command line:
> 
> # /usr/local/libexec/nagios/check_ping -H 172.25.1.98 -w 100.0,20% -c
> 500.0,60% -p 5
> Segmentation fault (core dumped)
> 
> But most other addresses work:
> 
> # /usr/local/libexec/nagios/check_ping -H 172.19.15.58 -w 100.0,20% -c
> 500.0,60% -p 5
> PING OK - Packet loss = 0%, RTA = 0.44 ms
> # /usr/local/libexec/nagios/check_ping -H 172.25.1.93 -w 100.0,20% -c
> 500.0,60% -p 5
> PING WARNING - Packet loss = 0%, RTA = 170.30 ms
> 
> Note that this is reproducible 100% of the time. And the segfault does
> not occur when using the hostname instead of the IP address.
> 
> I tried a tcpdump of check_ping when it succeeds and when it fails, and

try to strace check_ping (strace -f -o
strace.output /usr/local/libexec/nagios/check_ping -H 172.25.1.98 -w
100.0,20% -c 500.0,60% -p 5). Maybe this will give and idea of what's
happening. I'm guessing that's some kind of issue with libresolve.

HTH,
Marco Ramos

> comparing the two. In both cases it seems to try an AAAA DNS lookup on
> the IP address (which fails, of course, since they are not IPv6
> addresses). In the working scenario, check_ping then sends out its ICMP
> packet direct to the IP address and receives a reply, etc. In the
> segfault scenario check_ping never even sends out an ICMP echo request
> at all. It just waits for a few seconds and then segfaults.
> 
> Anyone know why this might be happening? Obviously, using the hostname
> instead of IP address for these 2 machines is a reasonable workaround,
> but it seems very strange!
> 
> Note: I am using the OpenBSD 3.9 stable packages for nagios, which are
> version 2.0rc2. Was this a known bug in that version which has since
> been fixed?
> 
> 
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
> 



_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list