JDK-4700525 : com.sun.jdi.ClassType.newInstance causes a crash of debugee
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.1,1.4.2,5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2002-06-11
  • Updated: 2004-03-23
  • Resolved: 2004-03-23
Related Reports
Duplicate :  
Description

Name: vpR10197			Date: 06/11/2002


The following test from testbase_nsk:
        nsk/jdi/ClassType/newInstance/newinstance004
crashes debugee's VM in -server -Xcomp modes on x86 platforms and
on solsparcV9.

The test checks up the following assertion of 
com.sun.jdi.ClassType.newInstance spec:
  If the invoked method throws an exception, this method will throw 
  an InvocationException which contains a mirror to the exception 
  object thrown. 
and works as follows:
A class from debugee part has a constructor, which throws uncought 
NullPointerException. When debugger is trying to call the newInstance 
method with a mirror to this constructor as second parameter, 
debugee's VM crashes.

This bug looks like 4692404 except for the crash on solsparcV9.

I ran the test on:
 - MS Windows 2000 5.00.2195 SP 2
 - SunOS 5.8 Generic_108529-14 i86pc i386 i86pc
 - SunOS 5.8 Generic_108528-14 sun4u sparc SUNW,Ultra-60
 - Red Hat Linux release 7.2 (Enigma)
This test fails since the hopper-b08 and passes with earlier builds.

The test will appear in the next testbase_nsk r15 release, 

How to reproduce:
 1. cd /net/sqesvr.sfbay/export/vsn/GammaBase/Bugs/{this_bug_number}
 2. sh doit.sh <JAVA_HOME> <D64_MODE>

Below are examples of the test outputs on solsparcV9:
=====================================================
debugee.stdout> 
debugee.stdout> Unexpected Signal : 11 occurred at PC=0xFFFFFFFF7D212E98
debugee.stdout> Function=[Unknown. Nearest: JVM_RawMonitorExit+0x4EF8]
debugee.stdout> Library=/net/java9/export/home/java/dest/jdk1.4.1-b14/solaris-sparcv9/jre/lib/sparcv9/server/libjvm.so
debugee.stdout> 
debugee.stdout> Current Java thread:
debugee.stdout>         at nsk.jdi.ClassType.newInstance.newinstance004a.<init>(newinstance004a.java:53)
debugee.stdout>         at nsk.jdi.ClassType.newInstance.newinstance004a.main(newinstance004a.java:33)
debugee.stdout> 
debugee.stdout> Dynamic libraries:
debugee.stdout> 0x100000000     /net/java9/export/home/java/dest/jdk1.4.1-b14/solaris-sparcv9/jre/bin/sparcv9/java
debugee.stdout> 0xffffffff7f300000      /usr/lib/64/libthread.so.1
debugee.stdout> 0xffffffff7f500000      /usr/lib/64/libdl.so.1
debugee.stdout> 0xffffffff7ef00000      /usr/lib/64/libc.so.1
debugee.stdout> 0xffffffff7ee00000      /usr/platform/SUNW,Ultra-60/lib/sparcv9/libc_psr.so.1
debugee.stdout> 0xffffffff7d000000      
/net/java9/export/home/java/dest/jdk1.4.1-b14/solaris-sparcv9/jre/lib/sparcv9/server/libjvm.so
debugee.stdout> 0xffffffff7ce00000      /usr/lib/64/libCrun.so.1
debugee.stdout> 0xffffffff7cc00000      /usr/lib/64/libsocket.so.1
debugee.stdout> 0xffffffff7ca00000      /usr/lib/64/libnsl.so.1
debugee.stdout> 0xffffffff7c800000      /usr/lib/64/libm.so.1
debugee.stdout> 0xffffffff7da00000      /usr/lib/64/libw.so.1
debugee.stdout> 0xffffffff7c500000      /usr/lib/64/libmp.so.2
debugee.stdout> 0xffffffff7c200000      
/net/java9/export/home/java/dest/jdk1.4.1-b14/solaris-sparcv9/jre/lib/sparcv9/native_threads/libhpi.so
debugee.stdout> 0xffffffff7c000000      
/net/java9/export/home/java/dest/jdk1.4.1-b14/solaris-sparcv9/jre/lib/sparcv9/libverify.so
debugee.stdout> 0xffffffff7bd00000      
/net/java9/export/home/java/dest/jdk1.4.1-b14/solaris-sparcv9/jre/lib/sparcv9/libjava.so
debugee.stdout> 0xffffffff7bb00000      /net/java9/export/home/java/dest/jdk1.4.1-b14/solaris-sparcv9/jre/lib/sparcv9/libzip.so
debugee.stdout> 0xffffffff2ff00000      
/net/java9/export/home/java/dest/jdk1.4.1-b14/solaris-sparcv9/jre/lib/sparcv9/libjdwp.so
debugee.stdout> 0xffffffff2fd00000      
/net/java9/export/home/java/dest/jdk1.4.1-b14/solaris-sparcv9/jre/lib/sparcv9/libdt_socket.so
debugee.stdout> 0xffffffff2fb00000      /usr/lib/64/nss_nisplus.so.1
debugee.stdout> 0xffffffff2f700000      /usr/lib/64/libdoor.so.1
debugee.stdout> 0xffffffff2e500000      /net/java9/export/home/java/dest/jdk1.4.1-b14/solaris-sparcv9/jre/lib/sparcv9/libnet.so
debugee.stdout> 
debugee.stdout> Local Time = Mon Jun 10 16:56:30 2002
debugee.stdout> Elapsed Time = 47
debugee.stdout> #
debugee.stdout> # HotSpot Virtual Machine Error : 11
debugee.stdout> # Error ID : 4F530E43505002E6 01
debugee.stdout> # Please report this error at
debugee.stdout> # http://java.sun.com/cgi-bin/bugreport.cgi
debugee.stdout> #
debugee.stdout> # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.4.1-beta-b14 compiled mode)
debugee.stdout> #
debugee.stdout> # An error report file has been saved as hs_err_pid8007.log.
debugee.stdout> # Please refer to the file for further information.
debugee.stdout> #

Outputs for other platforms you may see in bugreport for 4692404

======================================================================

Comments
EVALUATION Most likely a dup of 4692404. Confirmed that the fix for 4692404 takes care of this bug too.
11-06-2004

PUBLIC COMMENTS this bug is rerpoducible in tiger-beta ###@###.### 2003-12-08
08-12-2003