problem with cgiutils.c on solaris 10?

Ethan Galstad nagios at nagios.org
Fri May 19 19:06:19 CEST 2006


Brian Peterson wrote:
> I'm having a problem getting the avail.cgi and trend.cgi scripts working 
> on Solaris 10.  They both seem to seg fault while processing the archive 
> logs in a memcpy function found in cgiutils.c.  Has anyone else seen 
> this or know how to get around this problem?  The problem seems to exist 
> in 2.0 as well as 2.3.
> 
> Here's a quick dbx trace of the seg fault.
> 
> #244  dbx avail.cgi
> For information about new features see `help changes'
> To remove this message, put `dbxenv suppress_startup_message 7.5' in 
> your .dbxrcReading avail.cgi
> Reading ld.so.1
> Reading librt.so.1
> Reading libc.so.1
> Reading libaio.so.1
> Reading libmd5.so.1
> (dbx) run
> Running: avail.cgi
> (process id 8256)
> Cache-Control: no-store
> Pragma: no-cache
> Last-Modified: Tue, 09 May 2006 23:39:55 GMT
> Expires: Thu, 01 Jan 1970 00:00:00 GMT
> Content-type: text/html
> 
[snip]
> signal SEGV (no mapping at the fault address) in _memcpy at 0xfeed43f2
> 0xfeed43f2: _memcpy+0x0032:     movb     0x00000002(%esi),%cl
> Current function is mmap_fgets
> 1206           memcpy(buf,(char 
> *)(temp_mmapfile->mmap_buf+temp_mmapfile->current_position),len);
> (dbx) where
>   [1] _memcpy(0x8047780, 0x80661dd, 0x8774cc8, 0xfebd5fbe), at 0xfeed43f2
> =>[2] mmap_fgets(temp_mmapfile = 0x8147380), line 1206 in "cgiutils.c"
>   [3] scan_log_file_for_archived_state_data(filename = 0x8047090 
> "/opt/nagios/var/archives/nagios-05-08-2006-00.log"), line 2911 in 
> "avail.c"
>   [4] read_archived_state_data(), line 2878 in "avail.c"
>   [5] main(argc = 1, argv = 0x80477c4), line 994 in "avail.c"
> 
> 
> Brian Peterson
> brian at kaostech.com
> 

Is anyone else experiencing this problem?  Perhaps the problem lies with 
the pointer arithmetic, although I'm not sure.


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