JDK-8072422 : Cleanup: Remove some unused flags/code in loop optimizations
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8u112,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-02-03
  • Updated: 2022-12-06
  • Resolved: 2016-04-04
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
8-poolUnresolved 9 b115Fixed
Related Reports
Relates :  
Relates :  
Description
Running Java 9(build 1.9.0-ea-b48) on Linux-x64 with following options cause Java to print crash report:
java -XX:+UnlockDiagnosticVMOptions -XX:-UnrollLimitCheck

Got following output:
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f8d7f0525be, pid=23628, tid=140245277476608
#
# JRE version: Java(TM) SE Runtime Environment (9.0-b48) (build 1.9.0-ea-b48)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.9.0-ea-b48 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x78b5be]  PhaseIdealLoop::build_loop_late_post(Node*)+0x13e
#
# Core dump written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c" (or dumping to /home/dmitry/bundles/jdk9/b48/bin/core.23628)
#
# An error report file with more information is saved as:
# /home/dmitry/bundles/jdk9/b48/bin/hs_err_pid23628.log
......


java -version:
java version "1.9.0-ea"
Java(TM) SE Runtime Environment (build 1.9.0-ea-b48)
Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b48, mixed mode)

Comments
A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk8u-dev/pull/22 Date: 2022-03-25 07:05:23 +0000
25-03-2022

URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/a1e41855499b User: lana Date: 2016-04-20 17:53:12 +0000
20-04-2016

URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/a1e41855499b User: zmajo Date: 2016-04-04 13:26:48 +0000
04-04-2016

I reproduced the crash with a fastdebug build. Here is (part of) the error report, incl. the stacktrace: # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (/home/zmajo/Documents/repos/8072422/hotspot/src/share/vm/opto/loopnode.cpp:3615), pid=32727, tid=32746 # assert(false) failed: Bad graph detected in build_loop_late # # JRE version: Java(TM) SE Runtime Environment (9.0) (fastdebug build 9-internal+0-2016-03-29-142222.zmajo.8072422) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 9-internal+0-2016-03-29-142222.zmajo.8072422, mixed mode, tiered, compressed oops, g1 gc, linux-amd64) # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %P" (or dumping to /home/zmajo/Documents/repos/8072422/bug/core.32727) # # If you would like to submit a bug report, please visit: # http://bugreport.java.com/bugreport/crash.jsp # --------------- S U M M A R Y ------------ Command Line: -XX:+UnlockDiagnosticVMOptions -XX:-UnrollLimitCheck -XX:+PrintCompilation Host: zmajo-t440p, Intel(R) Core(TM) i5-4300M CPU @ 2.60GHz, 4 cores, 15G, Ubuntu 14.04.4 LTS Time: Tue Mar 29 14:45:31 2016 CEST elapsed time: 0 seconds (0d 0h 0m 0s) --------------- T H R E A D --------------- Current thread (0x00007fa43430e800): JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=32746, stack(0x00007fa3f01be000,0x00007fa3f02bf000)] Current CompileTask: C2: 200 91 4 java.lang.StringLatin1::hashCode (42 bytes) Stack: [0x00007fa3f01be000,0x00007fa3f02bf000], sp=0x00007fa3f02b9220, free space=1004k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x13386cf] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x18f V [libjvm.so+0x133941a] VMError::report_and_die(Thread*, char const*, int, char const*, char const*, __va_list_tag*)+0x4a V [libjvm.so+0x91099a] report_vm_error(char const*, int, char const*, char const*, ...)+0xea V [libjvm.so+0xea71ab] PhaseIdealLoop::build_loop_late_post(Node*)+0x32b V [libjvm.so+0xea76b3] PhaseIdealLoop::build_loop_late(VectorSet&, Node_List&, Node_Stack&)+0x103 V [libjvm.so+0xeac205] PhaseIdealLoop::build_and_optimize(bool, bool)+0x7e5 V [libjvm.so+0x89b275] Compile::Optimize()+0x6f5 V [libjvm.so+0x89d0f8] Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0x1308 V [libjvm.so+0x72fb93] C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x113 V [libjvm.so+0x8a7efe] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x3fe V [libjvm.so+0x8a8b20] CompileBroker::compiler_thread_loop()+0x2f0 V [libjvm.so+0x12bb149] JavaThread::thread_main_inner()+0x1c9 V [libjvm.so+0x12bb980] JavaThread::run()+0x1d0 V [libjvm.so+0x1068dca] java_start(Thread*)+0xea C [libpthread.so.0+0x8182] start_thread+0xc2 [...] The problem looks to have been there for a long time. I've tried 9-b32, 8u_60, 7u_80 -- all fail in loop optimizations (but not necessarily with the same assert).
29-03-2016

ILW=VM cant start, diagnostic flag, remove flag=MMH=P3
04-02-2015

Should we change the flag to develop?
03-02-2015

You are not suppose to run with this flag switched off. It is more develop flag then diagnostic used during feature development. I would suggest to low priority.
03-02-2015