You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Yonts, Richard" <Ri...@am.sony.com> on 2011/08/26 21:45:21 UTC

log_transaction called without corresponding request (no fixups call)

Dev team,

I just finished debugging some code where I was getting segmentation faults.  It turned out that my log_transaction hook ASSUMED that there would always be a corresponding request before it got called.  In fixups, I create a request configuration block and initialize some data.  In log_transaction it uses that data.  However, I discovered that there are some cases where fixups was NOT called but log_transaction was.  To work around, I simply return DECLINED if there is a NULL request config block.  However, I am puzzled as to why this situation would occur.  The affected system is RHEL 4 with Apache at 2.2.19; this does NOT seem to happen on my development Ubuntu system (any version of Ubuntu or Apache).

Thanks,

Rich Yonts
SNEI Production Engineering
Sola fide, sola gratia, solo Christo, Sola Scriptura, et soli Deo Gloria;  ***** ***** **


Re: log_transaction called without corresponding request (no fixups call)

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 8/26/2011 2:45 PM, Yonts, Richard wrote:
> 
> I just finished debugging some code where I was getting segmentationfaults.  It turned out
> that my log_transaction hook ASSUMED that there would always be a corresponding request
> before it got called.  In fixups, I create a request configuration block and initialize
> some data.  In log_transaction it uses that data.  However, I discovered that there are
> some cases where fixups wasNOT called but log_transaction was.  To work around, I simply
> return DECLINED if there is a NULL request config block.  However, I am puzzled as to why
> this situation would occur.  The affected system is RHEL 4 with Apache at 2.2.19; this
> does NOT seem to happen on my development Ubuntu system (any version of Ubuntu or Apache).

Sounds right... any phase other than the handler (including earlier
fixup hooks) are free to abort the request with a failure result and
avoid the fixup/handler phase.

But all incoming requests are ultimately logged.