Re: [fwd] Assertion failure in mod_fastcgi.c

Stanley Gambarin (gambarin@OpenMarket.com)
Fri, 17 Jan 1997 15:56:29 -0500

Message-Id: <199701172056.PAA12621@u4-138.openmarket.com>
To: gjmurphy@cethsun.princeton.edu
Subject: Re: [fwd] Assertion failure in mod_fastcgi.c 
In-Reply-To: Your message of "Fri, 17 Jan 1997 11:24:30 EST."
             <199701171624.LAA11768@u4-138.openmarket.com> 
Date: Fri, 17 Jan 1997 15:56:29 -0500
From: Stanley Gambarin <gambarin@OpenMarket.com>

> 
> ------- Forwarded Message
> 
> 	My Perl5 fcgi application occasionally causes an assert() to fail in 
> mod_fastcgi, namely:
> 
>     mod_fastcgi.c:1375: 
>     failed assertion `count >= 0 && count <= bufPtr->length'
> 
> Any suggestions?
> 
> - - Gregory Murphy
> 
	Since the errors occur only occasionally and are not 
reproducible, it is hard to analyze the problem and come up with 
the possible fix.  However, I have looked at the code and found that
the error is generated by the BufferToss() routine, which is invoked 
in variety of different places.   After doing a backtrace, I could only
come up with one possible culprit, the fix for which is described below.
If the following fix does not alleviate your problems, please file a more
detailed report with a way to reproduce the problems.
							Thanks, Stanley.

"fix": (since people are using different versions of mod_fastcgi, I will 
just describe a one line fix, instead of doing a diff.)

	at the end of CgiToClientBuffer() routine, locate a call to 
BufferToss() with the following signature:

	BufferToss(infoPtr->inbufPtr, infoPtr->paddingLen); and replace it with
		
	BufferToss(infoPtr->inbufPtr, len);

	If people are still experiencing the problems, please email a more
detailed analysis, as well as ways to reproduce the problem.  The above
change will also make it into next patch release of mod_fastcgi.
-- 
*******************************************************************************
* To unsubscribe from the fastcgi-developers mailing list		      *
* 		mailto: fastcgi-developers-request 		      	      *
*		with body containing: unsubscribe       		      *
* To request help for using the fastcgi-developers mailing list		      *
* 		mailto: fastcgi-developers-request 		      	      *
*		with body containing: help		       		      *
*******************************************************************************

*******************************************************************************
* Stanley Gambarin			Open Market Inc.		      *
* FastCGI (soon-to-be) Guru		245 First St. Cambridge MA 02142      *
*					(617) - 949 - 7487		      *
* mailto:gambarin@openmarket.com					      *
* 				http://acs2.bu.edu:8001/~stanleyg (school)    *
*				mailto:stanleyg@cs.bu.edu		      *
*******************************************************************************