Bug 49155 - mod_rewrite logging crashes apache 64 bit builds on windows
Summary: mod_rewrite logging crashes apache 64 bit builds on windows
Alias: None
Product: APR
Classification: Unclassified
Component: APR (show other bugs)
Version: 1.4.6
Hardware: PC All
: P2 major with 3 votes (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
Depends on:
Reported: 2010-04-20 08:40 UTC by Arthur Blake
Modified: 2014-01-21 13:00 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Blake 2010-04-20 08:40:56 UTC
Turning on mod_rewrite logging on 64 bit build of apache for windows crashes apache when the first request comes in.

I have verified that turning on logging for mod_rewrite causes 64 bit httpd.exe to crash on both Windows 7 64 bit and Windows Server 2008 R2 64 bit (tested both 2.2.14 and 2.215 versions.)

Here is the fault from the Event Log:

Faulting application name: httpd.exe, version:, time stamp: 0×4b956fd9
Faulting module name: libapr-1.dll, version:, time stamp: 0×4b956f63
Exception code: 0xc0000005
Fault offset: 0×0000000000012b8a
Faulting process id: 0xb78
Faulting application start time: 0×01cad506a527eac9
Faulting application path: C:\Program Files\Apache Software Foundation\Apache2.2\bin\httpd.exe
Faulting module path: C:\Program Files\Apache Software Foundation\Apache2.2\bin\libapr-1.dll
Report Id: e5c38ca9-40f9-11df-97ea-00155d02b107

The mod_rewrite module does work. It’s only when turning on logging for it, that the server crashes as soon as I try to access any resource:

LoadModule rewrite_module modules/mod_rewrite.so
RewriteLog “C:/rewrite.log”
RewriteLogLevel 1

(Unfortunately, there is no official 64 bit build of Apache for windows.  The build I used was from here:  http://www.anindya.com/apache-http-server-2-2-15-x86-and-x64-windows-installers/)
Comment 1 William A. Rowe Jr. 2011-01-19 17:14:35 UTC
http://httpd.apache.org/dev/debugging.html gives general information about
obtaining a backtrace.  With Dr Watson lost at sea, you may need to install
the windbg x64 flavor available from
and then provide a backtrace of where the crash occurred.
Comment 2 Megan 2011-06-07 05:43:07 UTC
I am having the same issue on my development server. (Win 7 Professional x64, Apache 2.2.17)

I would be glad to provide any additional information needed in order to get this problem corrected, but I am not afraid to admit that I am a web developer only: I don't know the first thing about providing a backtrace. If someone could point me in the direction of a comprehensive guide, I'll do my best.
Comment 3 Anindya 2012-02-27 23:37:00 UTC
I figured out that this bug is related to this one - https://issues.apache.org/bugzilla/show_bug.cgi?id=40758.

APR_SIZEOF_VOIDP isn't defined as 8 because of the "#ifdef WIN64" statement preceding "#define APR_SIZEOF_VOIDP 8" in the apr.hw file. It is supposed be "#ifdef _WIN64". There is another "#ifdef WIN64" in apr.hw which should also be changed to "#ifdef _WIN64".
Comment 4 Jeff Trawick 2012-03-01 17:01:55 UTC
Thanks for the fix; committed to APR trunk, and will be merged to 1.5.x and 1.4.x as well.
Comment 5 Jeff Trawick 2012-03-01 17:27:59 UTC
Now in apr 1.4.x branch for the next release after 1.4.6.
Comment 6 Jeff Trawick 2012-03-01 17:29:08 UTC
If anybody needs the particular fix ahead of the next release:
Comment 7 Bose 2013-03-13 06:46:11 UTC
I am experiencing very similar kind of issue (or maybe same issue).

I have installed WAMP for Windows 32-bit in a Win 2008 64-bit server.  When i enabled OpenSSL file configuration in the httpd.conf file, i couldnt start the Apache service on WAMP.  I checked the Event Viewer Application logs and found the below error:-

Faulting application name: httpd.exe, version:, time stamp: 0x4cbbe9e8
Faulting module name: libapr-1.dll, version:, time stamp: 0x4cbbefda
Exception code: 0xc0000005
Fault offset: 0x0000f349
Faulting process id: 0x9f0
Faulting application start time: 0x01ce0b72ddee38c4
Faulting application path: c:\wamp\bin\apache\apache2.2.17\bin\httpd.exe
Faulting module path: c:\wamp\bin\apache\apache2.2.17\bin\libapr-1.dll
Report Id: 1c48d048-7766-11e2-bfb7-00155d646223

libapr-1.dll version is 1.4.2

Is the next release of libapr-1.dll fix this issue?  I tried to complile the src file to get the dll file (source file taken from the SVN above) using Visual Studio version 10, but failed.

Is there a possibility of getting it as 'dll' file to try it out or any other suggestions to fix this ?