United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6426402 JDWP: Unexpected JDWP Error in VirtualMachine.instanceCounts()
JDK-6426402 : JDWP: Unexpected JDWP Error in VirtualMachine.instanceCounts()

Details
Type:
Bug
Submit Date:
2006-05-16
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
core-svc
OS:
generic
Sub-Component:
debugger
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Backport:

Sub Tasks

Description
Failing test name:
	nsk/jdi/VirtualMachine/instanceCounts/instancecounts003
Test scenario:

Debugee VM load 2 classes with custom class loader, remove all references to this classes and try unload its forcing garbage collection.

Debugger VM call VirtualMachine.instanceCount() for classes which should be loaded in debugee VM with custom classloader until catch VMDisconnectedException.

Sometimes VirtualMachine.instanceCount() throws unexpected com.sun.jdi.InternalException. Fail reproduces intermittently(~1 of 10).

Test output:

>>>Classes was loaded
>>>Force GC
Unexpected exception:
com.sun.jdi.InternalException: Unexpected JDWP Error: 113
        at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:47)
        at com.sun.tools.jdi.VirtualMachineImpl.instanceCounts(VirtualMachineImpl.java:515)
        at UnloadClassTest.main(UnloadClassTest.java:229)


Test is attached

                                    

Comments
EVALUATION

There are times when the test debugger passes a list of classes to InstanceCounts
where all the classes in the list are not loaded.  This causes the error
return code to not be initialized which causes the error 113 to occur.

I think the testcase has a problem too - still investigating that.
                                     
2006-05-22
SUGGESTED FIX

------- util.c -------
2606a2607
>     error = JVMTI_ERROR_NONE;
                                     
2006-05-22



Hardware and Software, Engineered to Work Together