JDK-5035395 : assert in DWhet test with -server -Xcomp on sparc
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 5.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2004-04-21
  • Updated: 2004-05-03
  • Resolved: 2004-05-03
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.
Other
5.0 b50Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
The test DWhet fails starting from b42 Tiger. I attached the test files.

% /java/re/jdk/1.5.0/promoted/all/b42/binaries/solaris-sparc/bin/java_g  -server -Xcomp DWhet
Warning: missing arguments are set to defaults.
Application usage: DWhet <iterations> <loops>
        iterations    default value is 10
        loops         default value is 100

# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/phaseX.hpp:155]
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  Internal Error (/BUILD_AREA/jdk1.5.0/hotspot/src/share/vm/opto/phaseX.hpp, 155 [ Patched ]), pid=24719, tid=8
#
# Java VM: Java HotSpot(TM) Server VM (1.5.0-beta2-b42-debug compiled mode)
#
# Error: assert(t != 0,"must set before get")
# An error report file with more information is saved as hs_err_pid24719.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Current thread is 8
Dumping core ...
Abort
jaberwocky% hs_err hs_err_pid24719.log
# 
# An unexpected error has been detected by HotSpot Virtual Machine: 
# 
#  Internal Error (/BUILD_AREA/jdk1.5.0/hotspot/src/share/vm/opto/phaseX.hpp, 155 [ Patched ]), pid=24719, tid=8 
# 
# Java VM: Java HotSpot(TM) Server VM (1.5.0-beta2-b42-debug compiled mode) 
# 
# Error: assert(t != 0,"must set before get") 
 
---------------  T H R E A D  --------------- 
 
Current thread (0x0017ab38):  JavaThread "CompilerThread1" daemon [_thread_in_native, id=8] 
 
Stack: [0xf7f00000,0xf7f80000),  sp=0xf7f7dd00,  free space=503k 
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) 
V  [libjvm_g.so+0xe2467c] void VMError::report_and_die() + 0x804
V  [libjvm_g.so+0x54597c] void report_assertion_failure(const char*,int,const char*) + 0xa4
V  [libjvm_g.so+0xd03bd0] const Type*PhaseTransform::type(const Node*)const + 0x90
V  [libjvm_g.so+0xcfafac] Node*SubINode::Ideal(PhaseGVN*,int) + 0x6f4
V  [libjvm_g.so+0xbcff5c] Node*PhaseIterGVN::transform_old(Node*) + 0x10c
V  [libjvm_g.so+0xbcfe20] Node*PhaseIterGVN::transform(Node*) + 0xa0
V  [libjvm_g.so+0xcfac78] Node*SubINode::Ideal(PhaseGVN*,int) + 0x3c0
V  [libjvm_g.so+0xbd021c] Node*PhaseIterGVN::transform_old(Node*) + 0x3cc
V  [libjvm_g.so+0xbcfa4c] void PhaseIterGVN::optimize() + 0x194
V  [libjvm_g.so+0x4a5b9c] void Compile::Optimize() + 0x12c
V  [libjvm_g.so+0x4a0a34] Compile::Compile(ciEnv*,C2Compiler*,ciMethod*,int,int) + 0xdec
V  [libjvm_g.so+0x33d3d8] void C2Compiler::compile_method(ciEnv*,ciMethod*,int) + 0x100
V  [libjvm_g.so+0x4b9dbc] void CompileBroker::invoke_compiler_on_method(CompileTask*) + 0x4cc
V  [libjvm_g.so+0x4b919c] void CompileBroker::compiler_thread_loop() + 0x474
V  [libjvm_g.so+0xd68ce8] void compiler_thread_entry(JavaThread*,Thread*) + 0x90
V  [libjvm_g.so+0xd631cc] void JavaThread::thread_main_inner() + 0x14c
V  [libjvm_g.so+0xd63068] void JavaThread::run() + 0x1b0
V  [libjvm_g.so+0xb29704] _start + 0x274
 
 
Current CompileTask: 
opto:519   b  DWhet.benchmark()LWhet$WhetResult; (1108 bytes) 
 
 
---------------  P R O C E S S  --------------- 
 
