FastCGI & SIGSEGV
Nicholas Lo
nicklo at siliconcreation.com
Sat Oct 28 00:55:39 PDT 2000
Hi everyone,
Recently, I've been experimenting converting MapServer 3.3.011 to FastCGI hoping to boost its performance. I'm using FastCGI 2.2.8 and have the Apache set up. I have tried other FastCGI programs and they just worked fine. However, when I converted the mapserv.c using the code below, I have encountered some problems that I dont know how to solve. Using the code below, I can start mapserv without any problem. However, after one or two requests (i.e. zooming in/out, panning, etc), the mapserv terminate itself suddenly and I got the 'segmentation fault' error. On my gdb, it says 'program received SIGSEGV ... and terminated' and something related to malloc.c as well. It took me one whole week and still couldnt figure out why. I just wonder if anyone can kindly give me some directions. Thanks!!!
int main(int argc, char *argv[]) {
int i,j;
char buffer[1024];
if (FCGX_IsCGI()) {
close(STDIN_FILENO);
close(STDOUT_FILENO);
close(STDERR_FILENO);
FCGX_OpenSocket(":8999", 100);
}
while(FCGI_Accept() >= 0) {
... <the usual mapserv code>
return(0);
} /* End main routine */
Regards,
Nicholas Lo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20001028/927c45b4/attachment.htm>
More information about the MapServer-users
mailing list