Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-1961

Classloader memory leak by Threads which is started by org.apache.openejb.loader.Files

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5.1
    • Component/s: tomee
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              chunlinyao chunlinyao
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: