You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2021/11/09 20:01:49 UTC
[tomcat] branch 8.5.x updated (4896083 -> 99fc439)
This is an automated email from the ASF dual-hosted git repository.
markt pushed a change to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.
from 4896083 Log warning if a listener is incorrectly placed
new c978389 Fix root cause of APR crash observed in unit tests on Windows
new 99fc439 Make tests more robust
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
java/org/apache/tomcat/util/net/AprEndpoint.java | 4 ++--
test/org/apache/catalina/startup/TomcatBaseTest.java | 2 ++
webapps/docs/changelog.xml | 5 +++++
3 files changed, 9 insertions(+), 2 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[tomcat] 01/02: Fix root cause of APR crash observed in unit tests
on Windows
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit c97838951cb16b1b44b5ebab8d1b4510f83d2654
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Nov 9 18:55:28 2021 +0000
Fix root cause of APR crash observed in unit tests on Windows
---
java/org/apache/tomcat/util/net/AprEndpoint.java | 4 ++--
webapps/docs/changelog.xml | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java
index eda0abf..4d157ce 100644
--- a/java/org/apache/tomcat/util/net/AprEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AprEndpoint.java
@@ -676,10 +676,10 @@ public class AprEndpoint extends AbstractEndpoint<Long> implements SNICallBack {
} catch (Error e) {
if (Status.APR_STATUS_IS_EINVAL(e.getError())) {
log.info(sm.getString("endpoint.poll.limitedpollsize", "" + size));
- return 0;
+ throw new RuntimeException(e);
} else {
log.error(sm.getString("endpoint.poll.initfail"), e);
- return -1;
+ throw new RuntimeException(e);
}
}
}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 57f8993..0e04aa4 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -132,6 +132,11 @@
<pr>457</pr>: Add a <code>toString()</code> method to
<code>MimeHeader</code> to aid debugging. (dblevins)
</add>
+ <fix>
+ Do not ignore the error condition if the APR connector is not able to
+ open a sever socket as continuing in this case will trigger a JVM crash.
+ (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="WebSocket">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[tomcat] 02/02: Make tests more robust
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 99fc439b96feaa91ded6174b26d6ffcbf87daadf
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Nov 9 17:55:06 2021 +0000
Make tests more robust
---
test/org/apache/catalina/startup/TomcatBaseTest.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/org/apache/catalina/startup/TomcatBaseTest.java b/test/org/apache/catalina/startup/TomcatBaseTest.java
index 7349064..3ad7108 100644
--- a/test/org/apache/catalina/startup/TomcatBaseTest.java
+++ b/test/org/apache/catalina/startup/TomcatBaseTest.java
@@ -173,6 +173,8 @@ public abstract class TomcatBaseTest extends LoggingBaseTest {
Assert.assertTrue(connector.setProperty("address", InetAddress.getByName("localhost").getHostAddress()));
// Use random free port
connector.setPort(0);
+ // By default, a connector failure means a failed test
+ connector.setThrowOnFailure(true);
// Mainly set to reduce timeouts during async tests
Assert.assertTrue(connector.setProperty("connectionTimeout", "3000"));
tomcat.getService().addConnector(connector);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org