Re: [VOTE] Release Apache Tomcat 10.1.0-M7
On Mon, Nov 8, 2021 at 10:59 PM Mark Thomas wrote: > > The proposed Apache Tomcat 10.1.0-M7 release is now available for > voting. > > Applications that run on Tomcat 9 and earlier will not run on Tomcat 10 > without changes. Java EE applications designed for Tomcat 9 and earlier > may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat > will automatically convert them to Jakarta EE and copy them to the > webapps directory. > > The notable changes compared to 10.1.0-M6 are: > > > - Servlet API updates for Servlet 6 including refactoring >HttpServlet.doHead(), support for generic attributes on Cookies, more >consistent URI handling including an option to reject 'suspicious' >URIs > > - EL API updates for EL 5.0 including changes to ELResolver.getType() > > - Experimental OpenSSL support through the Panama API incubating in Java >17, with support for OpenSSL 1.1+ Now that the basics seem to be working, there's an opportunity for people interested to have a look at implementing a lot more of the OpenSSL features. This is a lot more practical than with tomcat-native, which needs a forced update of the native component to happen before you can do anything. Impractical at best. > For full details, see the changelog: > https://ci.apache.org/projects/tomcat/tomcat-10.1.x/docs/changelog.html > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-10/v10.1.0-M7/ > > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-1338 > > The tag is: > https://github.com/apache/tomcat/tree/10.1.0-M7 > 0f3f1e439a040068b741d7766722e4420ad6 > The proposed 10.1.0-M7 release is: > [ ] Broken - do not release > [X] Alpha - go ahead and release as 10.1.0-M7 (alpha) Rémy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Fix changelog entry
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 48df7be Fix changelog entry 48df7be is described below commit 48df7be04c8b2654c8673acfcaecb8c05ba85c11 Author: remm AuthorDate: Tue Nov 9 10:00:17 2021 +0100 Fix changelog entry --- webapps/docs/changelog.xml | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 42c92bd..5576ac4 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -166,6 +166,12 @@ 457: Add a toString() method to MimeHeader to aid debugging. (dblevins) + +Add experimental OpenSSL support through the Panama API incubating in +Java 17, with support for OpenSSL 1.1+. This no longer requires +tomcat-native or APR. Please refer to the openssl-java17 +module for more details. (remm) + @@ -192,12 +198,6 @@ Servlet API. The new approach synchronizes the service() method. - -Add experimental OpenSSL support through the Panama API incubating in -Java 17, with support for OpenSSL 1.1+. This no longer requires -tomcat-native or APR. Please refer to the openssl-java17 -module for more details. (remm) - - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.0.x updated: Add the changelog for the new module
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.0.x by this push: new f4a128d Add the changelog for the new module f4a128d is described below commit f4a128ddbbaeb91b255658aa363ad26148578d1a Author: remm AuthorDate: Tue Nov 9 10:02:01 2021 +0100 Add the changelog for the new module It is usable in all branches. --- webapps/docs/changelog.xml | 6 ++ 1 file changed, 6 insertions(+) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 137dc82..a8d8c62 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -137,6 +137,12 @@ 457: Add a toString() method to MimeHeader to aid debugging. (dblevins) + +Add experimental OpenSSL support through the Panama API incubating in +Java 17, with support for OpenSSL 1.1+. This no longer requires +tomcat-native or APR. Please refer to the openssl-java17 +module from the main branch for more details. (remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated: Add the changelog for the new module
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new 8b445be Add the changelog for the new module 8b445be is described below commit 8b445beb59d71a939dab30bba75b74a74c9c6f44 Author: remm AuthorDate: Tue Nov 9 10:02:01 2021 +0100 Add the changelog for the new module It is usable in all branches. --- webapps/docs/changelog.xml | 6 ++ 1 file changed, 6 insertions(+) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 74cd374..a271d97 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -137,6 +137,12 @@ 457: Add a toString() method to MimeHeader to aid debugging. (dblevins) + +Add experimental OpenSSL support through the Panama API incubating in +Java 17, with support for OpenSSL 1.1+. This no longer requires +tomcat-native or APR. Please refer to the openssl-java17 +module from the main branch for more details. (remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [tomcat] branch 9.0.x updated: Add the changelog for the new module
On Tue, Nov 9, 2021 at 10:03 AM wrote: > > This is an automated email from the ASF dual-hosted git repository. > > remm pushed a commit to branch 9.0.x > in repository https://gitbox.apache.org/repos/asf/tomcat.git > > > The following commit(s) were added to refs/heads/9.0.x by this push: > new 8b445be Add the changelog for the new module > 8b445be is described below > > commit 8b445beb59d71a939dab30bba75b74a74c9c6f44 > Author: remm > AuthorDate: Tue Nov 9 10:02:01 2021 +0100 > > Add the changelog for the new module > > It is usable in all branches.* *: Except Tomcat 8.5.x, as it turns out, due to incompatible API changes in SSLHostConfig. I was too optimistic ;) Rémy Rémy > --- > webapps/docs/changelog.xml | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml > index 74cd374..a271d97 100644 > --- a/webapps/docs/changelog.xml > +++ b/webapps/docs/changelog.xml > @@ -137,6 +137,12 @@ > 457: Add a toString() method to > MimeHeader to aid debugging. (dblevins) > > + > +Add experimental OpenSSL support through the Panama API incubating in > +Java 17, with support for OpenSSL 1.1+. This no longer requires > +tomcat-native or APR. Please refer to the openssl-java17 > +module from the main branch for more details. (remm) > + > > > > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.0.x updated: Align with 10.1.x (few minor fixes)
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.0.x by this push: new aa6d5c8 Align with 10.1.x (few minor fixes) aa6d5c8 is described below commit aa6d5c89fcf8be2c9a58b7109c775cd613d3f2b0 Author: Mark Thomas AuthorDate: Tue Nov 9 09:26:43 2021 + Align with 10.1.x (few minor fixes) --- build.properties.default | 2 +- build.xml| 6 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/build.properties.default b/build.properties.default index dff0e11..d353e2f 100644 --- a/build.properties.default +++ b/build.properties.default @@ -331,7 +331,7 @@ migration-lib.loc=${base-maven.loc}/org/apache/tomcat/jakartaee-migration/${migr jsign.version=4.0 # checksums for JSign 4.0 -jsign.checksum.enable=true +jsign.checksum.enabled=true jsign.checksum.algorithm=MD5|SHA-1 jsign.checksum.value=50982facf864df4f08a051b43f7d2e42|3d203fbffdc45e837f98b7c9c5d311b615661a75 diff --git a/build.xml b/build.xml index 3909a9c..707515f 100644 --- a/build.xml +++ b/build.xml @@ -1990,8 +1990,6 @@ - - +/> +/> - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
APR crashes when running tests on Windows
All, I am seeing some fairly consistent crashes when running the APR tests on Windows for 10.0.x. I'm going to spend some time trying to track down the root cause before I tag the next 10.0.x release. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Log warning if a listener is incorrectly placed
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 322a9ab Log warning if a listener is incorrectly placed 322a9ab is described below commit 322a9aba6f891f0e11e2aea8fb99894b595e07a0 Author: Michael Osipov AuthorDate: Mon Nov 8 20:39:09 2021 +0100 Log warning if a listener is incorrectly placed Some listeners are intented to be nested inside a Server element only. If a listener is misplaced a warning message is logged. --- java/org/apache/catalina/core/AprLifecycleListener.java | 4 .../org/apache/catalina/core/JreMemoryLeakPreventionListener.java | 4 java/org/apache/catalina/core/LocalStrings.properties | 2 ++ .../apache/catalina/mbeans/GlobalResourcesLifecycleListener.java | 4 java/org/apache/catalina/mbeans/LocalStrings.properties | 2 ++ java/org/apache/catalina/security/LocalStrings.properties | 2 ++ java/org/apache/catalina/security/SecurityListener.java | 4 java/org/apache/catalina/startup/LocalStrings.properties | 1 + java/org/apache/catalina/startup/VersionLoggerListener.java | 4 java/org/apache/catalina/storeconfig/LocalStrings.properties | 2 +- .../apache/catalina/storeconfig/StoreConfigLifecycleListener.java | 8 +--- webapps/docs/changelog.xml| 8 12 files changed, 41 insertions(+), 4 deletions(-) diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java b/java/org/apache/catalina/core/AprLifecycleListener.java index d92ac14..285abf9 100644 --- a/java/org/apache/catalina/core/AprLifecycleListener.java +++ b/java/org/apache/catalina/core/AprLifecycleListener.java @@ -121,6 +121,10 @@ public class AprLifecycleListener implements LifecycleListener { if (Lifecycle.BEFORE_INIT_EVENT.equals(event.getType())) { synchronized (lock) { +if (!(event.getLifecycle() instanceof Server)) { +log.warn(sm.getString("listener.notServer", +event.getLifecycle().getClass().getSimpleName())); +} init(); for (String msg : initInfoLogMessages) { log.info(msg); diff --git a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java index 47c5624..4206ff7 100644 --- a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java +++ b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java @@ -107,6 +107,10 @@ public class JreMemoryLeakPreventionListener implements LifecycleListener { public void lifecycleEvent(LifecycleEvent event) { // Initialise these classes when Tomcat starts if (Lifecycle.BEFORE_INIT_EVENT.equals(event.getType())) { +if (!(event.getLifecycle() instanceof Server)) { +log.warn(sm.getString("listener.notServer", +event.getLifecycle().getClass().getSimpleName())); +} /* * First call to this loads all drivers visible to the current class diff --git a/java/org/apache/catalina/core/LocalStrings.properties b/java/org/apache/catalina/core/LocalStrings.properties index 345d197..80dbc79 100644 --- a/java/org/apache/catalina/core/LocalStrings.properties +++ b/java/org/apache/catalina/core/LocalStrings.properties @@ -142,6 +142,8 @@ jniLifecycleListener.missingPathOrName=One of libraryName or libraryPath must be jreLeakListener.classToInitializeFail=Failed to load class [{0}] during Tomcat start to prevent possible memory leaks. +listener.notServer=This listener must only be nested within Server elements, but is in [{0}]. + naming.addEnvEntry=Adding environment entry [{0}] naming.addResourceEnvRef=Adding resource env ref [{0}] naming.bindFailed=Failed to bind object: [{0}] diff --git a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java index d6d7506..4f2f2dc 100644 --- a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java +++ b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java @@ -74,6 +74,10 @@ public class GlobalResourcesLifecycleListener implements LifecycleListener { public void lifecycleEvent(LifecycleEvent event) { if (Lifecycle.START_EVENT.equals(event.getType())) { +if (!(event.getLifecycle() instanceof Server)) { +log.warn(sm.getString("listener.notServer", +event.getLifecycle().getClass().getSimpleName())); +} component = event.getLifecycle(); createMBeans(); } else if (Lifecycle.STOP_EVENT.equals(ev
[tomcat] branch 10.0.x updated: Log warning if a listener is incorrectly placed
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.0.x by this push: new 85f41ba Log warning if a listener is incorrectly placed 85f41ba is described below commit 85f41ba9f76c719f4d17c54c6bd88393f17993c2 Author: Michael Osipov AuthorDate: Mon Nov 8 20:39:09 2021 +0100 Log warning if a listener is incorrectly placed Some listeners are intented to be nested inside a Server element only. If a listener is misplaced a warning message is logged. --- java/org/apache/catalina/core/AprLifecycleListener.java | 4 .../org/apache/catalina/core/JreMemoryLeakPreventionListener.java | 4 java/org/apache/catalina/core/LocalStrings.properties | 2 ++ .../apache/catalina/mbeans/GlobalResourcesLifecycleListener.java | 4 java/org/apache/catalina/mbeans/LocalStrings.properties | 2 ++ java/org/apache/catalina/security/LocalStrings.properties | 2 ++ java/org/apache/catalina/security/SecurityListener.java | 4 java/org/apache/catalina/startup/LocalStrings.properties | 1 + java/org/apache/catalina/startup/VersionLoggerListener.java | 4 java/org/apache/catalina/storeconfig/LocalStrings.properties | 2 +- .../apache/catalina/storeconfig/StoreConfigLifecycleListener.java | 8 +--- webapps/docs/changelog.xml| 4 12 files changed, 37 insertions(+), 4 deletions(-) diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java b/java/org/apache/catalina/core/AprLifecycleListener.java index d92ac14..285abf9 100644 --- a/java/org/apache/catalina/core/AprLifecycleListener.java +++ b/java/org/apache/catalina/core/AprLifecycleListener.java @@ -121,6 +121,10 @@ public class AprLifecycleListener implements LifecycleListener { if (Lifecycle.BEFORE_INIT_EVENT.equals(event.getType())) { synchronized (lock) { +if (!(event.getLifecycle() instanceof Server)) { +log.warn(sm.getString("listener.notServer", +event.getLifecycle().getClass().getSimpleName())); +} init(); for (String msg : initInfoLogMessages) { log.info(msg); diff --git a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java index 5163623..baa34c2 100644 --- a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java +++ b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java @@ -209,6 +209,10 @@ public class JreMemoryLeakPreventionListener implements LifecycleListener { public void lifecycleEvent(LifecycleEvent event) { // Initialise these classes when Tomcat starts if (Lifecycle.BEFORE_INIT_EVENT.equals(event.getType())) { +if (!(event.getLifecycle() instanceof Server)) { +log.warn(sm.getString("listener.notServer", +event.getLifecycle().getClass().getSimpleName())); +} /* * First call to this loads all drivers visible to the current class diff --git a/java/org/apache/catalina/core/LocalStrings.properties b/java/org/apache/catalina/core/LocalStrings.properties index 7c05313..54747cc 100644 --- a/java/org/apache/catalina/core/LocalStrings.properties +++ b/java/org/apache/catalina/core/LocalStrings.properties @@ -146,6 +146,8 @@ jreLeakListener.jarUrlConnCacheFail=Failed to disable Jar URL connection caching jreLeakListener.ldapPoolManagerFail=Failed to trigger creation of the com.sun.jndi.ldap.LdapPoolManager class during Tomcat start to prevent possible memory leaks. This is expected on non-Sun JVMs. jreLeakListener.xmlParseFail=Error whilst attempting to prevent memory leaks during XML parsing +listener.notServer=This listener must only be nested within Server elements, but is in [{0}]. + naming.addEnvEntry=Adding environment entry [{0}] naming.addResourceEnvRef=Adding resource env ref [{0}] naming.bindFailed=Failed to bind object: [{0}] diff --git a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java index d6d7506..4f2f2dc 100644 --- a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java +++ b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java @@ -74,6 +74,10 @@ public class GlobalResourcesLifecycleListener implements LifecycleListener { public void lifecycleEvent(LifecycleEvent event) { if (Lifecycle.START_EVENT.equals(event.getType())) { +if (!(event.getLifecycle() instanceof Server)) { +log.warn(sm.getString("listener.notServer", +event.getLifecyc
[tomcat] branch 9.0.x updated: Log warning if a listener is incorrectly placed
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new ae9f1d6 Log warning if a listener is incorrectly placed ae9f1d6 is described below commit ae9f1d6821c5c3364b86a140d962f1504f243ccd Author: Michael Osipov AuthorDate: Mon Nov 8 20:39:09 2021 +0100 Log warning if a listener is incorrectly placed Some listeners are intented to be nested inside a Server element only. If a listener is misplaced a warning message is logged. --- java/org/apache/catalina/core/AprLifecycleListener.java | 4 .../org/apache/catalina/core/JreMemoryLeakPreventionListener.java | 4 java/org/apache/catalina/core/LocalStrings.properties | 2 ++ .../apache/catalina/mbeans/GlobalResourcesLifecycleListener.java | 4 java/org/apache/catalina/mbeans/LocalStrings.properties | 3 +++ java/org/apache/catalina/security/LocalStrings.properties | 2 ++ java/org/apache/catalina/security/SecurityListener.java | 4 java/org/apache/catalina/startup/LocalStrings.properties | 1 + java/org/apache/catalina/startup/VersionLoggerListener.java | 4 java/org/apache/catalina/storeconfig/LocalStrings.properties | 2 +- .../apache/catalina/storeconfig/StoreConfigLifecycleListener.java | 8 +--- webapps/docs/changelog.xml| 4 12 files changed, 38 insertions(+), 4 deletions(-) diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java b/java/org/apache/catalina/core/AprLifecycleListener.java index a3bd1db..1c72b30 100644 --- a/java/org/apache/catalina/core/AprLifecycleListener.java +++ b/java/org/apache/catalina/core/AprLifecycleListener.java @@ -121,6 +121,10 @@ public class AprLifecycleListener implements LifecycleListener { if (Lifecycle.BEFORE_INIT_EVENT.equals(event.getType())) { synchronized (lock) { +if (!(event.getLifecycle() instanceof Server)) { +log.warn(sm.getString("listener.notServer", +event.getLifecycle().getClass().getSimpleName())); +} init(); for (String msg : initInfoLogMessages) { log.info(msg); diff --git a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java index 5163623..baa34c2 100644 --- a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java +++ b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java @@ -209,6 +209,10 @@ public class JreMemoryLeakPreventionListener implements LifecycleListener { public void lifecycleEvent(LifecycleEvent event) { // Initialise these classes when Tomcat starts if (Lifecycle.BEFORE_INIT_EVENT.equals(event.getType())) { +if (!(event.getLifecycle() instanceof Server)) { +log.warn(sm.getString("listener.notServer", +event.getLifecycle().getClass().getSimpleName())); +} /* * First call to this loads all drivers visible to the current class diff --git a/java/org/apache/catalina/core/LocalStrings.properties b/java/org/apache/catalina/core/LocalStrings.properties index 03e9351..2ad9cc5 100644 --- a/java/org/apache/catalina/core/LocalStrings.properties +++ b/java/org/apache/catalina/core/LocalStrings.properties @@ -147,6 +147,8 @@ jreLeakListener.jarUrlConnCacheFail=Failed to disable Jar URL connection caching jreLeakListener.ldapPoolManagerFail=Failed to trigger creation of the com.sun.jndi.ldap.LdapPoolManager class during Tomcat start to prevent possible memory leaks. This is expected on non-Sun JVMs. jreLeakListener.xmlParseFail=Error whilst attempting to prevent memory leaks during XML parsing +listener.notServer=This listener must only be nested within Server elements, but is in [{0}]. + naming.addEnvEntry=Adding environment entry [{0}] naming.addResourceEnvRef=Adding resource env ref [{0}] naming.bindFailed=Failed to bind object: [{0}] diff --git a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java index d6d7506..4f2f2dc 100644 --- a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java +++ b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java @@ -74,6 +74,10 @@ public class GlobalResourcesLifecycleListener implements LifecycleListener { public void lifecycleEvent(LifecycleEvent event) { if (Lifecycle.START_EVENT.equals(event.getType())) { +if (!(event.getLifecycle() instanceof Server)) { +log.warn(sm.getString("listener.notServer", +event.getLifecycl
[tomcat] branch 8.5.x updated: Log warning if a listener is incorrectly placed
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new 4896083 Log warning if a listener is incorrectly placed 4896083 is described below commit 48960832ca7e5c6da77d2fb83548e4f92fb37040 Author: Michael Osipov AuthorDate: Mon Nov 8 20:39:09 2021 +0100 Log warning if a listener is incorrectly placed Some listeners are intented to be nested inside a Server element only. If a listener is misplaced a warning message is logged. --- java/org/apache/catalina/core/AprLifecycleListener.java | 4 .../org/apache/catalina/core/JreMemoryLeakPreventionListener.java | 4 java/org/apache/catalina/core/LocalStrings.properties | 2 ++ .../apache/catalina/mbeans/GlobalResourcesLifecycleListener.java | 4 java/org/apache/catalina/security/LocalStrings.properties | 2 ++ java/org/apache/catalina/security/SecurityListener.java | 4 java/org/apache/catalina/startup/LocalStrings.properties | 2 ++ java/org/apache/catalina/startup/VersionLoggerListener.java | 4 .../apache/catalina/storeconfig/StoreConfigLifecycleListener.java | 8 +--- webapps/docs/changelog.xml| 4 10 files changed, 35 insertions(+), 3 deletions(-) diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java b/java/org/apache/catalina/core/AprLifecycleListener.java index 3546946..80dc5a5 100644 --- a/java/org/apache/catalina/core/AprLifecycleListener.java +++ b/java/org/apache/catalina/core/AprLifecycleListener.java @@ -126,6 +126,10 @@ public class AprLifecycleListener implements LifecycleListener { if (Lifecycle.BEFORE_INIT_EVENT.equals(event.getType())) { synchronized (lock) { +if (!(event.getLifecycle() instanceof Server)) { +log.warn(sm.getString("listener.notServer", +event.getLifecycle().getClass().getSimpleName())); +} init(); for (String msg : initInfoLogMessages) { log.info(msg); diff --git a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java index 59e8ff7..58f1382 100644 --- a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java +++ b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java @@ -234,6 +234,10 @@ public class JreMemoryLeakPreventionListener implements LifecycleListener { public void lifecycleEvent(LifecycleEvent event) { // Initialise these classes when Tomcat starts if (Lifecycle.BEFORE_INIT_EVENT.equals(event.getType())) { +if (!(event.getLifecycle() instanceof Server)) { +log.warn(sm.getString("listener.notServer", +event.getLifecycle().getClass().getSimpleName())); +} /* * First call to this loads all drivers visible to the current class diff --git a/java/org/apache/catalina/core/LocalStrings.properties b/java/org/apache/catalina/core/LocalStrings.properties index 3c5b58a..1e5d56e 100644 --- a/java/org/apache/catalina/core/LocalStrings.properties +++ b/java/org/apache/catalina/core/LocalStrings.properties @@ -150,6 +150,8 @@ jreLeakListener.jarUrlConnCacheFail=Failed to disable Jar URL connection caching jreLeakListener.ldapPoolManagerFail=Failed to trigger creation of the com.sun.jndi.ldap.LdapPoolManager class during Tomcat start to prevent possible memory leaks. This is expected on non-Sun JVMs. jreLeakListener.xmlParseFail=Error whilst attempting to prevent memory leaks during XML parsing +listener.notServer=This listener must only be nested within Server elements, but is in [{0}]. + naming.addEnvEntry=Adding environment entry [{0}] naming.addResourceEnvRef=Adding resource env ref [{0}] naming.bindFailed=Failed to bind object: [{0}] diff --git a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java index 125d044..4539b31 100644 --- a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java +++ b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java @@ -79,6 +79,10 @@ public class GlobalResourcesLifecycleListener implements LifecycleListener { public void lifecycleEvent(LifecycleEvent event) { if (Lifecycle.START_EVENT.equals(event.getType())) { +if (!(event.getLifecycle() instanceof Server)) { +log.warn("This listener must only be nested within Server elements, but is in [" + +event.getLifecycle().getClass().getSimpleName() + "]."); +} component = event.getLifecycle();
Re: APR crashes when running tests on Windows
Am 2021-11-09 um 10:40 schrieb Mark Thomas: All, I am seeing some fairly consistent crashes when running the APR tests on Windows for 10.0.x. I'm going to spend some time trying to track down the root cause before I tag the next 10.0.x release. That's surprising, all of a sudden? Can you share the dump/backtrace of the crash while you are analyzing the issue? Michael - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.0.x updated: Move the wait for the sendfile thread to exit. Align with Poller thread
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.0.x by this push: new 843c693 Move the wait for the sendfile thread to exit. Align with Poller thread 843c693 is described below commit 843c693d110ef6ae44c2930357200bc90e8c42ba Author: Mark Thomas AuthorDate: Tue Nov 9 17:26:59 2021 + Move the wait for the sendfile thread to exit. Align with Poller thread The code can't wait for the snedfile thread to stop in sendfile.stop as that is in a sync block and the snedfile thread won't exit the wait until the thead calling stop exists and releases the sync. --- java/org/apache/tomcat/util/net/AprEndpoint.java | 34 +--- webapps/docs/changelog.xml | 4 +++ 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java index 4f44e62..2b60bf4 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -611,6 +611,24 @@ public class AprEndpoint extends AbstractEndpoint implements SNICallB if (getUseSendfile()) { try { sendfile.stop(); + +// Wait for the sendfile thread to exit, otherwise parallel +// destruction of sockets which are still in the poller can cause +// problems. +waitMillis = 0; +try { +while (sendfile.sendfileThread.isAlive() && waitMillis < 1) { +waitMillis++; +Thread.sleep(1); +} +} catch (InterruptedException e) { +// Ignore +} + +if (sendfile.sendfileThread.isAlive()) { +log.warn(sm.getString("endpoint.sendfileThreadStop")); +} + sendfile.destroy(); } catch (Exception e) { // Ignore @@ -1727,22 +1745,6 @@ public class AprEndpoint extends AbstractEndpoint implements SNICallB sendfileRunning = false; // In case the sendfile thread is in the idle wait this.notify(); - -// Wait for the sendfile thread to exit, otherwise parallel -// destruction of sockets which are still in the poller can cause -// problems. -int loops = 50; -while (loops > 0 && sendfileThread.isAlive()) { -try { -this.wait(pollTime / 1000); -} catch (InterruptedException e) { -// Ignore -} -loops--; -} -if (sendfileThread.isAlive()) { -log.warn(sm.getString("endpoint.sendfileThreadStop")); -} } /** diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 9f57152..3342007 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -147,6 +147,10 @@ tomcat-native or APR. Please refer to the openssl-java17 module from the main branch for more details. (remm) + +Fix APR connector stop so it correctly waits for the sendfile thread, if +any, to exit. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated: Move the wait for the sendfile thread to exit. Align with Poller thread
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new dcc9133 Move the wait for the sendfile thread to exit. Align with Poller thread dcc9133 is described below commit dcc91b0649a8ffe2cd11fbb1f5e5b260d94b Author: Mark Thomas AuthorDate: Tue Nov 9 17:26:59 2021 + Move the wait for the sendfile thread to exit. Align with Poller thread The code can't wait for the snedfile thread to stop in sendfile.stop as that is in a sync block and the snedfile thread won't exit the wait until the thead calling stop exists and releases the sync. --- java/org/apache/tomcat/util/net/AprEndpoint.java | 34 +--- webapps/docs/changelog.xml | 4 +++ 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java index 725195a..c97e3e1 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -607,6 +607,24 @@ public class AprEndpoint extends AbstractEndpoint implements SNICallB if (getUseSendfile()) { try { sendfile.stop(); + +// Wait for the sendfile thread to exit, otherwise parallel +// destruction of sockets which are still in the poller can cause +// problems. +waitMillis = 0; +try { +while (sendfile.sendfileThread.isAlive() && waitMillis < 1) { +waitMillis++; +Thread.sleep(1); +} +} catch (InterruptedException e) { +// Ignore +} + +if (sendfile.sendfileThread.isAlive()) { +log.warn(sm.getString("endpoint.sendfileThreadStop")); +} + sendfile.destroy(); } catch (Exception e) { // Ignore @@ -1723,22 +1741,6 @@ public class AprEndpoint extends AbstractEndpoint implements SNICallB sendfileRunning = false; // In case the sendfile thread is in the idle wait this.notify(); - -// Wait for the sendfile thread to exit, otherwise parallel -// destruction of sockets which are still in the poller can cause -// problems. -int loops = 50; -while (loops > 0 && sendfileThread.isAlive()) { -try { -this.wait(pollTime / 1000); -} catch (InterruptedException e) { -// Ignore -} -loops--; -} -if (sendfileThread.isAlive()) { -log.warn(sm.getString("endpoint.sendfileThreadStop")); -} } /** diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index cf41f56..bdde649 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -147,6 +147,10 @@ tomcat-native or APR. Please refer to the openssl-java17 module from the main branch for more details. (remm) + +Fix APR connector stop so it correctly waits for the sendfile thread, if +any, to exit. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: APR crashes when running tests on Windows
On 09/11/2021 10:28, Michael Osipov wrote: Am 2021-11-09 um 10:40 schrieb Mark Thomas: All, I am seeing some fairly consistent crashes when running the APR tests on Windows for 10.0.x. I'm going to spend some time trying to track down the root cause before I tag the next 10.0.x release. That's surprising, all of a sudden? Yes, but it seems related to me switching to a new, clean built Windows VM for pre-release testing and release building. The VM is on different (slower) hardware so I suspect I have just uncovered a timing issue. Can you share the dump/backtrace of the crash while you are analyzing the issue? I have various dump files but haven't got anything useful out of them (I suspect my lack of knowledge is the primary factor here). I have managed to make progress though. It looks like the Connector fails to initialise, we don't handle that properly and when it tries to continue with a null socket, APR gets a tad upset. I'm hopeful I'll get to the bottom of this later today. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Make tests more robist
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new cb06e16 Make tests more robist cb06e16 is described below commit cb06e16a6cd30e32878598c5092edce22ae41e8d Author: Mark Thomas AuthorDate: Tue Nov 9 17:55:06 2021 + Make tests more robist --- 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 9dab366..5f2941e 100644 --- a/test/org/apache/catalina/startup/TomcatBaseTest.java +++ b/test/org/apache/catalina/startup/TomcatBaseTest.java @@ -171,6 +171,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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.0.x updated (843c693 -> e1cab08)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git. from 843c693 Move the wait for the sendfile thread to exit. Align with Poller thread new f0d9085 Fix root cause of APR crash observed in unit tests on Windows new e1cab08 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 02/02: Make tests more robust
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit e1cab08643c63ff28078bfec01f472b7c37ca342 Author: Mark Thomas AuthorDate: Tue Nov 9 17:55:06 2021 + 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 8ea0503..2ab8abd 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 01/02: Fix root cause of APR crash observed in unit tests on Windows
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit f0d908551e4c60819075f4461f34a20bf39682af Author: Mark Thomas AuthorDate: Tue Nov 9 18:55:28 2021 + 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 2b60bf4..0c4d87f 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -759,10 +759,10 @@ public class AprEndpoint extends AbstractEndpoint implements SNICallB } 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 3342007..02fe82a 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -151,6 +151,11 @@ Fix APR connector stop so it correctly waits for the sendfile thread, if any, to exit. (markt) + +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) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated (dcc9133 -> 1cc8817)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git. from dcc9133 Move the wait for the sendfile thread to exit. Align with Poller thread new 0ff941d Fix root cause of APR crash observed in unit tests on Windows new 1cc8817 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 02/02: Make tests more robust
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 1cc8817bdc9637f41ab7b582059548a23d99b007 Author: Mark Thomas AuthorDate: Tue Nov 9 17:55:06 2021 + 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 01/02: Fix root cause of APR crash observed in unit tests on Windows
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 0ff941db2e321192fc0fced6dfb3131b34e0bf67 Author: Mark Thomas AuthorDate: Tue Nov 9 18:55:28 2021 + 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 c97e3e1..79ef971 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -755,10 +755,10 @@ public class AprEndpoint extends AbstractEndpoint implements SNICallB } 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 bdde649..b363352 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -151,6 +151,11 @@ Fix APR connector stop so it correctly waits for the sendfile thread, if any, to exit. (markt) + +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) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 02/02: Make tests more robust
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 AuthorDate: Tue Nov 9 17:55:06 2021 + 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 01/02: Fix root cause of APR crash observed in unit tests on Windows
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 AuthorDate: Tue Nov 9 18:55:28 2021 + 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 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 @@ 457: Add a toString() method to MimeHeader to aid debugging. (dblevins) + +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) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: APR crashes when running tests on Windows
On 09/11/2021 18:33, Mark Thomas wrote: On 09/11/2021 10:28, Michael Osipov wrote: Am 2021-11-09 um 10:40 schrieb Mark Thomas: All, I am seeing some fairly consistent crashes when running the APR tests on Windows for 10.0.x. I'm going to spend some time trying to track down the root cause before I tag the next 10.0.x release. That's surprising, all of a sudden? Yes, but it seems related to me switching to a new, clean built Windows VM for pre-release testing and release building. The VM is on different (slower) hardware so I suspect I have just uncovered a timing issue. Can you share the dump/backtrace of the crash while you are analyzing the issue? I have various dump files but haven't got anything useful out of them (I suspect my lack of knowledge is the primary factor here). I have managed to make progress though. It looks like the Connector fails to initialise, we don't handle that properly and when it tries to continue with a null socket, APR gets a tad upset. I'm hopeful I'll get to the bottom of this later today. Fixed it. The short version is: - default time wait delay and ephemeral port range on Windows meant unit tests were running out of ports - APR wasn't handling the init() failure and carrying on with an invalid socket - as soon as any code tried to use the invalid socket, the JVM crashed I've fixed the init() failure handling so we now see test failures rather than JVM crashes. I've adjusted the OS settings for the VM where I run the tests so the time wait delay is shorter so the test process doesn't run out of ports. The 10.0.x tag should follow later today. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 10.1.0-M7
On 08/11/2021 21:59, Mark Thomas wrote: The proposed 10.1.0-M7 release is: [ ] Broken - do not release [X] Alpha - go ahead and release as 10.1.0-M7 (alpha) Tests pass for NIO and NIO2 with Tomcat Native 1.2.31 on Linux, MacOS and Windows. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
RE: APR crashes when running tests on Windows
Great Job Mark!!! Dream * Excel * Explore * Inspire Jon McAlexander Infrastructure Engineer Asst Vice President Middleware Product Engineering Enterprise CIO | EAS | Middleware | Infrastructure Solutions 8080 Cobblestone Rd | Urbandale, IA 50322 MAC: F4469-010 Tel 515-988-2508 | Cell 515-988-2508 jonmcalexan...@wellsfargo.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. > -Original Message- > From: Mark Thomas > Sent: Tuesday, November 9, 2021 2:02 PM > To: dev@tomcat.apache.org > Subject: Re: APR crashes when running tests on Windows > > On 09/11/2021 18:33, Mark Thomas wrote: > > On 09/11/2021 10:28, Michael Osipov wrote: > >> Am 2021-11-09 um 10:40 schrieb Mark Thomas: > >>> All, > >>> > >>> I am seeing some fairly consistent crashes when running the APR > >>> tests on Windows for 10.0.x. I'm going to spend some time trying to > >>> track down the root cause before I tag the next 10.0.x release. > >> > >> That's surprising, all of a sudden? > > > > Yes, but it seems related to me switching to a new, clean built > > Windows VM for pre-release testing and release building. The VM is on > > different > > (slower) hardware so I suspect I have just uncovered a timing issue. > > > >> Can you share the dump/backtrace of the crash while you are analyzing > >> the issue? > > > > I have various dump files but haven't got anything useful out of them > > (I suspect my lack of knowledge is the primary factor here). > > > > I have managed to make progress though. It looks like the Connector > > fails to initialise, we don't handle that properly and when it tries > > to continue with a null socket, APR gets a tad upset. > > > > I'm hopeful I'll get to the bottom of this later today. > > Fixed it. The short version is: > > - default time wait delay and ephemeral port range on Windows meant unit >tests were running out of ports > > - APR wasn't handling the init() failure and carrying on with an invalid >socket > > - as soon as any code tried to use the invalid socket, the JVM crashed > > > I've fixed the init() failure handling so we now see test failures rather than > JVM crashes. > > I've adjusted the OS settings for the VM where I run the tests so the time > wait delay is shorter so the test process doesn't run out of ports. > > The 10.0.x tag should follow later today. > > Mark > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional > commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r50858 - in /dev/tomcat/tomcat-10/v10.0.13: ./ bin/ bin/embed/ src/
Author: markt Date: Tue Nov 9 22:34:51 2021 New Revision: 50858 Log: Upload 10.0.13 for voting Added: dev/tomcat/tomcat-10/v10.0.13/ dev/tomcat/tomcat-10/v10.0.13/KEYS dev/tomcat/tomcat-10/v10.0.13/README.html dev/tomcat/tomcat-10/v10.0.13/RELEASE-NOTES dev/tomcat/tomcat-10/v10.0.13/bin/ dev/tomcat/tomcat-10/v10.0.13/bin/README.html dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13-deployer.tar.gz (with props) dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13-deployer.tar.gz.asc dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13-deployer.tar.gz.sha512 dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13-deployer.zip (with props) dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13-deployer.zip.asc dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13-deployer.zip.sha512 dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13-fulldocs.tar.gz (with props) dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13-fulldocs.tar.gz.asc dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13-fulldocs.tar.gz.sha512 dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13-windows-x64.zip (with props) dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13-windows-x64.zip.asc dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13-windows-x64.zip.sha512 dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13-windows-x86.zip (with props) dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13-windows-x86.zip.asc dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13-windows-x86.zip.sha512 dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13.exe (with props) dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13.exe.asc dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13.exe.sha512 dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13.tar.gz (with props) dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13.tar.gz.asc dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13.tar.gz.sha512 dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13.zip (with props) dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13.zip.asc dev/tomcat/tomcat-10/v10.0.13/bin/apache-tomcat-10.0.13.zip.sha512 dev/tomcat/tomcat-10/v10.0.13/bin/embed/ dev/tomcat/tomcat-10/v10.0.13/bin/embed/apache-tomcat-10.0.13-embed.tar.gz (with props) dev/tomcat/tomcat-10/v10.0.13/bin/embed/apache-tomcat-10.0.13-embed.tar.gz.asc dev/tomcat/tomcat-10/v10.0.13/bin/embed/apache-tomcat-10.0.13-embed.tar.gz.sha512 dev/tomcat/tomcat-10/v10.0.13/bin/embed/apache-tomcat-10.0.13-embed.zip (with props) dev/tomcat/tomcat-10/v10.0.13/bin/embed/apache-tomcat-10.0.13-embed.zip.asc dev/tomcat/tomcat-10/v10.0.13/bin/embed/apache-tomcat-10.0.13-embed.zip.sha512 dev/tomcat/tomcat-10/v10.0.13/src/ dev/tomcat/tomcat-10/v10.0.13/src/apache-tomcat-10.0.13-src.tar.gz (with props) dev/tomcat/tomcat-10/v10.0.13/src/apache-tomcat-10.0.13-src.tar.gz.asc dev/tomcat/tomcat-10/v10.0.13/src/apache-tomcat-10.0.13-src.tar.gz.sha512 dev/tomcat/tomcat-10/v10.0.13/src/apache-tomcat-10.0.13-src.zip (with props) dev/tomcat/tomcat-10/v10.0.13/src/apache-tomcat-10.0.13-src.zip.asc dev/tomcat/tomcat-10/v10.0.13/src/apache-tomcat-10.0.13-src.zip.sha512 Added: dev/tomcat/tomcat-10/v10.0.13/KEYS == --- dev/tomcat/tomcat-10/v10.0.13/KEYS (added) +++ dev/tomcat/tomcat-10/v10.0.13/KEYS Tue Nov 9 22:34:51 2021 @@ -0,0 +1,453 @@ +This file contains the PGP&GPG keys of various Apache developers. +Please don't use them for email unless you have to. Their main +purpose is code signing. + +Apache users: pgp < KEYS +Apache developers: +(pgpk -ll && pgpk -xa ) >> this file. + or +(gpg --fingerprint --list-sigs + && gpg --armor --export ) >> this file. + +Apache developers: please ensure that your key is also available via the +PGP keyservers (such as pgpkeys.mit.edu). + + +pub 4096R/2F6059E7 2009-09-18 + Key fingerprint = A9C5 DF4D 22E9 9998 D987 5A51 10C0 1C5A 2F60 59E7 +uid Mark E D Thomas +sub 4096R/5E763BEC 2009-09-18 + +-BEGIN PGP PUBLIC KEY BLOCK- +Comment: GPGTools - http://gpgtools.org + +mQINBEq0DukBEAD4jovHOPJDxoD+JnO1Go2kiwpgRULasGlrVKuSUdP6wzcaqWmX +pqtOJKKwW2MQFQLmg7nQ9RjJwy3QCbKNDJQA/bwbQT1F7WzTCz2S6vxC4zxKck4t +6RZBq2dJsYKF0CEh6ZfY4dmKvhq+3istSoFRdHYoOPGWZpuRDqfZPdGm/m335/6K +GH59oysn1NE7a2a+kZzjBSEgv23+l4Z1Rg7+fpz1JcdHSdC2Z+ZRxML25eVatRVz +4yvDOZItqDURP24zWOodxgboldV6Y88C3v/7KRR+1vklzkuA2FqF8Q4r/2f0su7M +UVviQcy29y/RlLSDTTYoVlCZ1ni14qFU7Hpw43KJtgXmcUwq31T1+SlXdYjNJ1aF +kUi8BjCHDcSgE/IReKUanjHzm4XSymKDTeqqzidi4k6PDD4jyHb8k8vxi6qT6Udn +lcfo5NBkkUT1TauhEy8ktHhbl9k60BvvMBP9l6cURiJg1WS77egI4P/82oPbzzFi +GFqXyJKULVgxtdQ3JikCpodp3f1fh6PlYZwkW4xCJLJucJ5MiQp07HAkMVW5w+k8 +Xvuk4i5quh3N+2kzKHOOiQCDmN0sz0XjOE+
[tomcat] tag 10.0.13 created (now 40dbce6)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to tag 10.0.13 in repository https://gitbox.apache.org/repos/asf/tomcat.git. at 40dbce6 (commit) This tag includes the following new commits: new 40dbce6 Tag 10.0.13 The 1 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. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 01/01: Tag 10.0.13
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to tag 10.0.13 in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 40dbce6eb012429a6ba62a9bb65fd11ee5c6c898 Author: Mark Thomas AuthorDate: Tue Nov 9 22:09:45 2021 + Tag 10.0.13 --- build.properties.default | 2 +- webapps/docs/changelog.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.properties.default b/build.properties.default index d353e2f..01d8bfc 100644 --- a/build.properties.default +++ b/build.properties.default @@ -33,7 +33,7 @@ version.major=10 version.minor=0 version.build=13 version.patch=0 -version.suffix=-dev +version.suffix= # - Reproducible builds - # Uncomment and set to current time for reproducible builds diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 02fe82a..b8eaac9 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -104,7 +104,7 @@ They eventually become mixed with the numbered issues (i.e., numbered issues do not "pop up" wrt. others). --> - + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[VOTE] Release Apache Tomcat 10.0.13
The proposed Apache Tomcat 10.0.13 release is now available for voting. Apache Tomcat 10.x implements Jakarta EE 9 and, as such, the primary package for all the specification APIs has changed from javax.* to jakarta.* Applications that run on Tomcat 9 will not run on Tomcat 10 without changes. Java EE applications designed for Tomcat 9 and earlier may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat will automatically convert them to Jakarta EE and copy them to the webapps directory The notable changes compared to 10.0.12 are: - Experimental OpenSSL support through the Panama API incubating in Java 17, with support for OpenSSL 1.1+ - Add support for custom caching strategies for web application resources. This initial implementation allows control over whether or not a resource is cached. - Improve robustness of JNDIRealm for exceptions occurring when getting the connection. Along with lots of other bug fixes and improvements. For full details, see the changelog: https://ci.apache.org/projects/tomcat/tomcat-10.0.x/docs/changelog.html It can be obtained from: https://dist.apache.org/repos/dist/dev/tomcat/tomcat-10/v10.0.13/ The Maven staging repo is: https://repository.apache.org/content/repositories/orgapachetomcat-1339 The tag is: https://github.com/apache/tomcat/tree/10.0.13 40dbce6eb012429a6ba62a9bb65fd11ee5c6c898 The proposed 10.0.13 release is: [ ] Broken - do not release [ ] Stable - go ahead and release as 10.0.13 (stable) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org