JDK-6969586 : OptimizeStringConcat: SIGSEGV in LoadNode::Value()
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs19
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2010-07-15
  • 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
6u21pFixed 7Fixed hs19Fixed
Description
We got next failure with OptimizeStringConcat:

% /java/re/jdk/7/latest/binaries/solaris-amd64/fastdebug/bin/java -d64 -version
java version "1.7.0-ea-fastdebug"
Java(TM) SE Runtime Environment (build 1.7.0-ea-fastdebug-b100)
Java HotSpot(TM) 64-Bit Server VM (build 19.0-b03-fastdebug, mixed mode)

% /java/re/jdk/7/latest/binaries/solaris-amd64/fastdebug/bin/java -d64 -Xcomp -XX:+OptimizeStringConcat -XX:CompileThreshold=100 -XX:+AggressiveOpts -XX:+UseCompressedOops -XX:+CompileTheWorld -XX:CompileTheWorldStartAt=2001 -XX:CompileTheWorldStopAt=3000 -XX:MaxPermSize=384M -Xmx512M -Xbootclasspath/p:/java/re/jdk/7/latest/binaries/solaris-amd64/jre/lib/rt.jar

CompileTheWorld (2150) : com/sun/jndi/ldap/LdapCtx$SearchArgs
CompileTheWorld (2151) : com/sun/jndi/ldap/LdapCtx
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xfffffd7f2f45a30c, pid=23223, tid=50
#
# JRE version: 7.0
# Java VM: Java HotSpot(TM) 64-Bit Server VM (19.0-b03-fastdebug compiled mode solaris-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x18ba30c]
#
# An error report file with more information is saved as:
# /export/kvn/VM/hs_err_pid23223.log
#
# 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 (0x0000000003290800):  JavaThread "CompilerThread0" daemon [_thread_in_native, id=50, stack(0xfffffd7ff80cc000,0xfffffd7ff81cc000)] 
 
siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000000000000020 
 
Registers: 
RAX=0x0000000000000000, RBX=0x0000000000000014, RCX=0x00000000fffffffe, RDX=0x0000000000000040 
RSP=0xfffffd7ff81c2f40, RBP=0xfffffd7ff81c2fc0, RSI=0x000000000426e5f8, RDI=0xfffffd7ff81c4490 
R8=0x0000000000000000, R9=0x00000000037a38b0, R10=0x000000000431aa58, R11=0x000000000431aa58 
R12=0x0000000003b1dfa8, R13=0xfffffd7ff81c4490, R14=0x00000000037a3950, R15=0x000000000426e5f8 
RIP=0xfffffd7f2f45a30c, RFLAGS=0x0000000000010282 
 
Top of Stack: (sp=0xfffffd7ff81c2f40) 
0xfffffd7ff81c2f40:   fffffd7ff81c4490 0000000000000001 
0xfffffd7ff81c2f50:   fffffd7ff81c2fc0 fffffd7f2f459196 
0xfffffd7ff81c2f60:   00000000037a3858 fffffd7f2f7655dc 
0xfffffd7ff81c2f70:   000000000426d9b8 fffffd7f30007eb8 
0xfffffd7ff81c2f80:   000000043000b5a2 fffffd7f30009239 
0xfffffd7ff81c2f90:   000000000361a558 00000000032aaf78 
0xfffffd7ff81c2fa0:   00000000000001e7 fffffd7ff81c4490 
0xfffffd7ff81c2fb0:   00000000037a3950 0000000000000001 
0xfffffd7ff81c2fc0:   fffffd7ff81c30e0 fffffd7f2f768fd7 
0xfffffd7ff81c2fd0:   0000000003290800 fffffd7f301da000 
0xfffffd7ff81c2fe0:   fffffd7f2f459170 fffffd7f30009239 
0xfffffd7ff81c2ff0:   0000000000000001 fffffd7f30007eb8 
0xfffffd7ff81c3000:   fffffd7f00000002 fffffd7f30009221 
0xfffffd7ff81c3010:   0000000000000000 fffffd7ff81c4e28 
0xfffffd7ff81c3020:   00000000037e4768 fffffd7f30007eb8 
0xfffffd7ff81c3030:   fffffd7f30009c13 fffffd7f30009bfb 
0xfffffd7ff81c3040:   fffffd7f30007ec8 fffffd7f301bc6ce 
0xfffffd7ff81c3050:   fffffd7f30009bc7 fffffd7f30009b90 
0xfffffd7ff81c3060:   fffffd7f30009b60 fffffd7f30210a07 
0xfffffd7ff81c3070:   fffffd7f30008f38 fffffd7f30008efe 
0xfffffd7ff81c3080:   fffffd7f30008ef0 fffffd7f30008fa3 
0xfffffd7ff81c3090:   fffffd7f30008f7f fffffd7f30008f71 
0xfffffd7ff81c30a0:   fffffd7f300098f1 fffffd7f300098a4 
0xfffffd7ff81c30b0:   fffffd7f300098a3 00000000032aaf78 
0xfffffd7ff81c30c0:   fffffd7f302818c8 fffffd7ff81c4490 
0xfffffd7ff81c30d0:   00000000037a3950 00000000037b84f0 
0xfffffd7ff81c30e0:   fffffd7ff81c3ef0 fffffd7f2f767564 
0xfffffd7ff81c30f0:   fffffd7ff81c31e0 fffffd7ff81c4ec0 
0xfffffd7ff81c3100:   fffffd7f3000993b fffffd7f30009925 
0xfffffd7ff81c3110:   fffffd7f30007ec4 fffffd7f3021087f 
0xfffffd7ff81c3120:   fffffd7f302109fb fffffd7f3000ae3c 
0xfffffd7ff81c3130:   fffffd7f300094a0 fffffd7f3000948a  
 
