JDK-7195619 : NPG: N-1 ClassLoaderReference.referringObjects() in permgen removal code
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2012-08-31
  • Updated: 2012-09-12
  • Resolved: 2012-09-12
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 8
8Resolved
Related Reports
Duplicate :  
Description
Test

nsk/jdi/ObjectReference/referringObjects/referringObjects002

fails because it doesn't return enough refferring objects with the permgen elimination code.

debugee.stderr> Debuggee nsk.jdi.ObjectReference.referringObjects.referringObject
s002.referringObjects002a : sending the command: ready
# ERROR: Unexpected size of ClassLoaderReference.referringObjects: 15, expected:
16
debugee.stderr> Debuggee: received the command: deleteClassObjectReferrers
debugee.stderr> Debuggee nsk.jdi.ObjectReference.referringObjects.referringObject
s002.referringObjects002a : sending the command: ready
# ERROR: Unexpected size of ClassLoaderReference.referringObjects: 1, expected: 2
debugee.stderr> Debuggee: received the command: unloadClass:nsk.share.jdi.TestCla
ss1:unloadResultFalse

Comments
EVALUATION This is caused by: 7197269: NPG: FollowReferences has no ClassLoader -> Class link to follow The test (referringObjects002.checkClassObjectReferrersCount) does the following: // Only this referrers should left: // 1 referrer is classloader // 1 referrer is debugee class unloader expectedReferrersCount = 2; checkClassObjectReferrersCount(classObjectReference, expectedReferrersCount); but fails because JVMTI FollowReferences doesn't find the Class from the ClassLoader. This is the call from the Debugger/test process: JDWP$ObjectReference$ReferringObjects.process(VirtualMachineImpl, ObjectReferenceImpl, int) ClassObjectReferenceImpl(ObjectReferenceImpl).referringObjects(long) referringObjects002.checkClassObjectReferrersCount(ClassObjectReference, int) referringObjects002.doTest() This is what the Debugee process end up calling: JvmtiEnv::FollowReferences ... vm/prims/jvmtiEnv.cpp:1622 jvmti_FollowReferences ... generated/jvmtifiles/jvmtiEnter.cpp:1852 objectReferrers ... libjdwp.so referringObjects ... libjdwp.so debugLoop_run ... libjdwp.so attachThread ... libjdwp.so JvmtiAgentThread::call_start_function ... vm/prims/jvmtiImpl.cpp:90 JvmtiAgentThread::start_function_wrapper ... vm/prims/jvmtiImpl.cpp:84
12-09-2012