Java Threads: ( => current thread ) 
  0x00288d58 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=9] 
=>0x0017ab38 JavaThread "CompilerThread1" daemon [_thread_in_native, id=8] 
  0x001796a8 JavaThread "CompilerThread0" daemon [_thread_blocked, id=7] 
  0x00178190 JavaThread "AdapterThread" daemon [_thread_blocked, id=6] 
  0x00176cd0 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5] 
  0x001675c0 JavaThread "Finalizer" daemon [_thread_blocked, id=4] 
  0x001655f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=3] 
  0x000550c8 JavaThread "main" [_thread_blocked, id=1] 
 
Other Threads: 
  0x00160678 VMThread [id=2] 
  0x001d7e60 WatcherThread [id=10] 
 
VM state:not at safepoint (normal execution) 
 
VM Mutex/Monitor currently owned by a thread: None 
 
Heap 
 def new generation   total 2112K, used 171K [0xefc00000, 0xefe20000, 0xf1150000) 
  eden space 2048K,   8% used [0xefc00000, 0xefc2acf8, 0xefe00000) 
  from space 64K,   0% used [0xefe00000, 0xefe00000, 0xefe10000) 
  to   space 64K,   0% used [0xefe10000, 0xefe10000, 0xefe20000) 
 tenured generation   total 1408K, used 0K [0xf1150000, 0xf12b0000, 0xf3c00000) 
   the space 1408K,   0% used [0xf1150000, 0xf1150000, 0xf1150200, 0xf12b0000) 
 compacting perm gen  total 16384K, used 1531K [0xf3c00000, 0xf4c00000, 0xf7c00000) 
   the space 16384K,   9% used [0xf3c00000, 0xf3d7ef18, 0xf3d7f000, 0xf4c00000) 
No shared spaces configured. 
 
Dynamic libraries: 
0x00010000      /java/re/jdk/1.5.0/promoted/all/b42/binaries/solaris-sparc/bin/java_g 
0xff380000      /usr/lib/libthread.so.1 
0xff3b0000      /usr/lib/libdl.so.1 
0xff280000      /usr/lib/libc.so.1 
0xff350000      /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1 
0xfe000000      /net/koori.sfbay/p/jdk07/jdk/1.5.0/beta2/b42/binaries/solaris-sparc/jre/lib/sparc/server/libjvm_g.so 
0xfdfe0000      /usr/lib/libsocket.so.1 
0xfdfc0000      /usr/lib/libsched.so.1 
0xfdf90000      /usr/lib/libCrun.so.1 
0xfdf40000      /usr/lib/libm.so.1 
0xfde80000      /usr/lib/libnsl.so.1 
0xff360000      /usr/lib/libw.so.1 
0xfde50000      /usr/lib/libmp.so.2 
0xfde30000      /usr/lib/librt.so.1 
0xfde10000      /usr/lib/libaio.so.1 
0xfddf0000      /usr/lib/libmd5.so.1 
0xfddd0000      /usr/platform/SUNW,Ultra-60/lib/libmd5_psr.so.1 
0xfdd70000      /net/koori.sfbay/p/jdk07/jdk/1.5.0/beta2/b42/binaries/solaris-sparc/jre/lib/sparc/native_threads/libhpi_g.so 
0xfdd30000      /net/koori.sfbay/p/jdk07/jdk/1.5.0/beta2/b42/binaries/solaris-sparc/jre/lib/sparc/libverify_g.so 
0xfdce0000      /net/koori.sfbay/p/jdk07/jdk/1.5.0/beta2/b42/binaries/solaris-sparc/jre/lib/sparc/libjava_g.so 
0xfdca0000      /net/koori.sfbay/p/jdk07/jdk/1.5.0/beta2/b42/binaries/solaris-sparc/jre/lib/sparc/libzip_g.so 
 
