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.27k stars 721 forks source link

OpenJ9-17 crashes while other versions report NullPointerException normally #18612

Closed TheSail28 closed 9 months ago

TheSail28 commented 9 months ago

Affected versions

We found a test case with execution problems. To facilitate analysis, we simplified the test case and the simplified class file can ben found at attachment.

Java -version output

openjdk version "1.8.0_382"
IBM Semeru Runtime Open Edition (build 1.8.0_382-b05)
Eclipse OpenJ9 VM (build openj9-0.40.0, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20230810_729 (JIT enabled, AOT enabled)
OpenJ9   - d12d10c9e
OMR      - e80bff83b
JCL      - c4d2c2bafb based on jdk8u382-b05)
openjdk version "11.0.20.1" 2023-08-24
IBM Semeru Runtime Open Edition 11.0.20.1 (build 11.0.20.1+1)
Eclipse OpenJ9 VM 11.0.20.1 (build openj9-0.40.0, JRE 11 Linux amd64-64-Bit Compressed References 20230824_836 (JIT enabled, AOT enabled)
OpenJ9   - d12d10c9e
OMR      - e80bff83b
JCL      - 0880e8df04 based on jdk-11.0.20.1+1)
openjdk version "17.0.8.1" 2023-08-24
IBM Semeru Runtime Open Edition 17.0.8.1 (build 17.0.8.1+1)
Eclipse OpenJ9 VM 17.0.8.1 (build openj9-0.40.0, JRE 17 Linux amd64-64-Bit Compressed References 20230824_549 (JIT enabled, AOT enabled)
OpenJ9   - d12d10c9e
OMR      - e80bff83b
JCL      - 8ecf238a124 based on jdk-17.0.8.1+1)

Reproduce

jdk_linux_8_openj9/bin/java -cp ./ TestCoreMetaData

jdk_linux_11_openj9/bin/java -cp ./ TestCoreMetaData

jdk_linux_17_openj9/bin/java -cp ./ TestCoreMetaData

Problem summary

When executing test cases, OpenJ9-17 crashes while other versions report NullPointerException normally. The exact crash message is below:

Exception in thread "main" 12:51:43.966 0x1aa00 omrport.359    *   ** ASSERTION FAILED ** at /home/jenkins/workspace/build-scripts/jobs/jdk17u/jdk17u-linux-x64-openj9/workspace/build/src/omr/port/common/omrmemtag.c:145: ((memoryCorruptionDetected))
JVMDUMP039I Processing dump event "traceassert", detail "" at 2023/12/13 20:51:43 - please wait.
JVMDUMP032I JVM requested System dump using '/home/ningmo2004/class_valid/temp/testcase5/core.20231213.205143.119645.0001.dmp' in response to an event
JVMPORT030W /proc/sys/kernel/core_pattern setting "|/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" specifies that the core dump is to be piped to an external program.  Attempting to rename either core or core.119671.  Review the manual for the external program to find where the core dump is written and ensure the program does not truncate it.

JVMPORT049I The core file created by child process with pid = 119671 was not found. Review the documentation for the /proc/sys/kernel/core_pattern program "|/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" to find where the core file is written and ensure that program does not truncate it.

JVMDUMP012E Error in System dump: /home/ningmo2004/class_valid/temp/testcase5/core.20231213.205143.119645.0001.dmp
JVMDUMP032I JVM requested Java dump using '/home/ningmo2004/class_valid/temp/testcase5/javacore.20231213.205143.119645.0002.txt' in response to an event
JVMDUMP010I Java dump written to /home/ningmo2004/class_valid/temp/testcase5/javacore.20231213.205143.119645.0002.txt
JVMDUMP032I JVM requested Snap dump using '/home/ningmo2004/class_valid/temp/testcase5/Snap.20231213.205143.119645.0003.trc' in response to an event
JVMDUMP010I Snap dump written to /home/ningmo2004/class_valid/temp/testcase5/Snap.20231213.205143.119645.0003.trc
JVMDUMP013I Processed dump event "traceassert", detail "".

Due to the complexity of the test case logic, only limited simplifications have been made. To facilitate further analysis, not only bytecode files, but also dump and other files are provided in the attachment.

Attachment

testcase5.zip

pshipton commented 9 months ago

This seems to already be fixed in 17.0.9