Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-22224

Groovy classloader memory leak

    XMLWordPrintable

    Details

      Description

      Heap dumps shows that there are hundreds of
      groovy.lang.GroovyClassLoader instances.

      This kind of leaks are common:
      https://dzone.com/articles/class-loading-fun-groovy
      http://www.dynatrace.com/en/javabook/class-loader-issues.html

      This may be related to segment io integration that is using groovy:

      Thread dump 5/6 "Nuxeo-Work-default-25" daemon prio=10 tid=0x00007f1be951f000 nid=0x611f runnable [0x00007f1bcaaed000]      java.lang.Thread.State: RUNNABLE      at java.lang.Class.forName0(Native Method)      at java.lang.Class.forName(Class.java:274)      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1707)      - locked <
      0x0000000700071d58> (a org.nuxeo.runtime.tomcat.NuxeoWebappClassLoader)      at java.lang.ClassLoader.loadClass(ClassLoader.java:412)      - locked <
      0x00000007c23726a8> (a groovy.lang.GroovyClassLoader)      at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:637)      at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:494)      at org.codehaus.groovy.control.ResolveVisitor.resolveToClass(ResolveVisitor.java:605)      at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:251)      at org.codehaus.groovy.control.ResolveVisitor.resolveFromStaticInnerClasses(ResolveVisitor.java:381)      at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:251)      at org.codehaus.groovy.control.ResolveVisitor.resolveFromStaticInnerClasses(ResolveVisitor.java:381)      at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:251)      at org.codehaus.groovy.control.ResolveVisitor.resolveFromStaticInnerClasses(ResolveVisitor.java:381)      at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:251)      at org.codehaus.groovy.control.ResolveVisitor.resolveFromStaticInnerClasses(ResolveVisitor.java:381)      at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:251)      at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:969)      at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:141)      at org.codehaus.groovy.control.CompilationUnit$5.call(CompilationUnit.java:527)      at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:772)      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:438)      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:281)      - locked <
      0x00000007c2372b50> (a java.util.HashMap)      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:252)      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:247)      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:209)      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:219)      at org.nuxeo.segment.io.SegmentIOMapper.getMappedData(SegmentIOMapper.java:69)      at org.nuxeo.segment.io.listener.SegmentIOAsyncListener.processEvents(SegmentIOAsyncListener.java:87)      at org.nuxeo.segment.io.listener.SegmentIOAsyncListener.handleEvent(SegmentIOAsyncListener.java:47)      at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:170)      at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:342)      at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransactionAndCheckExceptions(AbstractWork.java:303)      at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:272)      at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:52)      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)      at java.lang.Thread.run(Thread.java:745) 
      

      Also note that this is not the main memory problem that crash connect during concurrent build/download.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: