weixin_39709178
weixin_39709178
2021-01-06 18:34

AdoptOpenJDK 11.0.8 with OpenJ9 crashes on first start if JAVA_HOME points to JDK 8

Java -version output


openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.8+10)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.21.0, JRE 11 Mac OS X amd64-64-Bit Compressed References 20200715_677 (JIT enabled, AOT enabled)
OpenJ9   - 34cf4c075
OMR      - 113e54219
JCL      - 95bb504fbb based on jdk-11.0.8+10)

Summary of problem

AdoptOpenJDK 11.0.8 with Eclipse OpenJ9 crashes on first start on macOS 10.15.5 when JAVA_HOME points to JDK 8. Steps to reproduce:

  1. Install AdoptOpenJDK 8 with HotSpot (I'm still on 8u252).
  2. Download AdoptOpenJDK 11.0.8 with Eclipse OpenJ9.
  3. Extract the tarball.
  4. In Terminal, set JAVA_HOME to JDK 8, export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home.
  5. Run jdk-11.0.8+10/Contents/Home/bin/java -version.

Output:


$ jdk-11.0.8+10/Contents/Home/bin/java -version
Assertion failed at /Users/jenkins/workspace/build-scripts/jobs/jdk11u/jdk11u-mac-x64-openj9/workspace/build/src/omr/compiler/x/env/OMRCPU.cpp:269: self()->supports_feature_test(feature)
VMState: 0x0005ffff
    old api and new api did not match, feature 107
compiling java/lang/Double.longBitsToDouble(J)D at level: cold

Running jdk-11.0.8+10/Contents/Home/bin/java -version again after the crash works without a problem. After a reboot, the problem comes back. I haven't experienced the same problem with HotSpot builds.

Diagnostic files

diagnostics.zip

该提问来源于开源项目:eclipse/openj9

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

9条回答

  • weixin_39851008 weixin_39851008 4月前

    Based on the error, this is related to recent CPU feature work in the JIT/portlib.

    点赞 评论 复制链接分享
  • weixin_39878646 weixin_39878646 4月前

    Does the problem still occur with the OpenJ9 0.23 release (11.0.9) Milestone 2 build? https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.9+10_openj9-0.23.0-m2

    点赞 评论 复制链接分享
  • weixin_39709178 weixin_39709178 4月前

    Looks fine. Thanks a lot!

    点赞 评论 复制链接分享
  • weixin_39579468 weixin_39579468 4月前

    Still seeing this error intermittently on Ubuntu 20.10 with 0.23.0.

    when it works:

    bash
     java -version
    openjdk version "11.0.9" 2020-10-20
    OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9+11)
    Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.23.0, JRE 11 Linux amd64-64-Bit Compressed References 20201022_810 (JIT enabled, AOT enabled)
    OpenJ9   - 0394ef754
    OMR      - 582366ae5
    JCL      - 3b09cfd7e9 based on jdk-11.0.9+11)
    

    when it fails:

    
    java -version
    Assertion failed at ../../../../../omr/compiler/x/env/OMRCPU.cpp:267: self()->supports_feature_test(feature)
    VMState: 0x0005ffff
        old api and new api did not match, feature 107
    compiling java/lang/Double.longBitsToDouble(J)D at level: cold
    #0: /usr/lib/jvm/adoptopenjdk-11-openj9-amd64/lib/compressedrefs/libj9jit29.so(+0x8b7ee5) [0x7f65cfa75ee5]
    <... snip ...>
    </...>

    Steps to repro:

    1. Fresh install of Ubuntu 20.10
    2. Set up adoptopenjdk repo as here
    3. sudo apt-get install adoptopenjdk-11-openj9
    4. Run
      java -version
      repeatedly. Fails maybe 1/3 of the time.

    Unlike the original poster my JAVA_HOME is pointed to the jdk11 installation.

    Crash dump: diagnostics.zip

    点赞 评论 复制链接分享
  • weixin_39579468 weixin_39579468 4月前

    This issue appears to be related to the Linux kernel version. 5.8.0-29-generic works for OpenJ9 0.21.0 and 0.23.0 5.8.0-31-generic is broken for OpenJ9 0.21.0 and 0.23.0

    Hope this is helpful. I don't know if it's an issue solely in the kernel, solely in OpenJ9, or due to some interaction between the two. I've downgraded to 5.8.0-29 for the short term.

    点赞 评论 复制链接分享
  • weixin_39878646 weixin_39878646 4月前

    fyi

    点赞 评论 复制链接分享
  • weixin_39878646 weixin_39878646 4月前

    fyi as well

    点赞 评论 复制链接分享
  • weixin_39579468 weixin_39579468 4月前

    This issue appears to be fixed in kernel 5.8.0-33-generic. I see in the release notes there are some references to bug fixes in the upstream for race conditions which might explain the intermittent behavior I was seeing. This issue can be closed as far as I'm concerned. Thanks!

    点赞 评论 复制链接分享
  • weixin_39878646 weixin_39878646 4月前

    Thanks for updating us.

    点赞 评论 复制链接分享

相关推荐