Instructions: (pc=0xfffffd7f2f45a30c) 
0xfffffd7f2f45a2fc:   c1 f5 83 f9 03 49 c7 c0 00 00 00 00 49 0f 47 c0 
0xfffffd7f2f45a30c:   48 8b 78 20 e8 fb a7 f0 fe 48 8b f8 8b f3 e8 41  
 
Stack: [0xfffffd7ff80cc000,0xfffffd7ff81cc000],  sp=0xfffffd7ff81c2f40,  free space=3db0000000000000001k 
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) 
V  [libjvm.so+0x18ba30c] const Type*LoadNode::Value(PhaseTransform*)const + 0x40c
V  [libjvm.so+0x1bc8fd7] Node*PhaseIterGVN::transform_old(Node*) + 0x887
V  [libjvm.so+0x1bc7564] void PhaseIterGVN::optimize() + 0x694
V  [libjvm.so+0x17cfc7c] void PhaseIdealLoop::build_and_optimize(bool,bool) + 0x103c
V  [libjvm.so+0x98d9fe] void Compile::Optimize() + 0x3ae
V  [libjvm.so+0x986376] Compile::Compile(ciEnv*,C2Compiler*,ciMethod*,int,bool,bool) + 0x1676
V  [libjvm.so+0x73962b] void C2Compiler::compile_method(ciEnv*,ciMethod*,int) + 0x10b
V  [libjvm.so+0x9a5de9] void CompileBroker::invoke_compiler_on_method(CompileTask*) + 0x11e9
V  [libjvm.so+0x9a3f08] void CompileBroker::compiler_thread_loop() + 0xdb8
V  [libjvm.so+0x1f90a14] void JavaThread::thread_main_inner() + 0x1b4
V  [libjvm.so+0x1f90651] void JavaThread::run() + 0x621
V  [libjvm.so+0x1af1daa] java_start + 0x66a
C  [libc.so.1+0x114ad4]  _thrp_setup+0xbc _thrp_setup + 0xbc
C  [libc.so.1+0x114d90]  _lwp_start+0x0 _lwp_start + 0x0
 
 
Current CompileTask: 
C2:7239  !b  com.sun.jndi.ldap.LdapCtx.connect(Z)V (500 bytes)

Comments
EVALUATION http://hg.openjdk.java.net/hsx/hsx19/baseline/rev/0652d205acda
08-10-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/02f0a9b6f654 6969586: OptimizeStringConcat: SIGSEGV in LoadNode::Value() Reviewed-by: kvn The logic in memnode that tries to constant fold loads from constant Strings doesn't handle a NULL base properly leading to a SEGV. The fix is to test if the type is a really a constant TypeOopPtr instead of testing that the node is a ConP. Tested with failing CTW test case.
09-09-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/02f0a9b6f654
04-09-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/02f0a9b6f654
31-08-2010