JDK-8255072 : [TESTBUG] com/sun/jdi/EATests.java should not fail if expected VMOutOfMemoryException is not thrown
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2020-10-20
  • Updated: 2020-11-10
  • Resolved: 2020-11-03
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 16
16 b23Fixed
Related Reports
Relates :  
Sub Tasks
JDK-8255200 :  
Description
The test cases fail because the expected com.sun.jdi.VMOutOfMemoryException due to reallocation failure is not thrown.

The following test cases are affected:

EAPopFrameNotInlinedReallocFailure
EAPopInlinedMethodWithScalarReplacedObjectsReallocFailure
EAForceEarlyReturnOfInlinedMethodWithScalarReplacedObjectsReallocFailure

--------------------------------

The following test is failing the JDK16 CI:

com/sun/jdi/EATests.java#id0

Here's a snippet from the log file on a Win* machine:

6024ms] EAPopFrameNotInlined: passed
[8070ms] EAPopFrameNotInlinedReallocFailure: passed
java.lang.RuntimeException: Unexpected exception in test case EAPopInlinedMethodWithScalarReplacedObjectsReallocFailure
	at jdk.test.lib.Asserts.fail(Asserts.java:617)
	at EATestCaseBaseDebugger.run(EATests.java:443)
	at EATests.runTests(EATests.java:373)
	at TestScaffold.startTests(TestScaffold.java:431)
	at EATests.main(EATests.java:291)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.RuntimeException: PopFrame should have triggered an OOM exception in target: expected true, was false
	at jdk.test.lib.Asserts.fail(Asserts.java:594)
	at jdk.test.lib.Asserts.assertTrue(Asserts.java:486)
	at EAPopInlinedMethodWithScalarReplacedObjectsReallocFailure.runTestCase(EATests.java:2697)
	at EATestCaseBaseDebugger.run(EATests.java:438)
	... 9 more

JavaTest Message: Test threw exception: java.lang.RuntimeException


Here's a snippet from the log file on a Linux-X64 machine:

[6720ms] EAForceEarlyReturnNotInlined: passed
[6982ms] EAForceEarlyReturnOfInlinedMethodWithScalarReplacedObjects: passed
IOException reading output of child java interpreter:Stream closed
java.lang.RuntimeException: Unexpected exception in test case EAForceEarlyReturnOfInlinedMethodWithScalarReplacedObjectsReallocFailure
	at jdk.test.lib.Asserts.fail(Asserts.java:617)
	at EATestCaseBaseDebugger.run(EATests.java:443)
	at EATests.runTests(EATests.java:378)
	at TestScaffold.startTests(TestScaffold.java:431)
	at EATests.main(EATests.java:291)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.RuntimeException: ForceEarlyReturn should have triggered an OOM exception in target: expected true, was false
	at jdk.test.lib.Asserts.fail(Asserts.java:594)
	at jdk.test.lib.Asserts.assertTrue(Asserts.java:486)
	at EAForceEarlyReturnOfInlinedMethodWithScalarReplacedObjectsReallocFailure.runTestCase(EATests.java:2953)
	at EATestCaseBaseDebugger.run(EATests.java:438)
	... 9 more

JavaTest Message: Test threw exception: java.lang.RuntimeException
Comments
Changeset: 63461d59 Author: Richard Reingruber <rrich@openjdk.org> Date: 2020-11-03 12:36:59 +0000 URL: https://github.com/openjdk/jdk/commit/63461d59
03-11-2020

So far the observed failures are all with ZGC.
20-10-2020

The Win* failure log in jdk-16+21-1176 is attached as: mach5-one-jdk-16+21-1176-tier3-20201020-1838-15153767-tier3-gc-zgc-open_test_jdk_jdk_jdi-windows-x64-debug.log The Linux-X64 failure log in jdk-16+21-1176 is attached as: mach5-one-jdk-16+21-1176-tier3-20201020-1838-15153767-tier3-gc-zgc-open_test_jdk_jdk_jdi-linux-x64-debug.log
20-10-2020

The jdk-16+21-1176 build-ID where these test failures first showed up include the fix for: JDK-8227745 Enable Escape Analysis for Better Performance in the Presence of JVMTI Agents [~rrich] - please take a look?
20-10-2020

The failing test is new and came from this bug fix: JDK-8227745 Enable Escape Analysis for Better Performance in the Presence of JVMTI Agents
20-10-2020