| Summary: | mvn build error: Tracing dependencies for: almond java.lang.StackOverflowError | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Adrian Aichner <adrian.aichner> | ||||||
| Component: | Client | Assignee: | Michael Ochmann <michael.ochmann> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | mamacdon, michael.ochmann | ||||||
| Version: | 6.0 | ||||||||
| Target Milestone: | 7.0 | ||||||||
| Hardware: | Other | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 241918 [details]
mvn clean install log file (see description for command)
Comment on attachment 241918 [details]
mvn clean install log file (see description for command)
adrian@apa:~/git/org.eclipse.orion.client$ alias dtz
alias dtz='date +%Y%m%dT%H%M%S%z'
adrian@apa:~/git/org.eclipse.orion.client$ nohup mvn clean install -DbuildLabel=`date -u +%Y%m%d-%H%M` > mvn-clean-install-`dtz`.log &
Sorry, but I haven't encountered this error before. You could try increasing the stack size by passing -Xss2048k to the <java> tasks in orion.mini.xml. Or when you invoke Maven pass the -DskipBrowser argument, which should skip over the step where the offending file (the standalone compare widget) is built. [1] https://github.com/mozilla/rhino/issues/67#issuecomment-13410864 (In reply to Mark Macdonald from comment #3) > Sorry, but I haven't encountered this error before. You could try increasing > the stack size by passing -Xss2048k to the <java> tasks in orion.mini.xml. > > Or when you invoke Maven pass the -DskipBrowser argument, which should skip > over the step where the offending file (the standalone compare widget) is > built. > > [1] https://github.com/mozilla/rhino/issues/67#issuecomment-13410864 Running nohup mvn clean install -e -X -DbuildLabel=`date -u +%Y%m%d-%H%M` -DskipBrowser > mvn-clean-install-e-X-DskipBrowser-`dtz`.log & in ~/git/org.eclipse.orion.client it all ends with this: 15457 [java] ../orion/compare/compareView.css$ 15458 [java] URL not a relative URL, skipping: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAASCAYAAABxYA+/AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAUSURBVBhXY2RgYPgPxAxMIGIwMgCpaAEjILHq8AAAAABJRU5ErkJggg=="$ 15459 [java] Optimizing (standard.keepLines) CSS file: /var/home/adrian/git/org.eclipse.orion.client/optimized/cfui/css/logs.css$ 15460 [java] Optimizing (standard.keepLines) CSS file: /var/home/adrian/git/org.eclipse.orion.client/optimized/cfui/css/deploy.css$ 15461 [java] Optimizing (standard.keepLines) CSS file: /var/home/adrian/git/org.eclipse.orion.client/optimized/content/content.css$ 15462 [java] Optimizing (standard.keepLines) CSS file: /var/home/adrian/git/org.eclipse.orion.client/optimized/js-tests/javascript/mocha.css$ 15463 [java] Optimizing (standard.keepLines) CSS file: /var/home/adrian/git/org.eclipse.orion.client/optimized/js-tests/editor/textMateStyler/test.css$ 15464 [java] Optimizing (standard.keepLines) CSS file: /var/home/adrian/git/org.eclipse.orion.client/optimized/profile/user-profile.css$ 15465 [java] Optimizing (standard.keepLines) CSS file: /var/home/adrian/git/org.eclipse.orion.client/optimized/profile/css/user.css$ 15466 [java] Optimizing (standard.keepLines) CSS file: /var/home/adrian/git/org.eclipse.orion.client/optimized/profile/user-list.css$ 15467 [java] $ 15468 [java] Tracing dependencies for: index$ 15469 [java] TypeError: Cannot read property "normalize" from undefined$ 15470 [java] In module tree:$ 15471 [java] index$ 15472 [java] $ 15473 [java] Error: TypeError: Cannot read property "normalize" from undefined$ 15474 [java] In module tree:$ 15475 [java] index$ 15476 [java] $ 15477 [antcall] Exiting /var/home/adrian/git/org.eclipse.orion.client/releng/org.eclipse.orion.client.releng/builder/orion.mini.xml.$ 15478 [ant] Exiting /var/home/adrian/git/org.eclipse.orion.client/releng/org.eclipse.orion.client.releng/builder/orion.mini.xml.$ Sigh, not seeing that error either -- and I ran a test mvn build on ubuntu using the same command as you. Some googling suggests that this can happen when the RequireJS build config is missing paths for a RequireJS plugin [1]. But for index.js the only plugins needed should be 'domReady' and 'text', and both are properly defined in the paths config of orion.build.js. [1] https://github.com/jrburke/r.js/issues/221 (In reply to Mark Macdonald from comment #5) > Sigh, not seeing that error either -- and I ran a test mvn build on ubuntu > using the same command as you. > > Some googling suggests that this can happen when the RequireJS build config > is missing paths for a RequireJS plugin [1]. > > But for index.js the only plugins needed should be 'domReady' and 'text', > and both are properly defined in the paths config of orion.build.js. > > [1] https://github.com/jrburke/r.js/issues/221 Thanks for your help, Mark! I think that TypeError: Cannot read property "normalize" from undefined might be a side-effect of a prior failed build due to the stackoverflow error. I assumed I could just build again with mvn clean install but the result it that TypeError: Cannot read property "normalize" from undefined which I don't see when I first do a adrian@apa:~/git/org.eclipse.orion.client$ git reset --hard master after a failed build. I can, alas, not get over this 938 [java] $ 939 [java] Tracing dependencies for: almond$ 940 [java] java.lang.StackOverflowError$ even when I use -Xss32M I am attaching the tail of my latest build log. I have verified the Xss argument is being used: pgrep -l -f java > pgrep-l-f-java-`dtz`.txt 1 11739 /usr/lib/jvm/java-1.6.0-openjdk-i386/bin/java -Xss8192k -classpath /usr/share/maven/boot/plexus-classworlds-2.x.jar -Dclassworlds.conf=/usr/share/maven/bin/m2.conf -Dmaven.home=/usr/share/maven org.codehaus.plexus.classworlds.launcher.Launcher clean install$ 2 11811 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java -Xss32M -classpath /var/home/adrian/git/org.eclipse.orion.client/target/requirejs/lib/args4j.jar:/var/home/adrian/git/org.eclipse.orion.client/target/requirejs/lib/closure-compiler.jar:/var/home/adrian/git/org.eclipse.orion.client/target/requirejs/lib/guava.jar:/var/home/adrian/git/org.eclipse.orion.client/target/requirejs/lib/json.jar:/var/home/adrian/git/org.eclipse.orion.client/target/requirejs/lib/jsr305.jar:/var/home/adrian/git/org.eclipse.orion.client/target/requirejs/lib/protobuf-java.jar:/var/home/adrian/git/org.eclipse.orion.client/target/requirejs/lib/rhino.jar org.mozilla.javascript.tools.shell.Main -version 180 /var/home/adrian/git/org.eclipse.orion.client/target/requirejs//r.js -o /var/home/adrian/git/org.eclipse.orion.client/releng/org.eclipse.orion.client.releng/builder//scripts/orion.build.js appDir=/var/home/adrian/git/org.eclipse.orion.client/staging baseUrl=./ dir=/var/home/adrian/git/org.eclipse.orion.client/optimized$ I ran maven with export MAVEN_OPTS="-Xss8192k" hence that argument for process 11739 Created attachment 242639 [details]
See StackOverflowError caused by Tracing dependencies for: almond
[java] Tracing dependencies for: almond
[java] java.lang.StackOverflowError
[java] at org.mozilla.javascript.ScriptRuntime.toNumber(ScriptRuntime.java:356)
[java] at org.mozilla.javascript.ScriptRuntime.toInteger(ScriptRuntime.java:1068)
Did you find a solution for this problem Adrian? I get the same error on Windows with a SUN JDK (both version 6 and 7) even when decorating all java calls with <jvmarg value="-Xss32M" /> in orion.mini.xml and using -DskipBrowser. The only way to get that build to work seems to switch off minification completely with -Dorion.client.build.skip. (In reply to Michael Ochmann from comment #8) > Did you find a solution for this problem Adrian? Hi Michael, no I did not. > > I get the same error on Windows with a SUN JDK (both version 6 and 7) even > when decorating all java calls with <jvmarg value="-Xss32M" /> in > orion.mini.xml and using -DskipBrowser. > > The only way to get that build to work seems to switch off minification > completely with -Dorion.client.build.skip. Ah, I have not tried that, thanks! Mark's hint regarding the <java> tasks was actually pointing into the right direction. I just overlooked that there were in total three <java> task calls in the orion.mini.xml script, and two of them were missing a <jvmarg> argument for setting the stack size: https://git.eclipse.org/r/33194 To my surprise I found that 1024k is sufficient! The default stack size seems to vary widely among JVMs and platforms. Anything between 32k and 1M is possible according to a quick research. That explains why Mark could not reproduce the problem: He picked a JVM with a large enough default stack size. We didn't. Bad luck. Still, this script is awfully slow (partly because the "almond" dependencies are analyzed again and again) and I'd stick with -Dorion.client.build.skip except for release builds. Thanks Michael! Merged: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=60df397a59cecf450f9efb8a1050283cdb65d87d (In reply to Michael Ochmann from comment #10) > Still, this script is awfully slow (partly because the "almond" dependencies > are analyzed again and again) and I'd stick with -Dorion.client.build.skip > except for release builds. It would be much faster if we could combine the almond builds into 1 invocation of the optimizer, but I'm not sure if it's possible. They each pass slightly different values to the 'wrap' option, for one thing. |
I get that error whether I initiate a maven build in the server repository or the client repository. I will attach the log for the client side build: adrian@apa:~/git/org.eclipse.orion.client$ alias dtz alias dtz='date +%Y%m%dT%H%M%S%z' adrian@apa:~/git/org.eclipse.orion.client$ nohup mvn clean install -DbuildLabel=`date -u +%Y%m%d-%H%M` > mvn-clean-install-`dtz`.log & It all ends in a stack trace I am quoting from the attached log file. Let me know what other information you might need. Any tips to get past this? Adrian [java] Tracing dependencies for: almond [java] java.lang.StackOverflowError [java] at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1769) [java] at org.mozilla.javascript.ScriptRuntime.getNameFunctionAndThis(ScriptRuntime.java:2188) [java] at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:72) [java] at org.mozilla.javascript.gen._var_home_adrian_git_org_eclipse_orion_client_target_requirejs__r_js_1._c_parsePrimaryExpression_357(Unknown Source) [java] at org.mozilla.javascript.gen._var_home_adrian_git_org_eclipse_orion_client_target_requirejs__r_js_1.call(Unknown Source) [java] at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430) [java] at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269) [java] at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97) [java] at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42) [java] at org.mozilla.javascript.gen._var_home_adrian_git_org_eclipse_orion_client_target_requirejs__r_js_1._c_anonymous_422(Unknown Source) [java] at org.mozilla.javascript.gen._var_home_adrian_git_org_eclipse_orion_client_target_requirejs__r_js_1.call(Unknown Source) [java] at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:74) [java] at org.mozilla.javascript.gen._var_home_adrian_git_org_eclipse_orion_client_target_requirejs__r_js_1._c_parseLeftHandSideExpressionAllowCall_364(Unknown Source) [java] at org.mozilla.javascript.gen._var_home_adrian_git_org_eclipse_orion_client_target_requirejs__r_js_1.call(Unknown Source) [java] at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:74) [java] at org.mozilla.javascript.gen._var_home_adrian_git_org_eclipse_orion_client_target_requirejs__r_js_1._c_parsePostfixExpression_366(Unknown Source) [java] at org.mozilla.javascript.gen._var_home_adrian_git_org_eclipse_orion_client_target_requirejs__r_js_1.call(Unknown Source) [java] at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)