[jira] [Issue Comment Edited] (MYFACES-3510) Application components classloader memory leak

2012-03-22 Thread Ruben Martin Pozo (Issue Comment Edited) (JIRA)

[ 
https://issues.apache.org/jira/browse/MYFACES-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235919#comment-13235919
 ] 

Ruben Martin Pozo edited comment on MYFACES-3510 at 3/22/12 7:24 PM:
-

And how do you explain that if I remove the patch the server doesn't freeze 
when deploying? To test the patch I have to redeploy the app several times so I 
get to the point when there is no more permGen memory and the soft reference is 
garbage collected. Then and only then the server freezes and not in any of the 
other times when I redeployed but there was enough memory

So I really think something strange is happening that is, somehow, triggered by 
this patch.

I'll try patch-2 to see if the same thing happens

  was (Author: rmarpozo):
And how do you explain that if I remove the patch the server doesn't freeze 
when deploying? To test the patch I have to redeploy the app several times so I 
get to the point when there is no more permGen memory and the soft reference is 
garbage collected. Then and only then the server freezes and not in any of the 
other times when I redeployed but there was enough memory

So I really think something strange is happening that is, somehow, trigger by 
this patch.

I'll try patch-2 to see if the same thing happens
  
> Application components classloader memory leak
> --
>
> Key: MYFACES-3510
> URL: https://issues.apache.org/jira/browse/MYFACES-3510
> Project: MyFaces Core
>  Issue Type: Bug
>  Components: General
>Affects Versions: 2.1.6
> Environment: WIndows Glassfish Embedded
>Reporter: Ruben Martin Pozo
>Assignee: Leonardo Uribe
> Fix For: 2.0.13, 2.1.7
>
> Attachments: MYFACES-3510-1.patch, MYFACES-3510-2.patch, 
> screenshot-1.jpg
>
>
> We've seen an application classloader memory leak due to the new class 
> javax.faces.component._PropertyDescriptorHolder class introduced in version 
> 2.1.6
> This class holds a reference to a Method of a component loaded by the 
> application classloader. The memory leak shows up when the 
> _PropertyDescriptorHolder is stored in the _ComponentAttributesMap class that 
> is loaded by the system class loader.
> You should use a WeakReference instead of storing the direct reference to the 
> Method

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Issue Comment Edited] (MYFACES-3510) Application components classloader memory leak

2012-03-22 Thread Ruben Martin Pozo (Issue Comment Edited) (JIRA)

[ 
https://issues.apache.org/jira/browse/MYFACES-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235778#comment-13235778
 ] 

Ruben Martin Pozo edited comment on MYFACES-3510 at 3/22/12 5:38 PM:
-

I've tried the patch and it fixes the problem. The application classloader is 
gced before throwing the OOM

But then something very very strange happens

Just after collecting the classloader (I see that in the Java Visual VM tool) 
the CPU rises up to the 50% (1 core) and the application server freezes for 
20-40 seconds. The only thread working is the one copied below. After that time 
the application displays the JSF page without errors. 

Any guess???

2012-03-22 18:21:59

"pool-1-thread-3" - Thread t@233
   java.lang.Thread.State: RUNNABLE
at 
org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider.isAvailable(TomcatAnnotationLifecycleProvider.java:75)
at 
org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory.resolveLifecycleProviderFromService(DefaultLifecycleProviderFactory.java:208)
at 
org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory.getLifecycleProvider(DefaultLifecycleProviderFactory.java:86)
at 
org.apache.myfaces.config.FacesConfigurator.configureManagedBeanDestroyer(FacesConfigurator.java:1043)
at 
org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:431)
at 
org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:338)
at 
org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73)
at 
org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:140)
at 
org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:111)
at 
org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4690)
at 
com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:534)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:5305)
- locked  (a com.sun.enterprise.web.WebModule)
at com.sun.enterprise.web.WebModule.start(WebModule.java:500)
- locked  (a com.sun.enterprise.web.WebModule)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
- locked  (a java.util.LinkedHashMap)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:755)
at 
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1980)
at 
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1630)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:100)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
- locked <17b599c> (a org.glassfish.internal.data.ModuleInfo)
at 
org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:286)
at 
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at 
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at 
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
at 
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
at 
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
at 
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067)
at 
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
at 
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247)
at 
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at 
com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:118)
at 
com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:97)
at 
com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:88)
at 
com.isb.runtime.embedded.remote.RuntimeRMIServerImpl.forceDeploy(RuntimeRMIServerImpl.java:364)
- locked <8c436b> (a 
com.isb.runtime.embedded.remote.RuntimeRMIServerImpl)
at 
com.isb.runtime.embedded.remote.RuntimeRMIServerImpl.requestAccepted(RuntimeRMIServerImpl.java:258)
- locked <8c436b> (a 
com.isb.runtime.embedded.remote.RuntimeRMIServerImpl)
at 
com.isb.runtime.embedded.remote.ServerDeployProxy.deployApplication(ServerDeployProxy.java: