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 2016/08/31 09:09:47 UTC
svn commit: r1758556 - in /tomcat/trunk:
java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
webapps/docs/config/listeners.xml
Author: markt
Date: Wed Aug 31 09:09:47 2016
New Revision: 1758556
URL: http://svn.apache.org/viewvc?rev=1758556&view=rev
Log:
The latest Java 9 early access builds have fixed some more memory leaks.
Modified:
tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
tomcat/trunk/webapps/docs/config/listeners.xml
Modified: tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?rev=1758556&r1=1758555&r2=1758556&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java Wed Aug 31 09:09:47 2016
@@ -251,8 +251,10 @@ public class JreMemoryLeakPreventionList
* to the web application class loader.
*
* Instead we initialize JCA right now.
+ *
+ * Fixed in Java 9 onwards (from early access build 133)
*/
- if (tokenPollerProtection) {
+ if (tokenPollerProtection && !JreCompat.isJre9Available()) {
java.security.Security.getProviders();
}
@@ -287,7 +289,10 @@ public class JreMemoryLeakPreventionList
}
}
- if (xmlParsingProtection) {
+ /*
+ * Fixed in Java 9 onwards (from early access build 133)
+ */
+ if (xmlParsingProtection && !JreCompat.isJre9Available()) {
// There are two known issues with XML parsing that affect
// Java 8+. The issues both relate to cached Exception
// instances that retain a link to the TCCL via the
Modified: tomcat/trunk/webapps/docs/config/listeners.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/listeners.xml?rev=1758556&r1=1758555&r2=1758556&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/listeners.xml (original)
+++ tomcat/trunk/webapps/docs/config/listeners.xml Wed Aug 31 09:09:47 2016
@@ -182,7 +182,9 @@
<p>Enables protection so that calls to
<code>java.awt.Toolkit.getDefaultToolkit()</code> triggered by a web
application do not result in a memory leak.
- Defaults to <code>false</code> because an AWT thread is launched.</p>
+ Defaults to <code>false</code> because an AWT thread is launched. This
+ protection is disabled if running on Java 9 onwards since the leak has
+ been fixed for Java 9 onwards.</p>
</attribute>
<attribute name="classesToInitialize" required="false">
@@ -210,7 +212,9 @@
trigger a call to this method. A side effect of enabling this protection
is the creation of a thread named "GC Daemon". The protection uses
reflection to access internal Sun classes and may generate errors on
- startup on non-Sun JVMs. The default is <code>true</code>.</p>
+ startup on non-Sun JVMs. The default is <code>true</code>. This
+ protection is disabled if running on Java 9 onwards since the leak has
+ been fixed for Java 9 onwards.</p>
</attribute>
<attribute name="ldapPoolProtection" required="false">
@@ -223,7 +227,8 @@
class the PoolCleaner thread will be configured with the thread's
context class loader set to the web application class loader which in
turn will trigger a memory leak on reload. Defaults to
- <code>true</code>.</p>
+ <code>true</code>. This protection is disabled if running on Java 9
+ onwards since the leak has been fixed for Java 9 onwards.</p>
</attribute>
<attribute name="tokenPollerProtection" required="false">
@@ -235,7 +240,9 @@
deployment when the MessageDigest for generating session IDs is
initialized. As a result the thread has the Webapp class loader as its
thread context class loader. Enabling the protection initializes JCA
- early during Tomcat startup. Defaults to <code>true</code>.</p>
+ early during Tomcat startup. Defaults to <code>true</code>. This
+ protection is disabled if running on Java 9 onwards since the leak has
+ been fixed for Java 9 onwards.</p>
</attribute>
<attribute name="urlCacheProtection" required="false">
@@ -251,7 +258,9 @@
<p>Enables protection so that parsing XML files within a web application
does not result in a memory leak. Note that memory profilers may not
display the GC root associated with this leak making it particularly
- hard to diagnose. Defaults to <code>true</code>.</p>
+ hard to diagnose. Defaults to <code>true</code>. This protection is
+ disabled if running on Java 9 onwards since the leak has been fixed for
+ Java 9 onwards.</p>
</attribute>
</attributes>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org