1 Reply Latest reply on Aug 11, 2011 7:41 AM by Renzo Tomaselli

    OutOfMemoryError - ZipEntryContext leak

    Renzo Tomaselli Novice

      Hi all,

      I crosspost this from the jBPM forum, since it seems a jBoss-related issue.

      I use jBoss 5.1 AS according to the latest jBPM installation procedure.

      Env. is Win7 64 bits, 4 GB, jdk 1.6.0_21.

      Error is: OutOfMemoryError: GC overhead limit exceeded, which occurs soon while switching between two jBPM web apps, Console and Designer.

      As soon as this occurs, stopping/restarting jBoss is mandatory since those apps do not work anymore.

       

      I requested a memory dump on OutOfMemory conditions, then I loaded the resulting file into Eclipse Memory Analyzer Tool.

      There is a suspected leak reported as:

       

      598 instances of "org.jboss.virtual.plugins.context.zip.ZipEntryContext", loaded by "org.jboss.bootstrap.NoAnnotationURLClassLoader @ 0x1774ed68" occupy 152.700.536 (37,01%) bytes.

       

      ZipEntryContext appears in error logs, such as:

       

      java.lang.OutOfMemoryError: GC overhead limit exceeded

          at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:71)

          at java.util.zip.ZipFile$1.<init>(ZipFile.java:212)

          at java.util.zip.ZipFile.getInputStream(ZipFile.java:212)

          at java.util.zip.ZipFile.getInputStream(ZipFile.java:180)

          at org.jboss.virtual.plugins.context.zip.ZipFileWrapper.openStream(ZipFileWrapper.java:214)

          at org.jboss.virtual.plugins.context.zip.ZipEntryContext.openStream(ZipEntryContext.java:1082)

          at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.openStream(ZipEntryHandler.java:153)

          at org.jboss.virtual.VirtualFile.openStream(VirtualFile.java:230)

          at org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy.getResourceAsStream(VFSClassLoaderPolicy.java:483)

          at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:534)

          at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:532)

          at java.security.AccessController.doPrivileged(Native Method)

          at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:530)

          at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:507)

          at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:134)

          at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131)

          at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:452)

          at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:251)

          at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:150)

          at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:265)

          at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1119)

          at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:798)

          at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)

          at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

          at org.eclipse.jdt.internal.compiler.Compiler.initializeParser(Compiler.java:681)

          at org.eclipse.jdt.internal.compiler.Compiler.<init>(Compiler.java:282)

          at org.eclipse.jdt.internal.compiler.Compiler.<init>(Compiler.java:158)

          at org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:362)

          at org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)

          at org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:368)

          at org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:53)

          at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:70)

       

      or:

       

      Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

          at java.util.Arrays.copyOf(Arrays.java:2882)

          at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)

          at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)

          at java.lang.StringBuilder.append(StringBuilder.java:119)

          at org.jboss.virtual.plugins.context.zip.ZipEntryContext.getChild(ZipEntryContext.java:823)

          at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.createChildHandler(ZipEntryHandler.java:191)

          at org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(AbstractVirtualFileHandler.java:684)

          at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.getChild(ZipEntryHandler.java:165)

          at org.jboss.virtual.plugins.context.DelegatingHandler.getChild(DelegatingHandler.java:107)

          at org.jboss.virtual.VirtualFile.getChild(VirtualFile.java:481)

          at org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy.getResources(VFSClassLoaderPolicy.java:524)

          at org.jboss.classloader.spi.base.BaseClassLoader$4.run(BaseClassLoader.java:691)

          at java.security.AccessController.doPrivileged(Native Method)

          at org.jboss.classloader.spi.base.BaseClassLoader.getResourcesLocally(BaseClassLoader.java:687)

          at org.jboss.classloader.spi.base.BaseClassLoader.getResourcesLocally(BaseClassLoader.java:668)

          at org.jboss.classloader.spi.base.BaseClassLoaderDomain.getResources(BaseClassLoaderDomain.java:505)

          at org.jboss.classloader.spi.base.BaseClassLoaderDomain.getResources(BaseClassLoaderDomain.java:1154)

          at org.jboss.classloader.spi.base.BaseClassLoader.loadResources(BaseClassLoader.java:495)

          at org.jboss.classloader.spi.base.BaseClassLoader.findResources(BaseClassLoader.java:481)

          at java.lang.ClassLoader.getResources(ClassLoader.java:1041)

          at java.lang.ClassLoader.getResources(ClassLoader.java:1037)

          at org.drools.util.CompositeClassLoader.getResources(CompositeClassLoader.java:148)

          at org.drools.util.ChainedProperties.getResources(ChainedProperties.java:144)

          at org.drools.util.ChainedProperties.<init>(ChainedProperties.java:90)

          at org.drools.RuleBaseConfiguration.init(RuleBaseConfiguration.java:392)

          at org.drools.RuleBaseConfiguration.<init>(RuleBaseConfiguration.java:244)

          at org.drools.common.AbstractRuleBase.<init>(AbstractRuleBase.java:146)

          at org.drools.reteoo.ReteooRuleBase.<init>(ReteooRuleBase.java:143)

          at org.drools.reteoo.ReteooRuleBase.<init>(ReteooRuleBase.java:120)

          at org.drools.RuleBaseFactory.newRuleBase(RuleBaseFactory.java:86)

          at org.drools.RuleBaseFactory.newRuleBase(RuleBaseFactory.java:74)

          at org.drools.RuleBaseFactory.newRuleBase(RuleBaseFactory.java:37)