JDK-7114106 : C1: assert(goto_state->is_same(sux_state)) failed: states must match now
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-11-21
  • Updated: 2012-03-29
  • Resolved: 2012-03-29
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 7 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
Related Reports
Relates :  
Relates :  
Description
Test in attachment crashes in fastdebug with hs_err below.
Works fine in product.

;; Using jvm: "/export/local/common/jdk/baseline/solaris-sparc/jre/lib/sparc/client/libjvm.so"
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/jprt/P1/183235.never/source/src/share/vm/c1/c1_Optimizer.cpp:190), pid=1878, tid=7
#  assert(goto_state->is_same(sux_state)) failed: states must match now
#
# JRE version: 7.0-b147
# Java VM: Java HotSpot(TM) Client VM (23.0-b06-internal-201111181832.never.7110489-fastdebug compiled mode, sharing solaris-sparc )
# Core dump written. Default location: /export/local/56398.JDK7.NIGHTLY.VM_solaris-sparc_jittester_client_comp_testlist/results/wrk_dir1321846985332/core or core.1878
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x000f3800):  JavaThread "C1 CompilerThread0" daemon [_thread_in_native, id=7, stack(0xfb130000,0xfb1b0000)]

Stack: [0xfb130000,0xfb1b0000],  sp=0xfb1aed90,  free space=507k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xd9d9a4]  void VMError::report_and_die()+0x7e0;;  void VMError::report_and_die()+0x7e0
V  [libjvm.so+0x4ed1b0]  void report_vm_error(const char*,int,const char*,const char*)+0x74;;  void report_vm_error(const char*,int,const char*,const char*)+0x74
V  [libjvm.so+0x31f1d0]  void CE_Eliminator::block_do(BlockBegin*)+0xc48;;  void CE_Eliminator::block_do(BlockBegin*)+0xc48
V  [libjvm.so+0x288a28]  void BlockBegin::iterate_preorder(boolArray&,BlockClosure*)+0xcc;;  void BlockBegin::iterate_preorder(boolArray&,BlockClosure*)+0xcc
V  [libjvm.so+0x288aec]  void BlockBegin::iterate_preorder(boolArray&,BlockClosure*)+0x190;;  void BlockBegin::iterate_preorder(boolArray&,BlockClosure*)+0x190
V  [libjvm.so+0x288aec]  void BlockBegin::iterate_preorder(boolArray&,BlockClosure*)+0x190;;  void BlockBegin::iterate_preorder(boolArray&,BlockClosure*)+0x190
V  [libjvm.so+0x288e74]  void BlockBegin::iterate_preorder(BlockClosure*)+0x1a0;;  void BlockBegin::iterate_preorder(BlockClosure*)+0x1a0
V  [libjvm.so+0x31fa28]  void Optimizer::eliminate_conditional_expressions()+0x44;;  void Optimizer::eliminate_conditional_expressions()+0x44
V  [libjvm.so+0x27c8e0]  void IR::optimize()+0x94;;  void IR::optimize()+0x94
V  [libjvm.so+0x244974]  void Compilation::build_hir()+0x2e8;;  void Compilation::build_hir()+0x2e8
V  [libjvm.so+0x2459bc]  int Compilation::compile_java_method()+0x1f8;;  int Compilation::compile_java_method()+0x1f8
V  [libjvm.so+0x245e78]  void Compilation::compile_method()+0xb0;;  void Compilation::compile_method()+0xb0
V  [libjvm.so+0x246ac8]  Compilation::Compilation(AbstractCompiler*,ciEnv*,ciMethod*,int,BufferBlob*)+0x1f4;;  Compilation::Compilation(AbstractCompiler*,ciEnv*,ciMethod*,int,BufferBlob*)+0x1f4
V  [libjvm.so+0x249340]  void Compiler::compile_method(ciEnv*,ciMethod*,int)+0x3c4;;  void Compiler::compile_method(ciEnv*,ciMethod*,int)+0x3c4
V  [libjvm.so+0x45a8e0]  void CompileBroker::invoke_compiler_on_method(CompileTask*)+0x16d4;;  void CompileBroker::invoke_compiler_on_method(CompileTask*)+0x16d4
V  [libjvm.so+0x458d10]  void CompileBroker::compiler_thread_loop()+0x71c;;  void CompileBroker::compiler_thread_loop()+0x71c
V  [libjvm.so+0xd013e4]  void JavaThread::thread_main_inner()+0x2fc;;  void JavaThread::thread_main_inner()+0x2fc
V  [libjvm.so+0xd010d0]  void JavaThread::run()+0x25c;;  void JavaThread::run()+0x25c
V  [libjvm.so+0xb343b4]  java_start+0x264;;  java_start+0x264


Current CompileTask:
C1: 579710 4456    b        Test_Class_2::<clinit> (97 bytes)

Comments
EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/7bca37d28f32
22-03-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/7bca37d28f32
13-12-2011

EVALUATION 6986046 (C1 valuestack cleanup) broke this. C1 tries to performs a conditional expression elimination where, before 6986046, it would find that required conditions are not met for such an optimization. As part of the checks that C1 does to verify whether it can perform CEE, the stack size after the true/false blocks (in the common successor) is checked to be greater than the stack size before the true/false blocks (after the If node). This test now succeeds and permits CEE where, before 6986046, it failed. The problem here is that the state after the If is at inlining depth 1 while the state in the common successor is at inlining depth 0 so the stack sizes from the states before and after the true/false blocks can't simply be compared now that 6986046 fixed handling of inlining in states. Inlining depth needs to match.
12-12-2011