JDK-8204586 : [TESTBUG] compiler/whitebox/DeoptimizeFramesTest.java fails with "java.lang.RuntimeException: should be the same nmethod: expected 58 to equal 59"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2018-06-07
  • Updated: 2018-07-04
  • Resolved: 2018-07-04
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 11
11Resolved
Related Reports
Duplicate :  
Sub Tasks
JDK-8206324 :  
Description
----------System.out:(27/704)----------
CompileCommand: compileonly compiler/whitebox/DeoptimizeFramesTest$TestCaseImpl.method
TEST CASE:2phases
DeoptimizeFramesTest(makeNotEntrant = true)
at test's start:

private int compiler.whitebox.DeoptimizeFramesTest$TestCaseImpl.method():
	compilable:	true
	compiled:	false
	comp_level:	0
	osr_compilable:	true
	osr_compiled:	false
	osr_comp_level:	0
	in_queue:	false
compile_queues_size:	0

on exception 'should be the same nmethod: expected 58 to equal 59':
private int compiler.whitebox.DeoptimizeFramesTest$TestCaseImpl.method():
	compilable:	true
	compiled:	true
	compile_id:	59
	comp_level:	4
	osr_compilable:	true
	osr_compiled:	false
	osr_comp_level:	0
	in_queue:	false
compile_queues_size:	0

----------System.err:(32/2323)----------
Warning: private int compiler.whitebox.DeoptimizeFramesTest$TestCaseImpl.method() is still in queue after 10252ms
java.lang.RuntimeException: should be the same nmethod: expected 58 to equal 59
	at jdk.test.lib.Asserts.fail(Asserts.java:594)
	at jdk.test.lib.Asserts.assertEquals(Asserts.java:205)
	at jdk.test.lib.Asserts.assertEQ(Asserts.java:178)
	at compiler.whitebox.DeoptimizeFramesTest.test(DeoptimizeFramesTest.java:86)
	at compiler.whitebox.CompilerWhiteBoxTest.runTest(CompilerWhiteBoxTest.java:176)
	at compiler.whitebox.DeoptimizeFramesTest.main(DeoptimizeFramesTest.java:73)
	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:566)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
	at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.RuntimeException: should be the same nmethod: expected 58 to equal 59
	at jdk.test.lib.Asserts.fail(Asserts.java:594)
	at jdk.test.lib.Asserts.assertEquals(Asserts.java:205)
	at jdk.test.lib.Asserts.assertEQ(Asserts.java:178)
	at compiler.whitebox.DeoptimizeFramesTest.test(DeoptimizeFramesTest.java:86)
	at compiler.whitebox.CompilerWhiteBoxTest.runTest(CompilerWhiteBoxTest.java:176)
	at compiler.whitebox.DeoptimizeFramesTest.main(DeoptimizeFramesTest.java:73)
	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:566)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
	at java.base/java.lang.Thread.run(Thread.java:832)

JavaTest Message: Test threw exception: java.lang.RuntimeException: should be the same nmethod: expected 58 to equal 59
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: should be the same nmethod: expected 58 to equal 59
Comments
[~kvn] Vladimir, I agree this test should be put into graal specific problem list and then the bug can be closed as dup.
04-07-2018

Closing as duplicate.
04-07-2018

I think we should put the test into ProblemList-graal.txt and close this bug as duplicate of JDK-8202124.
03-07-2018

I am tempting to close this bug as duplicate of JDK-8202124. [~iignatyev] Igor what do you think?
03-07-2018

Also such test should have -XX:+PrintCompilation to help diagnose issue.
03-07-2018

In addition to pre-initializing Graal we need to allow Graal methods compilation regardless compileonly command.
03-07-2018

Actually it is the same issue as JDK-8202124 because of compileonly. Looking on the test output and it say method was not compiled and is in queue: Warning: private int compiler.whitebox.DeoptimizeFramesTest$TestCaseImpl.method() is still in queue after 10798ms java.lang.RuntimeException: should be the same nmethod: expected 61 to equal 62 Also test run with Tiered compilation. Method should be compiled 2 times - one with C1 and second with Graal (or C2). Based on output above Graal's compilation is still in queue as result first NMethod.get() will return result of C1 compilation. By the time second NMethod.get() is executed the method was compiled by Graal and you get different ID.
03-07-2018

Could be the same issue as JDK-8205400. JVMCI and Graal needs to be pre-initializzed by adding -XX:-BackgroundCompilation flag. The test also use compileonly command which prevents Graal's methods compilation which may significantly delay compilation.
03-07-2018

ILW = MMH = single DeoptimizeFramesTest failure because delayed compilation!; with Graal; none = P3 Can this be duplicate of JDK-8202124?
08-06-2018