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
The following commit(s) were added to refs/heads/8.5.x by this push: new c0995c6 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63251 JDK-8194653 c0995c6 is described below commit c0995c62f65e2f62d4e9f3c169a4b7445d3df792 Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri Mar 15 13:55:35 2019 +0000 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63251 JDK-8194653 Implement a work-around for a known JRE bug (https://bugs.openjdk.java.net/browse/JDK-8194653) that may cause a dead-lock when Tomcat starts. --- java/org/apache/juli/logging/LogFactory.java | 14 ++++++++++++++ webapps/docs/changelog.xml | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/java/org/apache/juli/logging/LogFactory.java b/java/org/apache/juli/logging/LogFactory.java index 6717610..e080f69 100644 --- a/java/org/apache/juli/logging/LogFactory.java +++ b/java/org/apache/juli/logging/LogFactory.java @@ -18,6 +18,7 @@ package org.apache.juli.logging; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; +import java.nio.file.FileSystems; import java.util.ServiceLoader; import java.util.logging.LogManager; @@ -71,6 +72,19 @@ public class LogFactory { * Private constructor that is not available for public use. */ private LogFactory() { + /* + * Work-around known a JRE bug. + * https://bugs.openjdk.java.net/browse/JDK-8194653 + * + * Pre-load the default file system. No performance impact as we need to + * load the default file system anyway. Just do it earlier to avoid the + * potential deadlock. + * + * This can be removed once the oldest JRE supported by Tomcat includes + * a fix. + */ + FileSystems.getDefault(); + // Look via a ServiceLoader for a Log implementation that has a // constructor taking the String name. ServiceLoader<Log> logLoader = ServiceLoader.load(Log.class); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index b7cede3..5c2eb41 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -69,6 +69,11 @@ target, return a file size of <code>-</code> rather than <code>1k</code>. (markt) </fix> + <fix> + <bug>63251</bug>: Implement a work-around for a known JRE bug (<a + href="https://bugs.openjdk.java.net/browse/JDK-8194653">JDK-8194653</a>) + that may cause a dead-lock when Tomcat starts. (markt) + </fix> </changelog> </subsection> <subsection name="Web applications"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org