ср, 10 апр. 2019 г. в 20:22, Mark Thomas <ma...@apache.org>:
>
> The proposed Apache Tomcat 7.0.94 release is now available for voting.
>

The following test is failing for me:

TEST-org.apache.catalina.core.TestSwallowAbortedUploads.BIO.txt
TEST-org.apache.catalina.core.TestSwallowAbortedUploads.NIO.txt

Details are below.
All other tests are OK, with several known failures with Java 6 (thus
far I run the whole testsuite with Java 6 and Java 7).

I tested on Windows 10, using Java 6 (6u45 32-bit), 7 (7u80 32-bit), 8
(8u202 64-bit),
Testing with APR connector shows no failures, the test succeeds.

I enabled debug logging in the test by setting
org.apache.catalina.core.TestSwallowAbortedUploads.level = FINE


1) The following test case method fais with NIO and BIO.

Testcase: testAbortedUploadLimitedNoSwallow took 0,499 sec
    FAILED
Limited upload with swallow disabled does not generate client exception
junit.framework.AssertionFailedError: Limited upload with swallow
disabled does not generate client exception
    at 
org.apache.catalina.core.TestSwallowAbortedUploads.testAbortedUploadLimitedNoSwallow(TestSwallowAbortedUploads.java:129)

Debug logging:

апр 11, 2019 5:22:28 PM
org.apache.catalina.core.TestSwallowAbortedUploads$AbortedUploadServlet
doPost
FINE: IllegalStateException during getParts()
апр 11, 2019 5:22:28 PM
org.apache.catalina.core.TestSwallowAbortedUploads doAbortedUploadTest
FINE: Response line: HTTP/1.1 500 Internal Server Error
апр 11, 2019 5:22:28 PM
org.apache.catalina.core.TestSwallowAbortedUploads doAbortedUploadTest
FINE: Response headers: [Server: Apache-Coyote/1.1, Content-Type:
text/plain;charset=ISO-8859-1, Transfer-Encoding: chunked, Date: Thu,
11 Apr 2019 14:22:28 GMT, Connection: close]
апр 11, 2019 5:22:28 PM
org.apache.catalina.core.TestSwallowAbortedUploads doAbortedUploadTest
FINE: Response body: 28IllegalStateException during getParts()0

2) The following test case fails with NIO and Java 7, Java 8.
For some reason it runs successfully with Java 6.

Testcase: testAbortedPOST413NoSwallow took 0,431 sec
    FAILED
Limited upload with swallow disabled does not generate client exception
junit.framework.AssertionFailedError: Limited upload with swallow
disabled does not generate client exception
    at 
org.apache.catalina.core.TestSwallowAbortedUploads.testAbortedPOST413NoSwallow(TestSwallowAbortedUploads.java:175)

Debug logging:

апр 11, 2019 5:22:44 PM
org.apache.catalina.core.TestSwallowAbortedUploads doAbortedPOSTTest
FINE: Response line: HTTP/1.1 413 Request Entity Too Large
апр 11, 2019 5:22:44 PM
org.apache.catalina.core.TestSwallowAbortedUploads doAbortedPOSTTest
FINE: Response headers: [Server: Apache-Coyote/1.1, Content-Type:
text/plain;charset=UTF-8, Transfer-Encoding: chunked, Date: Thu, 11
Apr 2019 14:22:43 GMT, Connection: close]
апр 11, 2019 5:22:44 PM
org.apache.catalina.core.TestSwallowAbortedUploads doAbortedPOSTTest
FINE: Response body: 2OK0

3) The following message was logged once:

апр 11, 2019 5:22:34 PM
org.apache.catalina.core.TestSwallowAbortedUploads$AbortedUploadServlet
doPost
SEVERE: Exception during getParts()
java.io.IOException: The temporary upload location
[*SKIPPED*\apache-tomcat-7.0.94-src\output\test-tmp\work\Tomcat\localhost\_]
is not valid
    at org.apache.catalina.connector.Request.parseParts(Request.java:2888)
    at org.apache.catalina.connector.Request.getParts(Request.java:2820)
    at 
org.apache.catalina.connector.RequestFacade.getParts(RequestFacade.java:1075)
    at 
org.apache.catalina.core.TestSwallowAbortedUploads$AbortedUploadServlet.doPost(TestSwallowAbortedUploads.java:193)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
    at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
    at 
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1137)
    at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
    at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:317)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

It resulted in the following test failure:

Testcase: testAbortedUploadUnlimitedNoSwallow took 0,551 sec
    FAILED
Unlimited upload with swallow disabled returns error status code
junit.framework.AssertionFailedError: Unlimited upload with swallow
disabled returns error status code
    at 
org.apache.catalina.core.TestSwallowAbortedUploads.testAbortedUploadUnlimitedNoSwallow(TestSwallowAbortedUploads.java:107)

and debug logging:

апр 11, 2019 5:22:34 PM
org.apache.catalina.core.TestSwallowAbortedUploads doAbortedUploadTest
FINE: Response line: HTTP/1.1 500 Internal Server Error
апр 11, 2019 5:22:34 PM
org.apache.catalina.core.TestSwallowAbortedUploads doAbortedUploadTest
FINE: Response headers: [Server: Apache-Coyote/1.1, Content-Type:
text/plain;charset=ISO-8859-1, Transfer-Encoding: chunked, Date: Thu,
11 Apr 2019 14:22:34 GMT, Connection: close]
апр 11, 2019 5:22:34 PM
org.apache.catalina.core.TestSwallowAbortedUploads doAbortedUploadTest
FINE: Response body: a6java.io.IOException: The temporary upload
location 
[*SKIPPED*\apache-tomcat-7.0.94-src\output\test-tmp\work\Tomcat\localhost\_]
is not valid0

Request.java:2888 is

            if (!location.isDirectory()) {

parameters.setParseFailedReason(FailReason.MULTIPART_CONFIG_INVALID);
                partsParseException = new IOException(
                        sm.getString("coyoteRequest.uploadLocationInvalid",
                                location));
                return;
            }

My guess is that the "work" directory is created and deleted
repeatedly during test runs, and its re-creation failed. In this case
the code generates an IOException. It is not related to
IllegalStateException in the failures above.

4) I did not observe these failures when I tested Tomcat 7.0.93.
Buildbot and Gump do not reproduce them either.


Best regards,
Konstantin Kolinko

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

Reply via email to