Bug 63837 - 7.0.97: TestAbstractAjpProcessor hangs when run with Java 13.0 and NIO.
Summary: 7.0.97: TestAbstractAjpProcessor hangs when run with Java 13.0 and NIO.
Status: RESOLVED DUPLICATE of bug 63814
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Connectors (show other bugs)
Version: trunk
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2019-10-11 12:29 UTC by Konstantin Kolinko
Modified: 2019-10-11 15:07 UTC (History)
0 users

ant_test.log (124.13 KB, text/plain)
2019-10-11 12:31 UTC, Konstantin Kolinko
6852_stack.txt (8.45 KB, text/plain)
2019-10-11 12:33 UTC, Konstantin Kolinko

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Kolinko 2019-10-11 12:29:55 UTC
Testing a release candidate for 7.0.97:

The test TestAbstractAjpProcessor hangs when I run it with Java 13 (13u0 64-bit from Oracle, running on Windows 10) and it uses a NIO connector.

If I kill the hung JVM, it completes normally for other connectors (APR, BIO).

Note: The code was previously run with Java 6 and Java 7 and the tests were compiled by those runs. I am not sure that the code can be compiled with Java 13 as is (I remember seeing failures, not investigated).

1. I see the following error in the stdout/stderr output of Apache Ant:

    [junit] Oct. 11, 2019 3:08:56 AM org.apache.coyote.AbstractProtocol init
    [junit] SEVERE: Failed to initialize end point associated with ProtocolHandler ["ajp-nio-"]
    [junit] java.lang.IllegalArgumentException: timeout < 0
    [junit] 	at java.base/sun.nio.ch.ServerSocketAdaptor.setSoTimeout(ServerSocketAdaptor.java:153)
    [junit] 	at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:477)
    [junit] 	at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:750)
    [junit] 	at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:467)
    [junit] 	at org.apache.catalina.connector.Connector.initInternal(Connector.java:951)
    [junit] 	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
    [junit] 	at org.apache.catalina.core.StandardService.initInternal(StandardService.java:560)
    [junit] 	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
    [junit] 	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:826)
    [junit] 	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
    [junit] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:173)
    [junit] 	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:456)
    [junit] 	at org.apache.catalina.startup.TomcatBaseTest$TomcatWithFastSessionIDs.start(TomcatBaseTest.java:808)

I guess that is the root cause.

2. If I use jstack.exe to get a stacktrace from hanging JVM, I see a single client thread reading from a connection, and no Tomcat instance running.
Comment 1 Konstantin Kolinko 2019-10-11 12:31:47 UTC
Created attachment 36821 [details]

stdout/stderr output of Apache Ant.
Comment 2 Konstantin Kolinko 2019-10-11 12:33:28 UTC
Created attachment 36822 [details]

Stacktrace from a hanging JVM. It was created with the following command:

jstack.exe -l -e 6852 >6852_stack.txt
Comment 3 Konstantin Kolinko 2019-10-11 12:56:52 UTC
To reproduce the issue for smoke testing, the AJP connector must be explicitly configured to use the Nio implementation with


It is not the default implementation of the connector in Tomcat 7.
Comment 4 Remy Maucherat 2019-10-11 15:07:27 UTC
Rainer had reported it before.

*** This bug has been marked as a duplicate of bug 63814 ***