United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6938026 C2 compiler fails in Node::rematerialize()const
6938026 : C2 compiler fails in Node::rematerialize()const

Details
Type:
Bug
Submit Date:
2010-03-25
Status:
Resolved
Updated Date:
2011-04-22
Project Name:
JDK
Resolved Date:
2010-05-05
Component:
hotspot
OS:
solaris_10
Sub-Component:
compiler
CPU:
sparc
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u18,6u20
Fixed Versions:
hs18

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Duplicate:

Sub Tasks

Description
JRE 6 Update 18 b07 JVM showed four identical incidents of crashes:

 hs_err                 Date of crash               elapsed time
 ----------------------------------------------------------------
 hs_err_pid17587.log    Sun Mar 21 10:04:15 2010    13064 seconds
 hs_err_pid17296.log    Sun Mar 21 11:43:36 2010    17634 seconds
 hs_err_pid17299.log    Sun Mar 21 14:49:13 2010    28760 seconds
 hs_err_pid18174.log    Sun Mar 21 14:55:02 2010    29835 seconds 


% grep "#  SIGSEGV"  *.log
hs_err_pid17296.log:#  SIGSEGV (0xb) at pc=0xfeb1938c, pid=17296, tid=38
hs_err_pid17299.log:#  SIGSEGV (0xb) at pc=0xfeb1938c, pid=17299, tid=36
hs_err_pid17587.log:#  SIGSEGV (0xb) at pc=0xfeb1938c, pid=17587, tid=39
hs_err_pid18174.log:#  SIGSEGV (0xb) at pc=0xfeb1938c, pid=18174, tid=39
%


# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xfeb1938c, pid=17587, tid=39
#
# JRE version: 6.0_18-b07
# Java VM: Java HotSpot(TM) Server VM (16.0-b13 mixed mode solaris-sparc )
# Problematic frame:
# V  [libjvm.so+0x71938c]


In all 4 incidents the C2 compiler failed to compile the following code:

Current CompileTask:
C2:148% ! com.xxx.security.web.servlet.filters.CSPCookieFilter.getCSPCookieData(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Ljavax/servlet/http/HttpServletRequestWrapper; @ 31 (943 bytes) 



 Stack trace:

 Stack: [0x56a80000,0x56b00000], sp=0x56afe220, free space=1f8feb1938ck
 Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
 V [libjvm.so+0x71938c] bool Node::rematerialize()const+0x0
 V [libjvm.so+0x1a5018] void PhaseChaitin::Register_Allocate()+0x534
 V [libjvm.so+0x1a7fd0] void Compile::Code_Gen()+0x3a0
 V [libjvm.so+0x40addc] Compile::Compile(ciEnv*,C2Compiler*,ciMethod*,int,bool,bool)+0xed4
 V [libjvm.so+0x1c1da8] void C2Compiler::compile_method(ciEnv*,ciMethod*,int)+0xb8
 V [libjvm.so+0x1c2c34] void CompileBroker::invoke_compiler_on_method(CompileTask*)+0xa04
 V [libjvm.so+0x23aadc] void CompileBroker::compiler_thread_loop()+0x664
 V [libjvm.so+0x7f8368] void JavaThread::thread_main_inner()+0x50
 V [libjvm.so+0x728448] java_start+0x234

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/hsx/hsx17/baseline/rev/92a4b6d11ab3
                                     
2011-04-22
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/ef74d6d1ac1e
                                     
2010-04-15
EVALUATION

This appears to be a long standing issue with OSR entry points.  If ciTypeFlow proves that some local is null at the OSR entry it reports TypePtr::NULL_PTR as it's.  Type::basic_type report T_ADDRESS for NULL so think this local is a jsr/ret address and emit a load that is typed as TypeRawPtr::BOTTOM but the bytecodes think this is an oop of some kind.  Once this gets into the graph is can cause the graph to collapse in funny ways, in this case it allowed top into the final graph which causes us to die during register allocation.  The bug is triggered because the user of an agent in th program keeps more of the locals alive.  Without the use of the agent this local would be dead in the case where it went wrong and nothing would have happened.  As far as I can tell this has always been an issue but it took the right bytecodes to expose it.
                                     
2010-04-09



Hardware and Software, Engineered to Work Together