Community
Participate
Working Groups
When stopping WebViewerExample in Tomcat 6 these entries appear in the catalina.out log: SEVERE: The web application [/WebViewerExample] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@7d813672]) and a value of type [com.ibm.icu.impl.ResourceBundleWrapper] (value [com.ibm.icu.impl.ResourceBundleWrapper@2e1db6bd]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. Mar 8, 2011 10:29:28 AM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: The web application [/WebViewerExample] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@20c849f2]) and a value of type [org.eclipse.birt.report.context.BirtContext] (value [org.eclipse.birt.report.context.BirtContext@3d6ebfae]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. Mar 8, 2011 10:29:28 AM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: The web application [/WebViewerExample] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@31ea5804]) and a value of type [com.ibm.icu.util.ULocale] (value [en_US]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. Mar 8, 2011 10:29:28 AM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: The web application [/WebViewerExample] created a ThreadLocal with key of type [org.apache.axis.utils.XMLUtils.ThreadLocalDocumentBuilder] (value [org.apache.axis.utils.XMLUtils$ThreadLocalDocumentBuilder@6f76998b]) and a value of type [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl] (value [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl@535aadd8]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. Steps: 1. Put WebViewerExample (2.6.2) into webapps dir. Commons-logging goes into WEB-INF/lib, 2. Startup Tomcat, 3. Generate some reports (I've generated my simple test report without even database connection use), 4. Stop WebViewerExample in Tomcat Manager. Generally, I have a PermGen issue with my own servlet using BIRT - it hangs up with out of PermGen memory after sth about 700 requests (maxPermSize is 256m). The above is one of the issues I've found while trying to find cause of my problem.
Forum topic related to this bug: https://www.birt-exchange.org/org/forum/index.php/topic/21267-birt-memory-leak/page__pid__71861__st__0&#entry71861
I can not reproduce this issue with birt 2.6.2 release. My environment was: Windows 7 + JDK 1.6 + new installed Tomcat 6.0 + WebViewerExample 2.6.2 release. No other application was installed on tomcat. Stop WebViewerExample in the Tomcat Manage console works fine. Check the catalina.out, there is no error message as you listed in the bug description.
Created attachment 191280 [details] Report used to reproduce this issue Heve you tried with linux? And my "simple" report has also a bit javascript code within.
(In reply to comment #3) > Created attachment 191280 [details] > Report used to reproduce this issue > > Heve you tried with linux? And my "simple" report has also a bit javascript > code within. Would you please attach your sample report?
Look above :-)
Created attachment 191292 [details] catalina.out Hi, I tried with the report you attached on Tomcat 6.0 + AS4 + jdk 1.5.0, the error still can not be reproduced. The catalina.out was attached.
Created attachment 191294 [details] catalina.out from PLD linux distribution
Created attachment 191296 [details] catalina.out from Ubuntu Here is copy of my test tomcat with birt (uses port 18888, manager login/pass: admin/admin). http://usosphp.mimuw.edu.pl/~jankiel/pub/tomcat_339191.tgz If you weren't repoduced this whith (almost) exactly the same configuration, then maybe it would be JVM related thing? I've no further ideas now... For both PLD and Ubuntu - this is my 'java -version' output: java version "1.6.0_24" Java(TM) SE Runtime Environment (build 1.6.0_24-b07) Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)
I can reproduce this issue with Tomcat 6.0.32 release. It doesn't related to Linux version or jdk version.
1. Memory leak could not be reproduced on Tomcat 6.0.32 release + birt 262 release. Java settings:JAVA_OPTS=-Xms1024m -Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError Test scenario: 1. Use the report attached 2. Do transient viewing repeatedly After sent more than 10K transient viewing requests, the perm gen space only used 56MB memory, no memory leak was found. The snapshot attached show the VM status after 10K transient viewing requests completed. 2. The memory leak warning is actually the "Custom ThreadLocal class type leak" of Tomcat, which was fixed in tomcat 7.0.6. See http://wiki.apache.org/tomcat/MemoryLeakProtection#cclThreadSpawnedByWebApp
Created attachment 193547 [details] memory snapshot
Resolve as NOT_ECLIPSE.
Tried with Tomcat 7.0.6 and 7.0.12, the error message still can be reproduced with BIRT 2.6.2 release. Reopen for further investigation.
Through the document says this issue was fixed since tomcat 7.0.6, it still exists in 7.0.12. This can be confirmed by the "Custom ThreadLocal class" case mentioned in the document. Resolve as NOT_ECLIPSE because it's actually a tomcat bug, whether it's fixed or not.
Verified.