javaspring-bootdockerkubernetesopenj9

SpringBoot openJ9 Kubernetes Crash InterpreterEmulator.cpp:208


I'm randomly getting this crash recently and I'm not sure how to debug this. Can anyone please point me in the right direction. Tools I have used are,
Spring Boot 2 + Kubernetes + adopt openj9 jdk13

Assertion failed at /home/jenkins/workspace/build-scripts/jobs/jdk13u/jdk13u-linux-x64-openj9/workspace/build/src/build/linux-x86_64-server-release/vm/compiler/../compiler/optimizer/InterpreterEmulator.cpp:208: 0
VMState: 0x000501ff
        unexpected bytecode in thunk archetype 0x7f98f6483ee0 at bcIndex 40 JBdload2 (41)
compiling java/lang/invoke/AsTypeHandle.invokeExact_thunkArchetype_X(Ljava/lang/Object;Ljava/lang/Object;)V at level: warm
0:/opt/java/openjdk/lib/compressedrefs/libj9jit29.so(+0x798015) [0x7f9962316015]
1: /opt/java/openjdk/lib/compressedrefs/libj9jit29.so(+0x7a2dc0) [0x7f9962320dc0]
JVMDUMP039I Processing dump event “abort”, detail “” at 2020/05/12 16:35:10 - please wait.
JVMDUMP032I JVM requested System dump using ‘/home/springboot/core.20200512.163510.1.0001.dmp’ in response to an event

Solution

  • TLDR: This is fixed in the v.0.20.0 release (April 2020) of OpenJ9. The latest release binaries from AdoptOpenJDK for JDK 8, 11 & 14 contain the fix.

    The assertion failure is an assertion JIT compiling the MethodHandle (MH) code. A new abstract interpreter was added to give the JIT a better view of the MH "thunkArchetype" code and it missed some of the bytecodes that could occur in MH thunkArchetypes.

    See https://github.com/eclipse/openj9/pull/8598 for more details of the fix.