Internal server error in 2.3.1 = mmap() problem?

Ethan Galstad nagios at nagios.org
Sat May 20 21:59:48 CEST 2006


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/nagios-2-x-cvs.tar.gz


Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the Developers mailing list