Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

[09:44:43 CDT(-0500)] <mklein21005> I'm still having troubles connecting to uPortal. I get an error in my localhost log that says Servlet.service() for servlet ViewRendererServlet threw exception
[09:44:57 CDT(-0500)] <mklein21005> java.lang.OutOfMemoryError: PermGen space
[09:45:19 CDT(-0500)] <mklein21005> what could be causing this memory leak?
[11:34:35 CDT(-0500)] <athena> hey EricDalquist, should i be worried about these?
[11:34:37 CDT(-0500)] <athena> SEVERE: The web application [/uPortal] created a ThreadLocal with key of type [org.danann.cernunnos.SimpleReagent.XPathLocal] (value [org.danann.cernunnos.SimpleReagent$XPathLocal@4ac97805]) and a value of type [org.dom4j.xpath.DefaultXPath] (value [[XPath: @parent]]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
[11:36:24 CDT(-0500)] <athena> is that just a shutdown message?
[11:37:39 CDT(-0500)] <holdorph> why would the web application be getting stopped?
[11:49:28 CDT(-0500)] <athena> dunno
[11:49:33 CDT(-0500)] <athena> this isn't my local instance
[11:49:45 CDT(-0500)] <athena> so maybe it's from tomcat shutdown - i can't really tell, but there were a lot of those messages
[12:01:59 CDT(-0500)] <EricDalquist> yeah it would be from tomcat shutdown
[12:02:11 CDT(-0500)] <EricDalquist> and it is code that should be fixed eventually
[12:02:20 CDT(-0500)] <EricDalquist> as with code in spring and many other libraries
[12:02:51 CDT(-0500)] <EricDalquist> tomcat somewhere in the 6.0 line added a custom classloader that watches for Threads, ThreadLocals and a few other JVM level constructs that get created in a webapp
[12:03:23 CDT(-0500)] <EricDalquist> and when the webapp is shutdown (at redeploy or TC shutdown) it tries to clear out any hanging class references
[12:03:31 CDT(-0500)] <EricDalquist> so the webapp's clasloader can be GCd
[12:03:42 CDT(-0500)] <EricDalquist> so really code needs to be fixed to clear out thread local values
[12:03:48 CDT(-0500)] <EricDalquist> the problem is to do that you have to require JDK6
[12:04:06 CDT(-0500)] <EricDalquist> since before that there was no way code could remove a ThreadLocal it had created.
[12:23:25 CDT(-0500)] <athena> ah, gotcha
[12:23:32 CDT(-0500)] <athena> (smile)
[12:23:45 CDT(-0500)] <athena> don't we already require JDK6?
[12:26:48 CDT(-0500)] <holdorph> i thought we did, but I don't remember any more
[12:27:39 CDT(-0500)] <athena> think we do
[13:25:53 CDT(-0500)] <EricDalquist> right we do
[13:26:08 CDT(-0500)] <EricDalquist> but there aren't many places in uportal that use thread locals and those that do clear them out
[13:26:14 CDT(-0500)] <EricDalquist> its all the 3rd party libraries
[13:26:30 CDT(-0500)] <EricDalquist> like even spring 3.0 can't use ThreadLocal.remove()
[13:26:41 CDT(-0500)] <EricDalquist> since it still works on JDK 1.5
[13:36:16 CDT(-0500)] <athena> ah
[13:36:19 CDT(-0500)] <athena> yeah that makes sense
[13:42:59 CDT(-0500)] <EricDalquist> anyone here ever run a junit test that uses different dependencies than the rest of the project?