JDK-8217406 : gc/nvdimm/Test*ObjectsOnNvdimm.java failure
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 12,13,14,15
  • Priority: P2
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2019-01-18
  • Updated: 2020-11-13
  • Resolved: 2020-11-13
Related Reports
Relates :  
Relates :  
Relates :  
Description
----------System.err:(24/1278)----------
 stdout: [];
 stderr: [Exception in thread "main" java.lang.RuntimeException: Old object does not reside in NVDIMM: expected true, was false
	at jdk.test.lib.Asserts.fail(Asserts.java:594)
	at jdk.test.lib.Asserts.assertTrue(Asserts.java:486)
	at OldObjectTest.validateOldObject(TestOldObjectsOnNvdimm.java:110)
	at OldObjectTest.main(TestOldObjectsOnNvdimm.java:119)
]
 exitValue = 1

java.lang.RuntimeException: Expected to get exit value of [0]

	at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:419)
	at TestOldObjectsOnNvdimm.runTest(TestOldObjectsOnNvdimm.java:90)
	at TestOldObjectsOnNvdimm.main(TestOldObjectsOnNvdimm.java:76)
	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:567)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:246)
	at java.base/java.lang.Thread.run(Thread.java:835)
Comments
The functionality and these test have been removed in JDK-8256181.
13-11-2020

I tried but failed to reproduce locally. The test for ParallelOldGC essentially uses the same logic as WhiteBox.isObjectInOldGen(), so I am surprised it fails. Thanks for pointing out the issue (appending to static testOpts field) and providing the patch. I will open a new bug to fix this issue. Since these tests are now correctly removed from all test groups (JDK-8217666), is it ok to move this issue to P4 and fix version to jdk13? Thanks Kishor
05-02-2019

copy of the non-confidential parts of a comment: gc/nvdimm/TestHumongousObjectsOnNvdimm.java fails with a similar message: stderr: [Exception in thread "main" java.lang.RuntimeException: Humongous object does not reside in NVDIMM: expected true, was false at jdk.test.lib.Asserts.fail(Asserts.java:594) at jdk.test.lib.Asserts.assertTrue(Asserts.java:486) at gc.nvdimm.HumongousObjectTest.validateObject(TestHumongousObjectsOnNvdimm.java:107) at gc.nvdimm.HumongousObjectTest.main(TestHumongousObjectsOnNvdimm.java:117)
30-01-2019

Browsed the code a bit, tried to reproduce with no luck locally (trying to replicate with the command line arguments in the failing tests) and in the CI system (400 runs). Attached my changes to the test program.
28-01-2019

There are at least two problems with the test execution. The first is a mistake in the test code itself. The runTest() helper function modifies in place the static testOpts list. The first call appends "-XX:+UseG1GC OldObjectTest". Those are still present for the second runTest(). As a result, the additions from the second call are treated as arguments to the "OldObjectTest" from the first call, and are ignored. So all of the calls are effectively retesting the UseG1GC case, and there is no testing of the UseParallelOld configuration. The second is that (sometimes?) the second (or later?) runTest() is failing as described in the bug description above.
25-01-2019

FYI, this test ran by TEST.groups, hotspot_misc group.
23-01-2019

why didn't TestHumongousObjectsOnNvdimm fail?
23-01-2019