Re: [Nagios-devel] Internal server error in 2.3.1 = mmap() problem?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Internal server error in 2.3.1 = mmap() problem?

Post by Guest »

Ethan Galstad wrote:
> Aha!
>
> I was thinking that the recent patches to CVS might solve this problem,
> but I doubt they will. A little detective work revealed that a SIGBUS
> interrupt may occur if the underlying file that is mmap()ed is
> truncated. Since the status file is updated regularly, its size may be
> larger or smaller than it was previously, so this could be causing the
> SIGBUS.
>
> Therefore I assume that I should *not* be mmap()ing the following files:
> status, comment, and downtime. Instead, I should be using the standard
> fgets() calls. Can anyone else chime in and verify my suspicion? It
> seems strange that more people have not reported errors, but the
> implementation of mmap() across different systems may prevent this error
> from occuring for others...
>

I have just committed patches to the 2.x and HEAD branches that remove
the mmap() functionality for reading the status, comment, and downtime
files, as I believe this might be the cause of problems.

Alessandro and Eli - Could you test the latest CVS snapshot and see if
the problem appears to be resolved? You can grab the latest CVS
snapshot at the following link:

http://nagios.sourceforge.net/download/ ... cvs.tar.gz


Ethan Galstad,
Nagios Developer
---
Email: [email protected]
Website: http://www.nagios.org





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked