JDK-8174856 : [TESTBUG] Missing DefineClass instances
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-02-13
  • Updated: 2020-09-01
  • Resolved: 2017-02-16
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 10 JDK 9
10Fixed 9 b159Fixed
Related Reports
Relates :  
Description
Test: hotspot/test/runtime/Metaspace/DefineClass.java

----------System.out:(9/661)----------
sizeof(DefineClass.class) == 9056
class test.DefineClass
Index Super InstBytes KlassBytes annotations   CpAll MethodCount Bytecodes MethodAll   ROAll   RWAll   Total ClassName
 1594    65         0        296           0    3676          12      1382      3372    3448    4172    7620 test.DefineClass
Should have 2 DefineClass instances and we have: 1
System.gc()
Index Super InstBytes KlassBytes annotations   CpAll MethodCount Bytecodes MethodAll   ROAll   RWAll   Total ClassName
 1735    64         0        296           0    3676          12      1382      3372    3448    4172    7620 test.DefineClass
Should have 2 DefineClass instances and we have: 1
----------System.err:(14/953)----------
java.lang.RuntimeException: Should have 2 DefineClass instances and we have: 1
	at test.DefineClass.printClassStats(DefineClass.java:246)
	at test.DefineClass.main(DefineClass.java:277)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:543)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110)
	at java.base/java.lang.Thread.run(Thread.java:844)

Comments
David is right - this is an issue if the JTreg tests run with -Xcomp. I'm currently investigating the issue.
14-02-2017

Possibly an issue with -Xcomp
13-02-2017