chunlinyao created OPENEJB-1961:
-----------------------------------

             Summary: Classloader memory leak by Threads which is started by 
org.apache.openejb.loader.Files
                 Key: OPENEJB-1961
                 URL: https://issues.apache.org/jira/browse/OPENEJB-1961
             Project: OpenEJB
          Issue Type: Bug
          Components: tomee
            Reporter: chunlinyao
            Priority: Minor


org.apache.openejb.loader.Files registered ShutdownHook, which will create a 
Thread.
When new a Thread, the thread will record contextClassLoader and 
inheritedAccessControlContext,
If Files is first called by a Thread using LazyStopWebappClassLoader, it will 
hold the classLoader.

 Daemon Thread [localhost-startStop-1] (Class load: Files)      
        owns: StandardContext  (id=262) 
        
TomEEFacesConfigResourceProvider.getMetaInfConfigurationResources(ExternalContext)
 line: 86     
        
DefaultFacesConfigurationProvider.getClassloaderFacesConfig(ExternalContext) 
line: 249  
        DefaultFacesConfigurationMerger.getFacesConfigData(ExternalContext) 
line: 101   
        FacesConfigurator.configure() line: 416 
        
Jsp21FacesInitializer(AbstractFacesInitializer).buildConfiguration(ServletContext,
 ExternalContext, ExpressionFactory) line: 370        
        Jsp21FacesInitializer.initContainerIntegration(ServletContext, 
ExternalContext) line: 73        
        
Jsp21FacesInitializer(AbstractFacesInitializer).initFaces(ServletContext) line: 
143     
        StartupServletContextListener.contextInitialized(ServletContextEvent) 
line: 119 
        StandardContext.listenerStart() line: 4791      
        StandardContext.startInternal() line: 5285      
        StandardContext(LifecycleBase).start() line: 150        
        ContainerBase$StartChild.call() line: 1559      
        ContainerBase$StartChild.call() line: 1549      
        FutureTask$Sync.innerRun() line: 334    
        FutureTask<V>.run() line: 166   
        ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1110      
        ThreadPoolExecutor$Worker.run() line: 603       
        Thread.run() line: 722  

We must load Files from other thread first to prevent this leak.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to