VM Arguments: 
jvm_args: -Xcomp 
java_command: DWhet 
 
Environment Variables: 
JAVA_HOME=/java/re/jdk/1.5.0/latest/binaries/solaris-sparc 
PATH=./:/export/home/kvn/bin:/java/re/jdk/1.5.0/latest/binaries/solaris-sparc/bin:/java/devtools/sparc/SUNWspro/SOS8/bin:/usr/bin:/usr/lib:/usr/ccs/bin:/usr/ccs/lib:/usr/sbin:/sbin:/etc:/usr/dist/exe:/usr/dt/bin:/usr/openwin/bin:/usr/ucb:/usr/ucb/bin:/java/devtools/sparc/bin:/java/devtools/sparc/gnucc/bin 
LD_LIBRARY_PATH=/net/koori.sfbay/p/jdk07/jdk/1.5.0/beta2/b42/binaries/solaris-sparc/jre/lib/sparc/server:/net/koori.sfbay/p/jdk07/jdk/1.5.0/beta2/b42/binaries/solaris-sparc/jre/lib/sparc:/net/koori.sfbay/p/jdk07/jdk/1.5.0/beta2/b42/binaries/solaris-sparc/jre/../lib/sparc 
SHELL=/bin/csh 
DISPLAY=:0.0 
 
 
---------------  S Y S T E M  --------------- 
 
OS:                           Solaris 9 s9_58shwpl3 SPARC 
           Copyright 2002 Sun Microsystems, Inc.  All Rights Reserved. 
                        Use is subject to license terms. 
                             Assembled 15 April 2002 
                     Solaris 9 Maintenance Update 4 applied 
 
uname:SunOS 5.9 Generic_112233-11 sun4u  (T2 libthread) 
rlimit: STACK 8192k, CORE 0k, NOFILE 65536, AS infinity 
load average:0.82 0.65 0.57 
 
CPU:total 2 has_v8, has_v9, has_vis1 
 
Memory: 8k page, physical 1048576k(237424k free) 
 
vm_info: Java HotSpot(TM) Server VM (1.5.0-beta2-b42) for solaris-sparc, built on Mar 11 2004 02:58:09 by unknown with unknown Workshop:0x550 
 
jaberwocky% 

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta2 FIXED IN: tiger-beta2 INTEGRATED IN: tiger-b50 tiger-beta2
08-07-2004

EVALUATION ###@###.### 2004-04-21 Again the case of missing or incorrect dead-loop check. [t@7 l@7]: print this->dump(3) 1 Con === 0 [[]] #top 1632 AddI === _ 1929 1 [[ 1929 ]] 1929 SubI === _ 1632 1 [[ 1632 1930 ]] The method SubINode::Ideal() has incorrect dead-loop check: Node *in1 = in(1); Node *in2 = in(2); if( in1 == this ) return NULL; if( in2 == this ) return NULL; It should check as ( in1->in(1) == this ) which covers both cases when a node point to itself directly or through an other node. May be we should just put the correct dead-loop check in Ideal() method for all nodes or move the check into PhaseIterGVN::transform_old(). The manual search for the nodes which should have it may (and will) miss some nodes or checks as this bug confirmed.
08-07-2004

SUGGESTED FIX ###@###.### 2004-04-27 Add dead loop check into SubINode::Ideal() and SubLNode::Ideal(). Also add TOP input check to skip transformations. Note, phase->eqv(in1, this) is not-virtual method which is inlined as ((Node*)in1 == (Node*)this). I used it to avoid explicit cast (Node*)this. In common C++ case the pointer to a derived class is not equal to the base class pointer. http://analemma.sfbay.sun.com/net/prt-archiver.sfbay/export2/archived_workspaces/main/c2_baseline/2004/20040426123810.kvn.5035395/workspace/webrevs/webrev-2004.04.26/index.html ========================================================== ###@###.### 2004-06-17 The fix is not complete. Use additional fix from the bug 5064230 fix.
17-06-2004