Memory leaks in Nagios Core 4.3.4

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Memory leaks in Nagios Core 4.3.4

Postby vlakshman » Wed Feb 06, 2019 6:23 am

Hi Guys,

Am using Nagios 4.3.4 which works fine most of the time but on odd occasions end up with errors seen below.

Nagios logs

(Return code of 12 is out of bounds : (No output on stdout) stderr: execvp(python, ...) failed. errno is 12: Cannot allocate memory))

(Return code of 7 is out of bounds : (No output on stdout) stderr: execvp(python, ...) failed. errno is 7: Argument list too long))

(Return code of 127 is out of bounds - plugin may be missing : (No output on stdout) stderr: python: error while loading shared libraries: libdl.so.2: cannot create shared object descriptor: Cannot allocate memory))
(Return code of 127 is out of bounds - plugin may be missing : (No output on stdout) stderr: python: error while loading shared libraries: libc.so.6: cannot create shared object descriptor: Cannot allocate memory))
(Return code of 127 is out of bounds - plugin may be missing : (No output on stdout) stderr: python: error while loading shared libraries: cannot allocate symbol search list: Cannot allocate memory))
(Return code of 127 is out of bounds - plugin may be missing : (No output on stdout) stderr: python: error while loading shared libraries: libc.so.6: cannot map zero-fill pages: Cannot allocate memory))
(Return code of 127 is out of bounds - plugin may be missing : (No output on stdout) stderr: python: error while loading shared libraries: cannot allocate symbol search list: Cannot allocate memory))
(Return code of 127 is out of bounds - plugin may be missing : (No output on stdout) stderr: python: error while loading shared libraries: libdl.so.2: failed to map segment from shared object: Cannot allocate memory))



httpd logs look like below

[Tue Feb 05 17:03:20.477479 2019] [cgi:error] [pid 17656] (12)Cannot allocate memory: [client 209.78.42.241:62962] couldn't create child process: 12: tac.cgi
[Tue Feb 05 17:03:20.479178 2019] [cgi:error] [pid 17656] (12)Cannot allocate memory: [client 209.78.42.241:62962] AH01223: couldn't spawn child process: /usr/lib64/nagios/cgi-bin/tac.cgi
[Tue Feb 05 17:20:32.064283 2019] [cgi:error] [pid 29369] (12)Cannot allocate memory: [client 209.78.42.241:53292] couldn't create child process: 12: status.cgi
[Tue Feb 05 17:20:32.066149 2019] [cgi:error] [pid 29369] (12)Cannot allocate memory: [client 209.78.42.241:53292] AH01223: couldn't spawn child process: /usr/lib64/nagios/cgi-bin/status.cgi
[Tue Feb 05 17:20:32.073165 2019] [cgi:error] [pid 11652] (12)Cannot allocate memory: [client 223.237.224.147:17725] couldn't create child process: 12: status.cgi
[Tue Feb 05 17:20:32.073269 2019] [cgi:error] [pid 11652] (12)Cannot allocate memory: [client 223.237.224.147:17725] AH01223: couldn't spawn child process: /usr/lib64/nagios/cgi-bin/status.cgi


Any thoughts?
vlakshman
 
Posts: 13
Joined: Tue Aug 21, 2018 11:03 am

Re: Memory leaks in Nagios Core 4.3.4

Postby benjaminsmith » Wed Feb 06, 2019 12:00 pm

Hello @vlakshman,

The current version is 4.4.3 and there have been many improvements. I would recommend upgrading to the latest version.

How to Upgrade Nagios Core
https://assets.nagios.com/downloads/nag ... ading.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
benjaminsmith
 
Posts: 710
Joined: Wed Aug 22, 2018 4:39 pm

Re: Memory leaks in Nagios Core 4.3.4

Postby vlakshman » Thu Feb 07, 2019 6:31 am

Hey Benjaminsmith,

Thanks for your reply!

1) Are the errors reported by me are truly Memory Leaks in Nagios?
2) If yes, is there a way of knowing what's causing it?
3) All these memory related error occur occasionally and I don't see a pattern.

Thanks again!
vlakshman
 
Posts: 13
Joined: Tue Aug 21, 2018 11:03 am

Re: Memory leaks in Nagios Core 4.3.4

Postby benjaminsmith » Thu Feb 07, 2019 1:18 pm

Hello @vlakshman,

You can view the changelog for Nagios Core here:
https://github.com/NagiosEnterprises/na ... /Changelog

I would start by enabling debugging and debug verbosity, then review or tail the log files.
Debug Level
Format: debug_level=<#>
Example: debug_level=24
This option determines what type of information Nagios should write to the debug_file. This value is a logical OR of the values below.
-1 = Log everything
0 = Log nothing (default)
1 = Function enter/exit information
2 = Config information
4 = Process information
8 = Scheduled event information
16 = Host/service check information
32 = Notification information
64 = Event broker information

Refer to the documentation for the Nagios Core configuration file:
https://assets.nagios.com/downloads/nag ... gmain.html

When debugging is enabled you can watch the log live.
Code: Select all
tail -f /usr/local/nagios/var/nagios.debug

Please note that I'm not aware any memory leaks in the current version, and these types of issues are difficult to replicate and debug.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
benjaminsmith
 
Posts: 710
Joined: Wed Aug 22, 2018 4:39 pm


Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 12 guests