> -----Original Message-----
> From: Konstantin Preißer [mailto:kpreis...@apache.org]
> Sent: Saturday, December 14, 2013 1:53 PM
> To: 'Tomcat Developers List'
> Subject: RE: [VOTE] Release Apache Tomcat 8.0.0-RC7
> 
> Hi Mark,
> 
> > -----Original Message-----
> > From: Mark Thomas [mailto:ma...@apache.org]
> > Sent: Thursday, December 12, 2013 12:28 AM
> 
> 
> > > The proposed 8.0.0-RC7 release is:
> > > [ ] Broken - do not release
> > > [ ] Alpha - go ahead and release as 8.0.0-RC7 alpha
> 
> 
> While the issue with large static files that I got with 8.0.0-RC6 is now 
> solved
> when using the http (NIO) connector, I got another problem with
> downloading large files on Tomcat 8.0.0-RC7 when using the AJP NIO
> connector.
> 
> I was using IIS 8.5 on Windows Server 2012 R2 with Java 1.7.0_45 x64, and
> configured the ISAPI Redirector 1.2.37 to forward all requests to Tomcat.
> 
> 
> 1)
> 
> I placed a static file with a size of 208,687,239 bytes into a web 
> application. If I
> request this file over Tomcat's HTTP connector, everything works. But if I
> request it over IIS's HTTP connector (which forwards the request to Tomcat
> over AJP), then the first time I get an download dialog in the browser (I
> canceled it), but Tomcat starts to use ~ 100% CPU in one core. If I request 
> the
> file again, I get lots of OOMs in Tomcat's log:

<snip>

> 2)
> 
> I had an issue today morning (also with Tomcat 8.0.0-RC7) where the ISAPI
> Redirector was only serving empty responses (but with correct headers). The
> raw request/response to IIS looked like this:
> 
> Request:
> GET / HTTP/1.1
> Host: mydomain.de
> Connection: keep-alive
> 
> Response:
> HTTP/1.1 200 OK
> Transfer-Encoding: chunked
> Content-Type: application/xhtml+xml;charset=UTF-8
> Expires: Sat, 01 Jan 2000 00:00:00 GMT
> Server: Microsoft-IIS/8.5
> X-UA-Compatible: IE=edge
> Date: Sat, 14 Dec 2013 10:43:00 GMT
> 
> 0

OK, I could reproduce both 1) and 2) in a local virtual machine running Windows 
Server 2012 R2, IIS 8.5, ISAPI Redirector 1.2.37 and Tomcat 8.0.0-RC7 with Java 
1.7.0_45 x64.

For 1: I could easily reproduce it by trying to download a ~200 MB file in 
Tomcat's ROOT webapp through IIS a few times.

For 2: I could reproduce this by:

1) Setting the ISAPI redirector to allow chunked encoding, then limiting the 
response buffer for the IsapiModule in IIS to 1 byte by using the following 
web.config (otherwise IIS would buffer the whole response from Tomcat before 
starting to send it to the client):

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <handlers>
            <remove name="ISAPI-dll" />
            <add name="ISAPI-dll" path="*.dll" verb="*" modules="IsapiModule" 
resourceType="File" requireAccess="Execute" allowPathInfo="true" 
responseBufferLimit="1" />
        </handlers>
    </system.webServer>
</configuration>

2) Placing a ~ 20 MB file in Tomcat's ROOT webapp.

3) Try to download and cancel this zip file with a slow client a few times (I 
used my own Tcp forwarder tool to intercept the TCP connection between Firefox 
and IIS and to slow down the data transfer).

