Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

[jboss-user] [JBoss Seam] - Seam apps leaking memory?!

scott.stark@jboss.org

2007-05-07


My (not so large) app can be redeployed on JBoss 4.0.5 exactly two times before the deployment is failing.

I know that the issue of OOME in PermGenSpace has been discussed before and the default answers were either "Sun JVM bug", "use jrockit" (which only increases the available redeploys a little without really solving the problem) or "increase perm space" (dito, I manage up to four redeploys).

I don't really buy any of thse answers because other apps do not have such severe problems.
Here's a nice summary:
http://opensource.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669

Using Yourkit I tried to investigate the problem:

| * Started JBoss.
| * Deployed the booking app.
| * Undeployed the booking app.
| * Looked at instances of org.jboss.seam.* classes.
|

I have found these two problems:

| * java.beans.Introspector leaks if flushCaches() isn't called. For testing I added such a call in org.jboss.seam.servlet.SeamListener.contextDestroyed()
| * The cache used in javassist's ProxyFactory is never cleared. I updated javassist to version 3.4 and added "ProxyFactory.useCache = false;" to org.jboss.seam.servlet.SeamListener.contextInitialized()
| I doubt that this is the correct way, but it brought down the instance count and did not seem to break anything. (javassist's ProxyFactory is used from org.jboss.seam.Component.createProxyFactory().)
|

These changes reduced the instance count but there are still some objects that refuse to get collected. I am stuck: All references to remaining objects come from the UnifiedClassLoader3.
Looks like "org.jboss.util.timeout.TimeoutFactory$1" is still holding a strong reference to the class loader.

This is well out of my expertise. I'd really appreciate if somebody could look into that.[/url]

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043738#4043738

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043738
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.