[Nagiosplug-devel] segfault in patched check_ping
GUILLON Gabriel
gabriel.guillon at c-s.fr
Mon Oct 22 17:27:11 CEST 2007
Hi,
I'm using nagios-plugins-1.4.3. I wanted check_ping to ping from an
aliased interface.
For example:
My eth0 has ip 10.0.0.1 and 10.0.0.2, and I want the ping to come from
10.0.0.2.
So I (horribly) hacked check_ping.c to use the -I function of /bin/ping.
Patch is provided in attachment.
But the problem is that from then check_ping randomly segfault. When
launched as fast as possible (in a shell 'while true; do' loop, pinging
an unreachable ip so falling in timeout after 6 seconds) it segfault in
average every 15 minutes (but it can not segfault during more than one
houre, and segfault every 2 minutes during 10 minutes)
As check_ping didn't core dump, I hacked it to make it core (as seen in
the patch). I caught the core, but nothing is visible in the gdb (I must
mention that I compile on a machine and using it on an other. Both are
the same OS (Mandriva) with the same versions of libs).
So I tried to link it statically and hope seeing something in gdb...
I must say that my C skills are pretty crap :)
Could someone help me finding what happens? Or indicating me an other
way to achieve want I want to do (ping from a different ip) ?
Thanks
--
Gabriel Guillon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_ping.patch
Type: text/x-patch
Size: 3488 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20071022/796f6faa/attachment.bin>
More information about the Devel
mailing list