eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.36k stars 737 forks source link

JDK24 AIX build StackOverflowError at jdk.compiler.interim/com.sun.tools.javac.tree.JCTree$JCBinary.accept(JCTree.java:2221) #20823

Open JasonFengJ9 opened 1 month ago

JasonFengJ9 commented 1 month ago

Failure link

From an internal build:

Optional info

Failure output (captured from console output)

18:13:30  /home/jenkins/workspace/Build_JDK24_ppc64_aix_Personal/build/aix-ppc64-server-release/support/j9jcl/java.base/share/classes/java/lang/ClassLoader.java:297: warning: [this-escape] possible 'this' escape before subclass is fully initialized
18:13:30    this(checkSecurityPermission(), classLoaderName, parentLoader);
18:13:30        ^
18:13:30  Note: Some input files additionally use or override a deprecated API that is marked for removal.
18:13:30  Note: Some input files additionally use unchecked or unsafe operations.
18:13:30  100 warnings
18:13:30  only showing the first 100 warnings, of 145 total; use -Xmaxwarns if you would like to see more
18:13:30  The system is out of resources.
18:13:30  Consult the following stack trace for details.
18:13:30  java.lang.StackOverflowError
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.tree.JCTree$JCBinary.accept(JCTree.java:2221)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:859)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genCond(Gen.java:761)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genCond(Gen.java:674)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.visitBinary(Gen.java:2237)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.tree.JCTree$JCBinary.accept(JCTree.java:2221)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:859)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genCond(Gen.java:761)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genCond(Gen.java:674)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.visitBinary(Gen.java:2237)

...

18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.visitBinary(Gen.java:2237)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.tree.JCTree$JCBinary.accept(JCTree.java:2221)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:859)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.visitReturn(Gen.java:1897)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1773)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genDef(Gen.java:588)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genStat(Gen.java:623)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genStat(Gen.java:609)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genStats(Gen.java:660)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.internalVisitBlock(Gen.java:1121)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.visitBlock(Gen.java:1085)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1137)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genDef(Gen.java:588)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genStat(Gen.java:623)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genMethod(Gen.java:949)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.visitMethodDef(Gen.java:912)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:961)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genDef(Gen.java:588)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.jvm.Gen.genClass(Gen.java:2494)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:771)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1710)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1678)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:978)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.main.Main.compile(Main.java:319)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.main.Main.compile(Main.java:178)
18:13:30    at jdk.compiler.interim/com.sun.tools.javac.main.JavacToolProvider.run(JavacToolProvider.java:54)
18:13:30    at javacserver.server.Server.runCompiler(Server.java:239)
18:13:30    at javacserver.server.Server.handleRequest(Server.java:208)
18:13:30    at javacserver.server.Server.lambda$start$1(Server.java:172)
18:13:30    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
18:13:30    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
18:13:30    at java.base/java.lang.Thread.run(Thread.java:1595)
18:13:30  gmake[3]: *** [CompileJavaModules.gmk:95: /home/jenkins/workspace/Build_JDK24_ppc64_aix_Personal/build/aix-ppc64-server-release/jdk/modules/java.base/_the.java.base_batch] Error 3
18:13:30  gmake[2]: *** [make/Main.gmk:189: java.base-java] Error 2
18:13:30  gmake[2]: *** Waiting for unfinished jobs....
18:13:59      1500-030: (I) INFORMATION: openssl_add_all_ciphers_int: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 16384.
18:18:11       158  1500-010: (W) WARNING in async_start_func: Infinite loop.  Program may not stop.
18:19:38      1500-030: (I) INFORMATION: openssl_add_all_ciphers_int: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 16384.
18:21:52  ar: creating an archive file libcrypto.a
18:22:16  ar: creating an archive file libssl.a
18:22:20      1500-030: (I) INFORMATION: ca_main: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 16384.
18:22:23      1500-030: (I) INFORMATION: cms_main: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 16384.
18:22:40      1500-030: (I) INFORMATION: req_main: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 16384.
18:22:41      1500-030: (I) INFORMATION: s_client_main: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 16384.
18:22:42      1500-030: (I) INFORMATION: s_server_main: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 16384.
18:22:46      1500-030: (I) INFORMATION: speed_main: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 16384.
18:22:50      1500-030: (I) INFORMATION: x509_main: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 16384.
18:24:03      1500-030: (I) INFORMATION: prime_field_tests(): Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 16384.
18:24:44      1500-030: (I) INFORMATION: main: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 16384.
18:25:08  ==== openj9_version_info.h ====
18:25:08  #define OPENJ9_VERSION_INFO_H
18:25:08  #define J9COMPILER_VERSION_STRING "IBM XL C/C++ for AIX, V16.1.0 (5725-C72, 5765-J12) Version: 16.01.0000.0011"
18:25:08  #define J9PRODUCT_NAME            "OpenJDK Runtime Environment"
18:25:08  #define J9TARGET_CPU_BITS         "64"
18:25:08  #define J9TARGET_CPU_OSARCH       "ppc64"
18:25:08  #define J9TARGET_OS               "aix"
18:25:08  #define J9USERNAME                "jenkins"
18:25:08  #define J9VERSION_STRING          "24-internal-adhoc.jenkins.BuildJDK24ppc64aixPersonal"
18:25:08  #define OPENJDK_SHA               "c504eab20b8"
18:25:08  #define OPENJDK_TAG               "jdk-24+27"
18:25:08  #define J9JVM_VERSION_STRING      "master-39acfec7873"
18:25:08  #define OPENJ9_TAG                ""
18:25:08  #define J9JDK_EXT_VERSION         "24.0.0.0-ea"
18:25:08  #define J9JDK_EXT_NAME            "Extensions for OpenJDK for Eclipse OpenJ9"
18:25:08  #define JAVA_VENDOR               "Eclipse OpenJ9"
18:25:08  #define JDK_DEBUG_LEVEL           "release"
18:25:08  ====
github-actions[bot] commented 1 month ago

