7 Replies Latest reply on May 27, 2016 9:32 AM by Max Barkley

    [Errai 4] Out o fMemory

    Jose Miguel Barone Newbie

      Hi, an upgraded project to Errai 4 fails with this stack trace:

       

      [INFO] Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

      [INFO]     at java.util.LinkedList.linkLast(LinkedList.java:142)

      [INFO]     at java.util.LinkedList.add(LinkedList.java:338)

      [INFO]     at org.jboss.errai.ioc.rebind.ioc.graph.impl.DependencyGraphBuilderImpl.processResolutionQueue(DependencyGraphBuilderImpl.java:448)

      [INFO]     at org.jboss.errai.ioc.rebind.ioc.graph.impl.DependencyGraphBuilderImpl.resolveDependency(DependencyGraphBuilderImpl.java:368)

      [INFO]     at org.jboss.errai.ioc.rebind.ioc.graph.impl.DependencyGraphBuilderImpl.resolveDependencies(DependencyGraphBuilderImpl.java:343)

      [INFO]     at org.jboss.errai.ioc.rebind.ioc.graph.impl.DependencyGraphBuilderImpl.createGraph(DependencyGraphBuilderImpl.java:157)

      [INFO]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCProcessor.process(IOCProcessor.java:171)

      [INFO]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generateBootstrappingClassSource(IOCBootstrapGenerator.java:236)

      [INFO]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generate(IOCBootstrapGenerator.java:131)

      [INFO]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator.generate(IOCGenerator.java:72)

      [INFO]     at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:67)

      [INFO]     at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:55)

      [INFO]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)

      [INFO]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

      [INFO]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

      [INFO]     at java.lang.Thread.run(Thread.java:745)

      [INFO]                [ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...)

      [INFO]       Rebinding org.jboss.errai.ioc.client.Bootstrapper

      [INFO]          Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator

      [INFO]             generating ioc bootstrapping code...

      [INFO]       Rebinding org.jboss.errai.ioc.client.Bootstrapper

      [INFO]          Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator

      [INFO]             generating ioc bootstrapping code...

      [INFO]       Rebinding org.jboss.errai.ioc.client.Bootstrapper

      [INFO]          Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator

      [INFO]             generating ioc bootstrapping code...

      [INFO]       Rebinding org.jboss.errai.ioc.client.Bootstrapper

      [INFO]          Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator

      [INFO]             generating ioc bootstrapping code...

      [INFO]    [WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)

      [INFO]       [WARN] org.jboss.errai.ioc.client.BootstrapperImpl

      [INFO]    [ERROR] Could not find org.jboss.errai.ioc.client.BootstrapperImpl in types compiled from source. Is the source glob too strict?

      [INFO]    [ERROR] Errors in 'org/jboss/errai/ioc/client/Container.java'

      [INFO]       [ERROR] Line 62: Rebind result 'org.jboss.errai.ioc.client.BootstrapperImpl' could not be found

      [INFO] ------------------------------------------------------------------------

      [INFO] BUILD FAILURE

       

      If i raise the available memory it only delays the error ... any clue?

       

      Thanks.

        • 1. Re: [Errai 4] Out o fMemory
          Max Barkley Expert

          Hi Jose,

           

          I'm not certain what it could be, but my first suggestion is to try using 4.0.0-SNAPSHOT and report back if the problem is still reproducible. If that doesn't work then we would likely need the output of a memory profiler to try and figure out what the problem is.

           

          Cheers,

          Max

          • 2. Re: [Errai 4] Out o fMemory
            Jose Miguel Barone Newbie

            Tried the 4.0.0-SNAPSHOT and it's the same, with oracle jdk and also with open jdk.

            Then i made a hprof file (heap dump) and the 76% of the instances are LinkedList$Node ... it seems that i will go back to 3.2 ... really annoying, maybe this project will need to continue with another framework because cannot update the version surely will make trouble in the future.

             

            Thanks for your help Max

            • 3. Re: [Errai 4] Out o fMemory
              Max Barkley Expert

              Hi Jose,

               

              We've already had good feedback from other users with large projects, so I believe this is a bug you are experiencing rather than a more serious limitation. Based on your stack-trace and the results of your memory profiling, I have an idea of where the problem is happening, but still not why. If you would be willing to continue helping, I can add logging statements to 4.0.0-SNAPSHOT that would provide more information.

              • 4. Re: [Errai 4] Out o fMemory
                Jose Miguel Barone Newbie

                ok ... how do we do it?

                • 5. Re: [Errai 4] Out o fMemory
                  Max Barkley Expert

                  Hi Jose,

                   

                  I've just published snapshots of errai-ioc with lots of logging in the problematic class at the debug and trace levels. If you're using log4j you can add this line to your log4j.properties file to enable the trace logging:

                  log4j.logger.org.jboss.errai.ioc.rebind.ioc.graph.api.DependencyGraphBuilder=TRACE

                   

                  Could you please try a build again with this logging enabled and share the output?

                  • 6. Re: [Errai 4] Out o fMemory
                    Jose Miguel Barone Newbie

                    Ok Max, here goes the new output:

                     

                     

                    [ERROR] Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

                    [ERROR]     at java.util.LinkedList.linkLast(LinkedList.java:142)

                    [ERROR]     at java.util.LinkedList.add(LinkedList.java:338)

                    [ERROR]     at org.jboss.errai.ioc.rebind.ioc.graph.impl.DependencyGraphBuilderImpl.processResolutionQueue(DependencyGraphBuilderImpl.java:496)

                    [ERROR]     at org.jboss.errai.ioc.rebind.ioc.graph.impl.DependencyGraphBuilderImpl.resolveDependency(DependencyGraphBuilderImpl.java:412)

                    [ERROR]     at org.jboss.errai.ioc.rebind.ioc.graph.impl.DependencyGraphBuilderImpl.resolveDependencies(DependencyGraphBuilderImpl.java:386)

                    [ERROR]     at org.jboss.errai.ioc.rebind.ioc.graph.impl.DependencyGraphBuilderImpl.createGraph(DependencyGraphBuilderImpl.java:174)

                    [ERROR]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCProcessor.process(IOCProcessor.java:185)

                    [INFO] java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded

                    [INFO]     at java.util.concurrent.FutureTask.report(FutureTask.java:122)

                    [INFO]     at java.util.concurrent.FutureTask.get(FutureTask.java:192)

                    [INFO]     at org.jboss.errai.config.rebind.AsyncGenerators$FutureWrapper.get(AsyncGenerators.java:112)

                    [INFO]     at org.jboss.errai.config.rebind.AsyncGenerators$FutureWrapper.get(AsyncGenerators.java:86)

                    [INFO]     at org.jboss.errai.config.rebind.AbstractAsyncGenerator.startAsyncGeneratorsAndWaitFor(AbstractAsyncGenerator.java:201)

                    [INFO]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator.generate(IOCGenerator.java:62)

                    [INFO]     at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)

                    [INFO]     at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:745)

                    [INFO]     at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:103)

                    [INFO]     at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)

                    [INFO]     at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:262)

                    [INFO]     at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:251)

                    [INFO]     at com.google.gwt.dev.PrecompilationContextCreator$1.getAllPossibleRebindAnswers(PrecompilationContextCreator.java:86)

                    [INFO]     at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createStaticRebindExpression(UnifyAst.java:494)

                    [INFO]     at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createRebindExpression(UnifyAst.java:464)

                    [INFO]     at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleMagicMethodCall(UnifyAst.java:589)

                    [INFO]     at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:294)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:249)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:67)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:49)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:88)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:331)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:92)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:139)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:135)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JTryStatement.traverse(JTryStatement.java:93)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:88)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:331)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:92)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:139)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:135)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:83)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:730)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:722)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)

                    [INFO]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)

                    [INFO]     at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:1378)

                    [INFO]     at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:876)

                    [INFO]     at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1442)

                    [INFO]     at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1254)

                    [INFO]     at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:1174)

                    [INFO]     at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:255)

                    [INFO]     at com.google.gwt.dev.Precompile.precompile(Precompile.java:255)

                    [INFO]     at com.google.gwt.dev.Precompile.precompile(Precompile.java:202)

                    [INFO]     at com.google.gwt.dev.Precompile.precompile(Precompile.java:143)

                    [INFO]     at com.google.gwt.dev.Compiler.run(Compiler.java:197)

                    [INFO]     at com.google.gwt.dev.Compiler.run(Compiler.java:156)

                    [INFO]     at com.google.gwt.dev.Compiler$1.run(Compiler.java:117)

                    [INFO]     at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)

                    [INFO]     at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)

                    [INFO]     at com.google.gwt.dev.Compiler.main(Compiler.java:124)

                    [INFO] Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

                    [INFO]     at java.util.LinkedList.linkLast(LinkedList.java:142)

                    [INFO]     at java.util.LinkedList.add(LinkedList.java:338)

                    [INFO]     at org.jboss.errai.ioc.rebind.ioc.graph.impl.DependencyGraphBuilderImpl.processResolutionQueue(DependencyGraphBuilderImpl.java:496)

                    [INFO]     at org.jboss.errai.ioc.rebind.ioc.graph.impl.DependencyGraphBuilderImpl.resolveDependency(DependencyGraphBuilderImpl.java:412)

                    [INFO]     at org.jboss.errai.ioc.rebind.ioc.graph.impl.DependencyGraphBuilderImpl.resolveDependencies(DependencyGraphBuilderImpl.java:386)

                    [INFO]     at org.jboss.errai.ioc.rebind.ioc.graph.impl.DependencyGraphBuilderImpl.createGraph(DependencyGraphBuilderImpl.java:174)

                    [INFO]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCProcessor.process(IOCProcessor.java:185)

                    [INFO]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generateBootstrappingClassSource(IOCBootstrapGenerator.java:237)

                    [INFO]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generate(IOCBootstrapGenerator.java:132)

                    [INFO]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator.generate(IOCGenerator.java:72)

                    [INFO]     at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:66)

                    [INFO]     at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:54)

                    [INFO]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)

                    [INFO]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                    [INFO]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                    [INFO]     at java.lang.Thread.run(Thread.java:745)

                    [INFO]                [ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...)

                    [INFO]       Rebinding org.jboss.errai.ioc.client.Bootstrapper

                    [INFO]          Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator

                    [INFO]             generating ioc bootstrapping code...

                    [INFO]       Rebinding org.jboss.errai.ioc.client.Bootstrapper

                    [INFO]          Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator

                    [INFO]             generating ioc bootstrapping code...

                    [INFO]       Rebinding org.jboss.errai.ioc.client.Bootstrapper

                    [INFO]          Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator

                    [INFO]             generating ioc bootstrapping code...

                    [INFO]       Rebinding org.jboss.errai.ioc.client.Bootstrapper

                    [INFO]          Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator

                    [INFO]             generating ioc bootstrapping code...

                    [INFO]    [WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)

                    [ERROR]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generateBootstrappingClassSource(IOCBootstrapGenerator.java:237)

                    [ERROR]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generate(IOCBootstrapGenerator.java:132)

                    [ERROR]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator.generate(IOCGenerator.java:72)

                    [ERROR]     at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:66)

                    [ERROR]     at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:54)

                    [ERROR]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)

                    [ERROR]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                    [ERROR]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                    [ERROR]     at java.lang.Thread.run(Thread.java:745)

                    [INFO]       [WARN] org.jboss.errai.ioc.client.BootstrapperImpl

                    [INFO]    [ERROR] Could not find org.jboss.errai.ioc.client.BootstrapperImpl in types compiled from source. Is the source glob too strict?

                    [INFO]    [ERROR] Errors in 'org/jboss/errai/ioc/client/Container.java'

                    [INFO]       [ERROR] Line 62: Rebind result 'org.jboss.errai.ioc.client.BootstrapperImpl' could not be found

                    [INFO] ------------------------------------------------------------------------

                    [INFO] BUILD FAILURE

                    [INFO] ------------------------------------------------------------------------

                    [INFO] Total time: 06:16 min

                    [INFO] Finished at: 2016-05-26T21:03:42-03:00

                    [INFO] Final Memory: 64M/402M

                    [INFO] ------------------------------------------------------------------------

                    [ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.8.0-beta1:compile (default) on project chacraUI: Command [[

                    • 7. Re: [Errai 4] Out o fMemory
                      Max Barkley Expert

                      Hi Jose,

                       

                      Did you see lots of log output from the DependencyGraphBuilder before this? That's the part I'm most interested in. It would be hard to miss since there should be a lot of logging at the trace level. If you didn't see it, possibly your logging isn't properly configured or you may need to update your snapshots.

                       

                      Cheers.