Bug 990982 - mod_rewrite problem - restarts Apache on Windows x86_64
mod_rewrite problem - restarts Apache on Windows x86_64
Product: JBoss Enterprise Web Server 2
Classification: JBoss
Component: httpd (Show other bugs)
x86_64 Windows
unspecified Severity medium
: ---
: 2.0.1
Assigned To: Mladen Turk
Libor Fuka
Depends On:
  Show dependency treegraph
Reported: 2013-08-01 06:33 EDT by Libor Fuka
Modified: 2014-01-03 07:58 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-01-03 07:58:21 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Apache logs - debug mode (2.80 KB, application/zip)
2013-08-01 07:18 EDT, Libor Fuka
no flags Details
Httpd backtrace from Win 2008R2 x86_64 attached. (10.48 KB, text/plain)
2013-08-01 08:50 EDT, Libor Fuka
no flags Details
rewrite.conf (194 bytes, text/plain)
2013-08-01 09:12 EDT, Libor Fuka
no flags Details
error_log core modules (6.32 KB, text/plain)
2013-08-01 09:46 EDT, Libor Fuka
no flags Details

  None (edit)
Description Libor Fuka 2013-08-01 06:33:38 EDT
Description of problem:
Its specific problem on Windows x86_64 architecture.
The same steps works fine on Windows i686.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create rewrite.conf in conf.d directory like this (there is a tabulator signbefore test):
<Directory "C:\Program Files\jboss-ews-2.0\var\www\html\rhts>
    RewriteEngine On
    RewriteRule ^path(.*) "	test/"

RewriteLog logs/rewrite_log
RewriteLogLevel 8
2. create directory C:\Program Files\jboss-ews-2.0\var\www\html\rhts
3. start httpd
4. access url in browser: http://localhost/rhts/path
5. you will see "Connection was reset" and in apache error_log you see:
 [notice] Parent: child process exited with status 255 -- Restarting.


Actual results:

Expected results:

Additional info:
Comment 1 Libor Fuka 2013-08-01 06:35:14 EDT
It is <Directory "C:\Program Files\jboss-ews-2.0\var\www\html\rhts">
Comment 4 Libor Fuka 2013-08-01 07:18:32 EDT
Created attachment 781540 [details]
Apache logs - debug mode
Comment 5 Libor Fuka 2013-08-01 08:50:08 EDT
Created attachment 781578 [details]
Httpd backtrace from Win 2008R2 x86_64 attached.
Comment 6 Libor Fuka 2013-08-01 09:12:24 EDT
Created attachment 781580 [details]
Comment 7 Libor Fuka 2013-08-01 09:46:45 EDT
Created attachment 781602 [details]
error_log core modules
Comment 8 Mladen Turk 2013-08-05 03:07:57 EDT
OK, so the problem disappears if you put
RewriteLogLevel 0
(no rewrite logging)

So this means that the error is either inside mod_rewrite logging or inside apr's apr_vprintf function that crashes. Since its only on 32-bit I presume that either some casting (size_t presumed 4 bytes, etc) is wrong or there is a but inside APR.

I'll check both APR and mod_rewrite for changes between our version and confirmed working version (2.2.25) which has different APR version
Comment 9 Mladen Turk 2013-08-05 14:13:05 EDT
Please verify the build:

Seems this was a known bug with APR (ASF's PR 49155)
so the patch already existed in the APR's SVN.
Comment 10 Libor Fuka 2013-08-06 10:29:47 EDT
there should also be built win6.x86_64 application servers zip file because it inculdes apr dlls
Comment 11 Mladen Turk 2013-08-06 10:58:09 EDT

I'll also rebuild tomcat-native because it has apr as compile time dependency. Cannot tell for sure if the pointer size macros are used anywhere but better be safe then sorry.
Comment 13 Libor Fuka 2013-08-07 05:47:07 EDT
VERIFIED on Windows 2008 x86_64 and Windows 2008 R2 x86_64
No regression found.

Note You need to log in before you can comment on or make changes to this bug.