[Nagiosplug-devel] segfault in patched check_ping
gabriel.guillon at c-s.fr
Mon Oct 22 11:07:23 CEST 2007
I'm using nagios-plugins-1.4.3. I wanted check_ping to ping from an
My eth0 has ip 10.0.0.1 and 10.0.0.2, and I want the ping to come from
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) ?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3487 bytes
Desc: not available
More information about the Devel