JDK-8154210 : Zero: Better byte behaviour
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: OpenJDK6,openjdk7u,8u91,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: generic
  • Submitted: 2016-04-14
  • Updated: 2016-10-13
  • Resolved: 2016-04-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9 Other
8u112Fixed 9 b120Fixed openjdk7uFixed
Description
After the JDK8u security patches got merged with 8u91 a Zero build of jdk8u crashes on java -version (caused by bad jump table).

./build/linux-x86_64-normal-zero-release/images/j2sdk-image/bin/java -version
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (os_linux_zero.cpp:254), pid=30205, tid=0x00007f877c96a700
#  fatal error: caught unhandled signal 11
#
# JRE version:  (8.0) (build )
# Java VM: OpenJDK 64-Bit Zero VM (25.71-b00 interpreted mode linux-amd64 )
# 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/sgehwolf/Documents/openjdk/upstream-sources/openjdk8u-dev/hs_err_pid30205.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)

In addition to that, on 64 bit systems (big endian) we are seeing the following issue on java -version:
Error occurred during initialization of VM
java.lang.ExceptionInInitializerError
        at java.lang.ref.Reference.<clinit>(Reference.java:235)
Caused by: java.lang.SecurityException: Unsafe
        at sun.misc.Unsafe.getUnsafe(Unsafe.java:90)
        at sun.misc.SharedSecrets.<clinit>(SharedSecrets.java:46)
        at java.lang.ref.Reference.<clinit>(Reference.java:235)

Comments
On jdk9/dev (which now have the security fixes) with the fix for JDK-8153275 I get (it fails to build in its entirety because the jmod calls during the build break): ./build/linux-x86_64-normal-zero-release/jdk/bin/java -version # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (interpreterRuntime.cpp:867), pid=23741, tid=23742 # fatal error: unexpected bytecode: return_register_finalizer # # JRE version: (9.0) (build ) # Java VM: OpenJDK 64-Bit Zero VM (9-internal+0-2016-04-22-115721.sgehwolf.openjdk9-dev, interpreted mode, serial gc, linux-amd64) # Core dump will be written. Default location: Core dumps may be processed with "/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t %P %I" (or dumping to /home/sgehwolf/Documents/openjdk/upstream-sources/openjdk9-dev/core.23741) # # An error report file with more information is saved as: # /home/sgehwolf/Documents/openjdk/upstream-sources/openjdk9-dev/hs_err_pid23741.log # # If you would like to submit a bug report, please visit: # http://bugreport.java.com/bugreport/crash.jsp # Aborted (core dumped)
22-04-2016

This is the fix for 8: http://icedtea.classpath.org/hg/release/icedtea8-forest-3.0/hotspot/rev/9498962aa166 It applies against the incomplete additional fix from bug 8146518.
21-04-2016

Something like this should fix it: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot/rev/986d0464b2a9
21-04-2016

Relevant commits which broke this are: http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/32b682649973 http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/cc78c97abff8
21-04-2016