JDK-8245335 : [TESTBUG] DeterministicDump.java fails with release JVM
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-05-19
  • Updated: 2024-09-28
  • Resolved: 2020-05-21
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 15
15 b25Fixed
Related Reports
Duplicate :  
Relates :  
Description
This part of the test fails with release build of the JDK. 

http://hg.openjdk.java.net/jdk/jdk/file/ca1687338afe/test/hotspot/jtreg/runtime/cds/DeterministicDump.java#l71

        // (2) This will cause GC to happen after we've allocated 1MB of metaspace objects
        // while processing the built-in SharedClassListFile.
        String withGCArchive = dump(baseArgs, "-XX:MetaspaceSize=1M");
        compare(baseArchive, withGCArchive);

It seems like the GC affects the interned string table in some subtle way. With debug builds, the table seems to be cleaned up before the CDS archive is dumped, so we produce identical CDS images whether GC was executed or not. However, in release build, the clean up might not happen and we end up with more strings in the CDS archive.

=====

Anyway, this test is too aggressive. DeterministicDump.java  was created in JDK-8241071 (Generation of classes.jsa with -Xshare:dump is not deterministic). The goal of JDK-8241071 is for "make images" to produce the same bits. Since the Makefiles will not specify "-XX:MetaspaceSize=1M", testing with it is outside of the scope of JDK-8241071.

Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/0702191777c9 User: iklam Date: 2020-05-21 22:56:47 +0000
21-05-2020

ILW = MMM = P3
19-05-2020