4) After some time, if I now request Tomcat's ROOT index page 
(http://localhost/), I only get a blank page.

A raw request to IIS shows:

GET / HTTP/1.1
Host: local2
Connection: keep-alive

HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: text/html;charset=UTF-8
Server: Microsoft-IIS/8.5
Date: Sat, 14 Dec 2013 15:30:48 GMT

0

If I do the same request directly to Tomcat's HTTP NIO connector, the response 
is:

GET / HTTP/1.1
Host: local2
Connection: keep-alive

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=UTF-8
Transfer-Encoding: chunked
Date: Sat, 14 Dec 2013 15:31:22 GMT

2000



<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <title>Apache Tomcat/8.0.0-RC7</title>
        <link href="favicon.ico" rel="icon" type="image/x-icon" />
        <link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <link href="tomcat.css" rel="stylesheet" type="text/css" />
    </head>
[rest of index.jsp ...]

So it seems the AJP NIO connector is in some weird state, as the HTTP NIO 
connector is working normally, but AJP only shows an empty content.

I then intercepted the AJP conncetion between the ISAPI redirector and Tomcat's 
AJP connector to record the data that was sent and received.

This is the log of sender channel:

[ID 1] Local connection established from 127.0.0.1:49914.
[ID 1] Data - Offset: 0x0, Count: 0x1A0.
12 34 01 9C 02 02 00 08 48 54 54 50 2F 31 2E 31 00 00 01 2F   
.4.œ....HTTP/1.1.../
00 00 09 31 32 37 2E 30 2E 30 2E 31 00 00 09 31 32 37 2E 30   
...127.0.0.1...127.0
2E 30 2E 31 00 00 06 6C 6F 63 61 6C 32 00 00 50 00 00 08 00   
.0.1...local2..P....
0D 43 61 63 68 65 2D 43 6F 6E 74 72 6F 6C 00 00 09 6D 61 78   
.Cache-Control...max
2D 61 67 65 3D 30 00 A0 06 00 0A 6B 65 65 70 2D 61 6C 69 76   -age=0. 
...keep-aliv
65 00 A0 08 00 01 30 00 A0 01 00 3F 74 65 78 74 2F 68 74 6D   e. ...0. 
..?text/htm
6C 2C 61 70 70 6C 69 63 61 74 69 6F 6E 2F 78 68 74 6D 6C 2B   
l,application/xhtml+
78 6D 6C 2C 61 70 70 6C 69 63 61 74 69 6F 6E 2F 78 6D 6C 3B   
xml,application/xml;
71 3D 30 2E 39 2C 2A 2F 2A 3B 71 3D 30 2E 38 00 00 0F 41 63   
q=0.9,*/*;q=0.8...Ac
63 65 70 74 2D 45 6E 63 6F 64 69 6E 67 00 00 0D 67 7A 69 70   
cept-Encoding...gzip
2C 20 64 65 66 6C 61 74 65 00 00 0F 41 63 63 65 70 74 2D 4C   , 
deflate...Accept-L
61 6E 67 75 61 67 65 00 00 23 64 65 2D 64 65 2C 64 65 3B 71   
anguage..#de-de,de;q
3D 30 2E 38 2C 65 6E 2D 75 73 3B 71 3D 30 2E 35 2C 65 6E 3B   
=0.8,en-us;q=0.5,en;
71 3D 30 2E 33 00 A0 0B 00 06 6C 6F 63 61 6C 32 00 A0 0E 00   q=0.3. ...local2. 
..
48 4D 6F 7A 69 6C 6C 61 2F 35 2E 30 20 28 57 69 6E 64 6F 77   HMozilla/5.0 
(Window
73 20 4E 54 20 36 2E 33 3B 20 57 4F 57 36 34 3B 20 72 76 3A   s NT 6.3; WOW64; 
rv:
32 36 2E 30 29 20 47 65 63 6B 6F 2F 32 30 31 30 30 31 30 31   26.0) 
Gecko/20100101
20 46 69 72 65 66 6F 78 2F 32 36 2E 30 00 03 00 00 00 04 00    
Firefox/26.0.......
00 00 0A 00 0F 41 4A 50 5F 52 45 4D 4F 54 45 5F 50 4F 52 54   
.....AJP_REMOTE_PORT
00 00 05 34 39 39 31 33 00 0A 00 10 4A 4B 5F 4C 42 5F 41 43   
...49913....JK_LB_AC
54 49 56 41 54 49 4F 4E 00 00 03 41 43 54 00 FF               TIVATION...ACT.ÿ
[ID 1] Data forwarding completed.


This is the log of receiver channel:

[ID 1] Remote connection established.
[ID 1] Data - Offset: 0x0, Count: 0x2A.
41 42 00 26 04 00 C8 00 02 4F 4B 00 00 01 A0 01 00 17 74 65   AB.&..È..OK... 
...te
78 74 2F 68 74 6D 6C 3B 63 68 61 72 73 65 74 3D 55 54 46 2D   
xt/html;charset=UTF-
38 00                                                         8.
[ID 1] Data forwarding completed.
[ID 1] Data - Offset: 0x2A, Count: 0x6.
41 42 00 02 05 01                                             AB....
[ID 1] Data forwarding completed.

So, it seems it is Tomcat which does not send any content any more.

If more info is needed to debug the problem, please let me know.


Thanks!

Regards,
Konstantin Preißer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to