Page 1 of 1

bug in event broker callbacks during Nagios startup

Posted: Thu Nov 01, 2018 4:39 pm
by eponymousalias
I'm looking at Nagios 4.4.2 code.

main() calls daemon_init() [base/nagios.c, line 614] which in turn
calls broker_program_state() [base/utils.c, line 2026] to make a
NEBTYPE_PROCESS_DAEMONIZE callback. But all of that now happens before
neb_init_callback_list() ever gets called [base/nagios.c, line 667],
let alone any event brokers having been loaded via neb_load_all_modules()
[base/nagios.c, line 708]. So at the time of the call to daemon_init(),
no event broker init functions have yet been called so they could register
to receive the NEBTYPE_PROCESS_DAEMONIZE callback.

It's clear in comparison to Nagios 3.5.1 files that this failure is
due to a bunch of code having been shuffled around, without recognizing
this consequence.

Re: bug in event broker callbacks during Nagios startup

Posted: Fri Nov 02, 2018 3:51 pm
by npolovenko
Hi, @eponymousalias. Would you be able to open a new issue on the Core Github for this problem? That way you will be communicating with the Core developers directly. Here on the support side we mostly help solve support/performance related issues. Here's the link to submit a code issue: https://github.com/NagiosEnterprises/na ... issues/new
Plus please specify what particular problem this issue causes on your Core server.
Thank you!

Re: bug in event broker callbacks during Nagios startup

Posted: Fri Nov 02, 2018 5:08 pm
by eponymousalias
I'm not a Github guy (no account there, don't need or want one).
No doubt you can copy the info here into such a posting there.

This particular issue has not caused a problem in my own usage of Nagios
Core; I found it in the source code while looking for something else.
But one can easily impute from the bug report what problems it might
cause for other folks.

Re: bug in event broker callbacks during Nagios startup

Posted: Mon Nov 05, 2018 10:22 am
by scottwilkerson