JDK-7004940 : CTW: assert(!def_outside->member(r)) failed: Use of external LRG overlaps the same LRG
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs20
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2010-12-06
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
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 6 JDK 7 Other
6u25Fixed 7Fixed hs20Fixed
Related Reports
Relates :  
Relates :  
Description
T2 sparcv9:

java -Xmx32m -XX:+AggressiveOpts -Xss4m -XX:+CompileTheWorld -XX:CompileTheWorldStartAt=4180 -Xbootclasspath/p:/net/sqenfs-1.sfbay/export1/comp/vm/testbase/CompileTheWorld/jarfiles/weblogicbig.jar

...

CompileTheWorld (4185) : jdbcTest/statement/getMoreResults
CompileTheWorld (4186) : jdbcTest/statement/getResultSet
# 
# A fatal error has been detected by the Java Runtime Environment: 
# 
#  Internal Error (/tmp/jprt/P1/B/201518.never/source/src/share/vm/opto/live.cpp:97), pid=7971, tid=93 
#  assert(!def_outside->member(r)) failed: Use of external LRG overlaps the same LRG defined in this block 
# 
# JRE version: 7.0 
# Java VM: OpenJDK 64-Bit Server VM (20.0-b03-201012032015.never.7004530-fastdebug mixed mode solaris-sparc compressed oops) 
# If you would like to submit a bug report, please visit: 
#   http://java.sun.com/webapps/bugreport/crash.jsp 
# 
 
---------------  T H R E A D  --------------- 
 
Current thread (0x00000001059fa800):  JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=93, stack(0xffffffff64200000,0xffffffff64300000)] 
 
Stack: [0xffffffff64200000,0xffffffff64300000],  sp=0xffffffff642fb4f0,  free space=1005k 
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) 
21554 exited.
V  [libjvm.so+0xcd41bc] void VMError::report_and_die() + 0x734
V  [libjvm.so+0xcb4e58] void report_vm_error(const char*,int,const char*,const char*) + 0x78
V  [libjvm.so+0x11355bc] void PhaseLive::compute(unsigned) + 0x32c
V  [libjvm.so+0x1070cb4] void PhaseChaitin::Register_Allocate() + 0xc2c
V  [libjvm.so+0x1096f4c] void Compile::Code_Gen() + 0x580
V  [libjvm.so+0x1090068] Compile::Compile(ciEnv*,C2Compiler*,ciMethod*,int,bool,bool) + 0x10a8
V  [libjvm.so+0x104c9b8] void C2Compiler::compile_method(ciEnv*,ciMethod*,int) + 0xb0
V  [libjvm.so+0x3f9ca8] void CompileBroker::invoke_compiler_on_method(CompileTask*) + 0x1d70
V  [libjvm.so+0x3f7914] void CompileBroker::compiler_thread_loop() + 0xb24
V  [libjvm.so+0xc130d4] void JavaThread::thread_main_inner() + 0x1a4
V  [libjvm.so+0xc12f10] void JavaThread::run() + 0x248
V  [libjvm.so+0xcec8e0] java_start + 0x300
 
Current CompileTask: 
C2:  63399  14  !b  jdbcTest.statement.getResultSet.run()V (196 bytes)

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/build/hotspot/rev/361783318e7e
25-12-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/361783318e7e
16-12-2010

EVALUATION 7004940: CTW: assert(!def_outside->member(r)) failed: Use of external LRG overlaps the same LRG Reviewed-by: kvn, twisti When splitting an LRG involving a phi the processing of the phi is delayed to the end and it is split by inserting copies in each of the predecessor blocks and then merging the new splits with the phi into a single LRG. The merging is done blindly after all the phis have been split. Usually this is fine because all MSCs are inserted at the end of the predecessor and they are disjoint LRGs by definition. The problem comes when rematerialization is done because this adds an extra use mixed in with the MSCs and that use might be the same LRG as one of the phis that was just split. If the rematerialize is done first then it all works out because of insertion order but if it's done afterwards then you can get the failure we're seeing. The fix is insert the rematerialized nodes above the MSCs that were inserted during the phi node splitting process. I also added/fixed some of the printing code in PhaseChaitin. Tested with full ctw on sparc 32 and 64 bit.
14-12-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/361783318e7e
14-12-2010