Re: [Nagios-devel] small bug in popen_timeout_alarm_handler() in popen.c
Posted: Fri Feb 17, 2006 7:28 am
On 2/16/06, Andreas Ericsson wrote:
> Jason Crawford wrote:
> > There is a small bug in popen_timeout_alarm_handler() in popen.c where
> > it assumes that the child_process variable actually exists, and I've
> > had it be NULL when the signal got sent, and had check_ping at least
> > core dump. It took me 2 days, but I found the bug and patched it
> > enough so it doesn't segfault anymore if the signal is sent. If
> > someone wants to go further into details about how I got this crash,
> > email me (on list, I'm subscribed), as it doesn't always happen, but I
> > think I found the situation where I can cause that signal to be sent
> > while child_process is NULL. But since accessing a pointer when it can
> > possibly be NULL is always bad, here's the patch that should go in
> > anyways:
> >
>
>
> Nice catch. However, the popen.c file hasn't been used for quite some
> time. Try a recent release and the problem is likely to go away (or
> better yet, use check_icmp which doesn't fork ping to run its check).
>
> This is also the wrong list for nagiosplugin development. You'll have
> better luck at [email protected]
>
I'll subscribe to that list, but this is crashing in
nagios-plugins-1.4.2, which if the site is correct, is the latest
release. And, the default check-host-alive command in
checkcommands.cfg uses check_ping, so maybe you want to change it to
use check_icmp instead. I'll do that myself.
Jason
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
> Jason Crawford wrote:
> > There is a small bug in popen_timeout_alarm_handler() in popen.c where
> > it assumes that the child_process variable actually exists, and I've
> > had it be NULL when the signal got sent, and had check_ping at least
> > core dump. It took me 2 days, but I found the bug and patched it
> > enough so it doesn't segfault anymore if the signal is sent. If
> > someone wants to go further into details about how I got this crash,
> > email me (on list, I'm subscribed), as it doesn't always happen, but I
> > think I found the situation where I can cause that signal to be sent
> > while child_process is NULL. But since accessing a pointer when it can
> > possibly be NULL is always bad, here's the patch that should go in
> > anyways:
> >
>
>
> Nice catch. However, the popen.c file hasn't been used for quite some
> time. Try a recent release and the problem is likely to go away (or
> better yet, use check_icmp which doesn't fork ping to run its check).
>
> This is also the wrong list for nagiosplugin development. You'll have
> better luck at [email protected]
>
I'll subscribe to that list, but this is crashing in
nagios-plugins-1.4.2, which if the site is correct, is the latest
release. And, the default check-host-alive command in
checkcommands.cfg uses check_ping, so maybe you want to change it to
use check_icmp instead. I'll do that myself.
Jason
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]