[jdk17u-dev] RFR: 8273092: Sort classlist in JDK image : regarding CDS archives
Severin Gehwolf
sgehwolf at redhat.com
Mon Aug 7 13:59:00 UTC 2023
On Fri, 2023-08-04 at 10:39 +0100, Andrew Leonard wrote:
> Hi,
> I am currently backporting the fix to sort the classlist file, for a
> deterministic output: https://github.com/openjdk/jdk17u-dev/pull/1632
> and as Ioi Lam pointed out CDS archives in jdk17u are non-
> deterministic without various jdk-21+ fixes
> (https://bugs.openjdk.org/browse/JDK-8245335?jql=labels%20%3D%20repro
> ducible-
> build%20AND%20labels%20%3D%20cds%20ORDER%20BY%20fixVersion%20ASC),
> which are unlikely to be backported as jdk17u CDS is quite different
> to 21+ now.
>
> However, it would still be useful to at least have the classlist
> deterministic, to achieve a JDK tarball that is reproducible bar the
> CDS archives.
Looking at the patch, the classlist file being deterministic seems fine
as a stand-alone JDK 17 backport.
> There is an argument that CDS archives could be produced at a
> different point in time from the build tarball, for example maybe via
> the installer at user install time.
That's not a good idea as dynamic CDS dumps (-XX:ArchiveClassesAtExit)
depend on the JDK's base CDS archive to be the same as the one at dump
time.
> Thoughts please? on whether it is useful to merge this classlist
> sorting, regardless of the CDS archive issue?
Since the classlist file is only used by CDS the patch making classlist
deterministic is only part of the full CDS-being-deterministic story.
As said above, JDK-8273092 seems low risk enough to be suitable stand-
alone for JDK 17u.
Thanks,
Severin
More information about the jdk-updates-dev
mailing list