Issue Number: 20823 Status: Open Recommended Components: comp:vm, comp:build, comp:jclextensions

babsingh commented 2 weeks ago

The error occurred while building JDK24, and the extension repo was probably unstable back in Dec 2024. @JasonFengJ9 Have you seen this failure recently?

JasonFengJ9 commented 1 week ago

@babsingh This StackOverflowError occurred often on JDK24 AIX platform. From the job history, only 2/12 personal builds were successful. The latest occurrence was on Jan. 25th.

babsingh commented 1 week ago

This issue shares similarities with #18774, which was linked to the GRA. @mpirvu, does this issue seem related to the GRA? Is there an option we can try to confirm whether it is related to the GRA?

babsingh commented 1 week ago

~From @pshipton: The failures have recently only occurred on PPC9 machines, while the builds have successfully completed on PPC8 machines.~ The failure was also observed on an internal PPC8 machine. It might simply be more intermittent on PPC8.

mpirvu commented 1 week ago

@mpirvu, does this issue seem related to the GRA

Maybe @hzongaro may have a feel for whether this smells like a GRA issue.

Is there an option we can try to confirm whether it is related to the GRA?

I see that there is an option to disable GRA: -Xjit:disableGRA (for tests that use SCC/AOT you may also need -Xaot:disableGRA)

hzongaro commented 1 week ago

Hmmm. It’s very difficult to tell whether this might be related to GRA from just the stack trace.

@a7ehuo, does this failure bear any resemblance to issue #21000 you have been looking at? I suspect not, as that seems to be related to looking up package names, but you mentioned yesterday that you didn’t have any call stack trace for that problem yet. . . .

hzongaro commented 1 week ago

@Spencer-Comin, if @a7ehuo is able to verify this is unrelated to issue #21000 may I ask you to investigate?

a7ehuo commented 1 week ago

@a7ehuo, does this failure bear any resemblance to issue https://github.com/eclipse-openj9/openj9/issues/21000 you have been looking at?

It doesn't look the same issue as #21000 to me. First all the failed cases from #21000 that I have checked happened on Intel Skylake. This issue happens on Power AIX. Secondly, whenever it fails with cannot access unnamed package and compiler crashed (exit code 4) for #21000, there is no other java exception or any other extra error messages are shown. In this case, it shows java.lang.StackOverflowError but there is no error messages like #21000 cannot access unnamed package or compiler crashed (exit code 4).

2024-12-11T23:13:30.170Z] The system is out of resources.
[2024-12-11T23:13:30.170Z] Consult the following stack trace for details.
[2024-12-11T23:13:30.170Z] java.lang.StackOverflowError
[2024-12-11T23:13:30.170Z]  at jdk.compiler.interim/com.sun.tools.javac.tree.JCTree$JCBinary.accept(JCTree.java:2221)
babsingh commented 1 week ago