Internal server error in 2.3.1 = mmap() problem?

Ethan Galstad nagios at nagios.org
Sat May 20 21:06:31 CEST 2006


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...

Alessandro Ren wrote:
> 
>     Ethan,
> 
> that's where status.cgi sometimes crash according to GDB.
> 
> Program received signal SIGBUS, Bus error.
> mmap_fgets (temp_mmapfile=0x828f050) at cgiutils.c:1194
> 1194                    if(*(char *)(temp_mmapfile->mmap_buf+x)=='\n')
> 
>     []s.
> 
> Alessandro Ren wrote:


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