adoptium / aqa-tests

Home of test infrastructure for Adoptium builds
https://adoptium.net/aqavit
Apache License 2.0
130 stars 308 forks source link

java/nio/MappedByteBuffer/Truncate.java.Truncate got VM crashes with hotspot jdk8 (Zero Interpreter) #1052

Open sophia-guo opened 5 years ago

sophia-guo commented 5 years ago

java/nio/MappedByteBuffer/Truncate.java consistently got VM crashed with s390x hotspot jdk8.

Stacktrace

Unexpected exit from test [exit code: 134]    

Standard Output

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (os_linux_zero.cpp:202), pid=61427, tid=0x000003ff63fff910
#  Error: ShouldNotCall()
#
# JRE version: OpenJDK Runtime Environment (8.0_202-b08) (build 1.8.0_202-201903300430-b08)
# Java VM: OpenJDK 64-Bit Zero VM (25.202-b08 interpreted mode linux-s390x )
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /data/jenkins/workspace/openjdk8_hs_openjdktest_s390x_linux/jvmtest/openjdk_regression/work/scratch/2/hs_err_pid61427.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

https://ci.adoptopenjdk.net/view/Test_openjdk/job/openjdk8_hs_openjdktest_s390x_linux/18/consoleFull

jerboaa commented 5 years ago

This isn't an s390x specific issue. It's Zero VM related. I can reproduce on x86_64, Zero. The issue is that Zero doesn't support unsafe accesses as they are platform specific. The idea about Zero is to make it as little platform specific as possible. The code which catches this reads:

      if (thread->thread_state() == _thread_in_vm &&
               sig == SIGBUS && thread->doing_unsafe_access()) {
      ShouldNotCallThis();
    }

The method on TOS is sun.misc.Unsafe.getByte(J)B called by java.nio.MappedByteBuffer.load()Ljava/nio/MappedByteBuffer;. Unless somebody steps up implementing this upstream I don't think this issue will change.

M-Davies commented 4 years ago

Just as an extra note, this also occurs on arm32 with a similar outcome . This was on a non JIT build so it likely follows the same pattern @jerboaa mentioned above https://github.com/AdoptOpenJDK/openjdk-tests/issues/1548

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (os_linux_zero.cpp:202), pid=30758, tid=0x90b7e460
#  Error: ShouldNotCall()
#
# JRE version: OpenJDK Runtime Environment (8.0_232-b09) (build 1.8.0_232-b09)
# Java VM: OpenJDK Zero VM (25.232-b09 interpreted mode linux-arm )
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/jenkins/workspace/Grinder/openjdk-tests/TKG/test_output_15790525703979/jdk_nio_0/work/scratch/hs_err_pid30758.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#