https://bz.apache.org/bugzilla/show_bug.cgi?id=64317

            Bug ID: 64317
           Summary: org.apache.tomcat.util.net.TestSsl testPost() test
                    failing on Windows
           Product: Tomcat 9
           Version: 9.0.x
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: knst.koli...@gmail.com
  Target Milestone: -----

Testing release candidate of Tomcat 9.0.34 on Windows, I see failures in
org.apache.tomcat.util.net.TestSsl - one test case is failing: testPost()

I was testing with Java 8 (AdoptOpenJDK 8u242 64-bit),
and out of 12 runs I see
- with NIO2 connector it failed in 4 runs in 2 distinct ways (1 + 3)
- with APR connector it failed in 1 run
- with NIO connector no issues notes.

The "testPost()" is a new test case in TestSsl, added a month ago (see commit
489d07c6150746f8e30cc680d0a8128fb964905e from 2020-03-04, with later
improvements to the test).

---
As far as I understand, the "testPost()" test does the following:

1. It starts 8 threads.

2. Each thread opens an TLS connection, makes a POST request and writes 16Mb of
data in a loop, writing a 128 Kb buffer on each iteration and sleeping 10ms
between iterations.

3. At the server a Servlet read the request data into a ByteArrayOutputStream
in memory, and once all data is read it echoes all of the data as a response at
once.

(The initial size of ByteArrayOutputStream is not specified, so it grows from
32 bytes to 16 Mb as the data are read. Maybe there is some gc activity caused
by that growth).

4. Once all data is written, the thread starts reading the response from the
server, comparing it with the data that it has written.

5. Once an error occurs (a mismatch between request and response, or an
IOException), it is logged to System.err, and a counter is incremented.

An assertion checks that the counter is zero when the test ends. If it is not,
the test fails, and the actual error should be looked up in the System.err
output.
---

I will attach log output for each observed type of a failure, with some
comments.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to