[FASTCGI] lighttpd+fastcgi: the process of test.fcgi will become zombie( <defunct>).

CHENG LIANG liangcheng001 at hotmail.com
Mon Nov 1 12:24:20 EDT 2010




Hi, 

I have the problem for fastcgi and I can not figure out the
root cause.

 

I wrote fast cgi process in C using fcgi_stdio package under
lighttpd under linux 2.6.31. Suppose we call this fastcgi process as test.fcgi. In the test.fcgi,
I need periodically load some data into the memory (suppose it is function
data_load()) and I create a thread for it using pthread library because I do not
want to interrupt the service from test.fcgi. And the data in memory is in the
hash table which I use implementation from GLIB.and I use Alarm signal in the
test.fcgi to set up a timer to trigger the event to load data into memory. The
problem I have is that every time when Alarm signal send to test.fcgi, the process
of test.fcgi will become zombie( <defunct>).

 

 

The following tests have been done and I still have no idea
what is root cause.

 

Remove the pthread_create call and directly call function
data_load(), the problem still there.

 

Using different way to set up a timer, like, using function alarm(),
or using function setitimer(), the problem still there.

 

And if I do not operate memory in the function data_load(),
for example, make function data_load() empty, then the problem is gone.

 

 

>From the error.log of lighttpd, when test.fcgi becomes
defunct, there is no any message in it and after that, when I issue http
request to the test.fcgi service, I will have the following message in the
error.log and new process of test.fcgi will be created.

 

2010-11-01 12:09:23: (mod_fastcgi.c.1768) connect failed:
Connection refused on unix:/tmp/fastcgi.socket-0

2010-11-01 12:09:23: (mod_fastcgi.c.2956) backend died;
we'll disable it for 5 seconds and send the request to another backend instead:
reconnects: 0 load: 1

2010-11-01 12:09:23: (mod_fastcgi.c.2722) child signaled: 11

 

 

Since the signal 11 is SIGSEGV, so it looks like to me that
the problem is memory access in function data_load(). Is this idea making
sense?

 

 

Thanks a lot for any help.



Cheng Liang

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.pins.net/mailman/private.cgi/fastcgi-developers/attachments/20101101/b9b623a5/attachment.html>


More information about the FastCGI-developers mailing list