Bug 990982

Summary: mod_rewrite problem - restarts Apache on Windows x86_64
Product: [JBoss] JBoss Enterprise Web Server 2 Reporter: Libor Fuka <lfuka>
Component: httpdAssignee: Mladen Turk <mturk>
Status: CLOSED CURRENTRELEASE QA Contact: Libor Fuka <lfuka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.0.1CC: jclere, jdoyle, pslavice, rsvoboda
Target Milestone: ---   
Target Release: 2.0.1   
Hardware: x86_64   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-03 12:58:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Apache logs - debug mode
none
Httpd backtrace from Win 2008R2 x86_64 attached.
none
rewrite.conf
none
error_log core modules none

Description Libor Fuka 2013-08-01 10:33:38 UTC
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(.*) "http://127.0.0.1/	test/"
</Directory>

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.

3.

Actual results:


Expected results:


Additional info:

Comment 1 Libor Fuka 2013-08-01 10:35:14 UTC
It is <Directory "C:\Program Files\jboss-ews-2.0\var\www\html\rhts">

Comment 4 Libor Fuka 2013-08-01 11:18:32 UTC
Created attachment 781540 [details]
Apache logs - debug mode

Comment 5 Libor Fuka 2013-08-01 12:50:08 UTC
Created attachment 781578 [details]
Httpd backtrace from Win 2008R2 x86_64 attached.

Comment 6 Libor Fuka 2013-08-01 13:12:24 UTC
Created attachment 781580 [details]
rewrite.conf

Comment 7 Libor Fuka 2013-08-01 13:46:45 UTC
Created attachment 781602 [details]
error_log core modules

Comment 8 Mladen Turk 2013-08-05 07:07:57 UTC
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 18:13:05 UTC
Please verify the build:
http://download.devel.redhat.com/brewroot/packages/jboss-ews-httpd/2.0.1/9.win6/win/jboss-ews-httpd-2.0.1-9.win6.x86_64.zip

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 14:29:47 UTC
there should also be built win6.x86_64 application servers zip file because it inculdes apr dlls

Comment 11 Mladen Turk 2013-08-06 14:58:09 UTC
Correct.

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 09:47:07 UTC
VERIFIED on Windows 2008 x86_64 and Windows 2008 R2 x86_64
No regression found.