Infinite loop may be created when optimization level is 9 (default). So pass '-optimize 8' to GWT compiler to reduce optimization level and the risk of infinite loop.
On Thu, Aug 16, 2018 at 2:07 AM Dmitry Skavish <skavish@gmail.com> wrote:
hey everyone,--we are working on large GWT codebase (for 7 years already) and everything has been great until today.today we introduced some change which results in GWT compiler hanging up. funny thing is that it hangs when we run it with -logLevel INFOand the stacktrace always originates from .optimizeJsLoop()main" #1 prio=5 os_prio=31 tid=0x00007fd67200b000 nid=0x2503 runnable [0x0000700008d54000]java.lang.Thread.State: RUNNABLEat com.google.gwt.dev.js.ast.JsExprStmt.traverse(JsExprStmt.java:41)at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:467)at com.google.gwt.dev.js.ast.JsVisitor.doAcceptWithInsertRemove(JsVisitor.java:461)at com.google.gwt.dev.js.ast.JsVisitor.acceptWithInsertRemove(JsVisitor.java:121)at com.google.gwt.dev.js.ast.JsBlock.traverse(JsBlock.java:53)at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:467)at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:444)at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:109)at com.google.gwt.dev.js.JsInliner.containsNestedFunctions(JsInliner.java:1600)at com.google.gwt.dev.js.JsInliner.affectedBySideEffects(JsInliner.java:1578)at com.google.gwt.dev.js.JsInliner.isVolatile(JsInliner.java:1875)at com.google.gwt.dev.js.JsInliner.isInlinable(JsInliner.java:1804)at com.google.gwt.dev.js.JsInliner.access$500(JsInliner.java:83)at com.google.gwt.dev.js.JsInliner$InliningVisitor.process(JsInliner.java:988)at com.google.gwt.dev.js.JsInliner$InliningVisitor.endVisit(JsInliner.java:798)at com.google.gwt.dev.js.ast.JsInvocation.traverse(JsInvocation.java:91)at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:467)at com.google.gwt.dev.js.ast.JsModVisitor$NodeContext.traverse(JsModVisitor.java:153)at com.google.gwt.dev.js.ast.JsModVisitor.doAccept(JsModVisitor.java:176)at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:109)at com.google.gwt.dev.js.ast.JsExprStmt.traverse(JsExprStmt.java:42)at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:467)at com.google.gwt.dev.js.ast.JsModVisitor$ListContext.traverse(JsModVisitor.java:80)at com.google.gwt.dev.js.ast.JsModVisitor.doAcceptWithInsertRemove(JsModVisitor.java:197)at com.google.gwt.dev.js.ast.JsVisitor.acceptWithInsertRemove(JsVisitor.java:121)at com.google.gwt.dev.js.ast.JsBlock.traverse(JsBlock.java:53)at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:467)at com.google.gwt.dev.js.ast.JsModVisitor$NodeContext.traverse(JsModVisitor.java:153)at com.google.gwt.dev.js.ast.JsModVisitor.doAccept(JsModVisitor.java:176)at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:109)at com.google.gwt.dev.js.ast.JsFor.traverse(JsFor.java:107)at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:467)at com.google.gwt.dev.js.ast.JsModVisitor$ListContext.traverse(JsModVisitor.java:80)at com.google.gwt.dev.js.ast.JsModVisitor.doAcceptWithInsertRemove(JsModVisitor.java:197)at com.google.gwt.dev.js.ast.JsVisitor.acceptWithInsertRemove(JsVisitor.java:121)at com.google.gwt.dev.js.ast.JsBlock.traverse(JsBlock.java:53)at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:467)at com.google.gwt.dev.js.ast.JsModVisitor$NodeContext.traverse(JsModVisitor.java:153)at com.google.gwt.dev.js.ast.JsModVisitor.doAccept(JsModVisitor.java:176)at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:109)at com.google.gwt.dev.js.ast.JsFunction.traverse(JsFunction.java:181)at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:467)at com.google.gwt.dev.js.ast.JsModVisitor$NodeContext.traverse(JsModVisitor.java:153)at com.google.gwt.dev.js.ast.JsModVisitor.doAccept(JsModVisitor.java:176)at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:109)at com.google.gwt.dev.js.ast.JsExprStmt.traverse(JsExprStmt.java:42)at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:467)at com.google.gwt.dev.js.ast.JsModVisitor$ListContext.traverse(JsModVisitor.java:80)at com.google.gwt.dev.js.ast.JsModVisitor.doAcceptWithInsertRemove(JsModVisitor.java:197)at com.google.gwt.dev.js.ast.JsVisitor.acceptWithInsertRemove(JsVisitor.java:121)at com.google.gwt.dev.js.ast.JsBlock.traverse(JsBlock.java:53)at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:467)at com.google.gwt.dev.js.ast.JsModVisitor$NodeContext.traverse(JsModVisitor.java:153)at com.google.gwt.dev.js.ast.JsModVisitor.doAccept(JsModVisitor.java:176)at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:109)at com.google.gwt.dev.js.ast.JsProgramFragment.traverse(JsProgramFragment.java:41)at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:467)at com.google.gwt.dev.js.ast.JsModVisitor$NodeContext.traverse(JsModVisitor.java:153)at com.google.gwt.dev.js.ast.JsModVisitor.doAccept(JsModVisitor.java:176)at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:109)at com.google.gwt.dev.js.ast.JsProgram.traverse(JsProgram.java:120)at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:467)at com.google.gwt.dev.js.ast.JsModVisitor$NodeContext.traverse(JsModVisitor.java:153)at com.google.gwt.dev.js.ast.JsModVisitor.doAccept(JsModVisitor.java:176)at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:109)at com.google.gwt.dev.js.JsInliner.execImpl(JsInliner.java:1627)at com.google.gwt.dev.js.JsInliner.exec(JsInliner.java:1561)at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.optimizeJsLoop(JavaToJavaScriptCompiler.java:1001)at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.optimizeJs(JavaToJavaScriptCompiler.java:529)at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:412)at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:272)at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:198)at com.google.gwt.dev.CompilePermsServer.compilePermutation(CompilePermsServer.java:313)at com.google.gwt.dev.CompilePermsServer.run(CompilePermsServer.java:276)at com.google.gwt.dev.CompilePermsServer.main(CompilePermsServer.java:239)the top could be different.now when we run it with -logLevel DEBUG and up the build does not hang, it fails with something like that:com.google.inject.internal.util.$ComputationException: java.lang.ArrayIndexOutOfBoundsException: 52264[INFO] at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553)[INFO] at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419)[INFO] at com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)[INFO] at com.google.inject.internal.util.$StackTraceElements.forMember(StackTraceElements.java:53)[INFO] at com.google.inject.internal.ProviderMethod.toString(ProviderMethod.java:118)[INFO] at java.lang.String.valueOf(String.java:2994)[INFO] at java.lang.StringBuilder.append(StringBuilder.java:131)[INFO] at java.util.AbstractMap.toString(AbstractMap.java:559)[INFO] at com.google.inject.internal.util.$ToStringBuilder.toString(ToStringBuilder.java:46)[INFO] at com.google.inject.internal.ProviderInstanceBindingImpl.toString(ProviderInstanceBindingImpl.java:97)[INFO] at java.util.Formatter$FormatSpecifier.printString(Formatter.java:2886)[INFO] at java.util.Formatter$FormatSpecifier.print(Formatter.java:2763)[INFO] at java.util.Formatter.format(Formatter.java:2520)[INFO] at java.util.Formatter.format(Formatter.java:2455)[INFO] at java.lang.String.format(String.java:2940)[INFO] at com.google.gwt.inject.rebind.util.PrettyPrinter.format(PrettyPrinter.java:75)[INFO] at com.google.gwt.inject.rebind.util.PrettyPrinter.log(PrettyPrinter.java:57)[INFO] at com.google.gwt.inject.rebind.GuiceElementVisitor.visit(GuiceElementVisitor.java:97)[INFO] at com.google.gwt.inject.rebind.GuiceElementVisitor.visit(GuiceElementVisitor.java:40)[INFO] at com.google.inject.internal.BindingImpl.acceptVisitor(BindingImpl.java:93)[INFO] at com.google.gwt.inject.rebind.GuiceElementVisitor.visitElements(GuiceElementVisitor.java:90)[INFO] at com.google.gwt.inject.rebind.GuiceElementVisitor.visitElementsAndReportErrors(GuiceElementVisitor.java:73)[INFO] at com.google.gwt.inject.rebind.BindingsProcessor.createBindingsForModules(BindingsProcessor.java:201)[INFO] at com.google.gwt.inject.rebind.BindingsProcessor.process(BindingsProcessor.java:102)[INFO] at com.google.gwt.inject.rebind.GinjectorGeneratorImpl.generate(GinjectorGeneratorImpl.java:79)[INFO] at com.google.gwt.inject.rebind.GinjectorGenerator.generate(GinjectorGenerator.java:74)[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:519)[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createRebindExpression(UnifyAst.java:487)[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.maybeHandleMagicMethodCall(UnifyAst.java:415)[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.visit(UnifyAst.java:402)[INFO] at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:265)[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:76)[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.JBinaryOperation.traverse(JBinaryOperation.java:89)[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.JExpressionStatement.traverse(JExpressionStatement.java:42)[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:94)[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.JIfStatement.traverse(JIfStatement.java:53)[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:94)[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:786)[INFO] at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:778)[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:1401)[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:896)[INFO] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1410)[INFO] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1222)[INFO] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:1140)[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.compile(Compiler.java:204)[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:155)[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:144)[INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:118)[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:125)[INFO] Caused by: java.lang.ArrayIndexOutOfBoundsException: 52264[INFO] at com.google.inject.internal.asm.$ClassReader.readClass(Unknown Source)[INFO] at com.google.inject.internal.asm.$ClassReader.accept(Unknown Source)[INFO] at com.google.inject.internal.asm.$ClassReader.accept(Unknown Source)[INFO] at com.google.inject.internal.util.$LineNumbers.<init>(LineNumbers.java:62)[INFO] at com.google.inject.internal.util.$StackTraceElements$1.apply(StackTraceElements.java:36)[INFO] at com.google.inject.internal.util.$StackTraceElements$1.apply(StackTraceElements.java:33)[INFO] at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:549)[INFO] ... 91 moreany idea what is wrong? is it possibly to somehow see what class/file is causing the problem? and why it fails with DEBUG, but hangs with INFO?thanks!
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment