JDK-8086068 : VM crashes with "-Xint -XX:+UseCompiler" options
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-06-09
  • Updated: 2016-05-26
  • Resolved: 2016-04-21
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 9
9 b120Fixed
Related Reports
Relates :  
Description
JDK 9 b66 crash(SIGSEGV) when ran simple HelloWorld with "-Xint -XX:+UseCompiler" options on Linux-x64 platform. 

Running next command give following result(hs_err_pid23122.log and replay_pid23122.log are attached): 
java -Xint -XX:+UseCompiler HelloWorld
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f8566590fe0, pid=23122, tid=0x00007f854d51f700
#
# JRE version: Java(TM) SE Runtime Environment (9.0-b66) (build 1.9.0-ea-b66)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.9.0-ea-b66 interpreted mode linux-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x638fe0]  CodeHeap::allocate(unsigned long)+0x0
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c" (or dumping to /home/dmitry/bundles/jdk9/b66/bin/core.23122)
#
# An error report file with more information is saved as:
# /home/dmitry/bundles/jdk9/b66/bin/hs_err_pid23122.log

JDK 9-fastdebug hit assertion in this case:
java -Xint -XX:+UseCompiler HelloWorld 
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/codeCache.cpp:376
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/HUDSON/workspace/9-2-build-linux-amd64/jdk9/2755/hotspot/src/share/vm/code/codeCache.cpp:376), pid=23196, tid=0x00007f1a702ed700
#  assert(heap != __null) failed: heap is null
#
...

JDK 8u45 not affected.

Comments
The VM crashes in product or fails with an assert in debug if -Xint and -XX:+UseCompiler is set. This is because CodeCache::heap_available() relies on the fact that if Arguments::mode() == _int, no compilation will be triggered. Although UseCompiler is first disabled by -Xint, the flag may be re-enabled if set via command line. The solution is to catch such an inconsistent flag combination, issue a warning and reset the flag: http://cr.openjdk.java.net/~thartmann/8086068/webrev.00/
20-04-2016

I'll fix this in 9 because it's a regression introduced by the Segmented Code Cache (JDK-8043304).
19-04-2016

ILW=crash on vm init, improbable use case, none=MLH=P4
18-06-2015