NagiosEnterprises / nagioscore

Nagios Core
GNU General Public License v2.0
1.56k stars 450 forks source link

Parent nagios process unaware forked child SIGSEGVs #765

Open ssaxnagios opened 4 years ago

ssaxnagios commented 4 years ago

When you start the nagios service a parent process and a child process startup.

If the child SIGSEGVs nagios is technically not working but systemctl shows the daemon as running because the parent process is still running.

You can validate this by doing:

ps -efj | grep nagios.cfg

Then kill the child like so:

kill -SIGSEGV

Now nagios is not working but systemctl status will still show it as running because the parent process is still up.

The parent process would need to have some sort of child process management/monitoring.

sawolf commented 4 years ago

Note for implementation: there may be a way to monitor the child processes in systemd/other init systems and force an error message and/or restart if they die. Since the workers are spawned via fork() at the start of the program, this may be preferable to having a system that checks on the child processes within the daemon.