JDK-8069160 : serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-01-16
  • Updated: 2016-03-15
  • Resolved: 2016-02-25
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 9
9 b110Fixed
Related Reports
Relates :  
Relates :  
Description
The test can fail due to sun.reflect.GeneratedConstructorAccessor1 not being found. Here is the error message:

java.lang.Exception: Failed dcmd queue, Class for name: 1310   !         sun.reflect.GeneratedConstructorAccessor1::newInstance (53 bytes)
        at CompilerQueueTest.validateMethodLine(CompilerQueueTest.java:101)
        at CompilerQueueTest.main(CompilerQueueTest.java:76)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
        at java.lang.Thread.run(Thread.java:745)

JavaTest Message: Test threw exception: java.lang.Exception: Failed dcmd queue, Class for name: 1310   !         sun.reflect.GeneratedConstructorAccessor1::newInstance (53 bytes)


The failure is nondeterministic because it depends on whether the method sun.reflect.GeneratedConstructorAccessor1::newInstance was already compiled or not. The failure can be reproduced deterministically (at least on my machine) by running the test with -XX:CompileThreshold=1 or with -XX:CompileThresholdScaling=0.01 so that methods are compiled earlier than usual.

I used the following revision of the hotspot repo:

changeset:   7666:520b40caa4d3
tag:         tip
user:        zmajo
date:        Thu Jan 15 11:30:13 2015 +0100
summary:     8067374: Use %f instead of %g for LogCompilation output