Skip to content

Temurin jdk21 classes.jsa CDS non-reproducible depending on folder path length? #4403

@andrew-m-leonard

Description

@andrew-m-leonard

Reproducible build tests have shown classes.jsa non-reproducible, and from testing it "seems" related to the path length of the reproducible build directory. eg.https://ci.adoptium.net/job/Grinder/16560/console

00:28:29  Number of files: 107885
00:28:29  00:28:27 : Comparing expanded JDKs from jdk-21.0.11+1 with reproJDK/jdk-21.0.11+1 ...
00:32:16  00:32:05 : diff complete - rc=1. Output written to file: reprotest.diff
00:32:16  Files jdk-21.0.11+1/lib/server/classes.jsa and reproJDK/jdk-21.0.11+1/lib/server/classes.jsa differ
00:32:16  Number of differences: 1
00:32:16  ReproduciblePercent = 99.99 %

A local reproduce seems possible with the following test, eg. on aarch64 mac try:

curl -L -o jdk.tar.gz https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.11%2B1-ea-beta/OpenJDK21U-jdk_aarch64_mac_hotspot_21.0.11_1-ea.tar.gz

mkdir JDK1
tar -xf jdk.tar.gz -C JDK1

mkdir -p JDK2/SUBFOLDER
tar -xf jdk.tar.gz -C JDK2/SUBFOLDER

JDK1/jdk-21.0.11+1/Contents/Home/bin/java -Xshare:dump -XX:SharedArchiveFile=1.jsa

(cd JDK2/SUBFOLDER && ./jdk-21.0.11+1/Contents/Home/bin/java -Xshare:dump -XX:SharedArchiveFile=../../2.jsa)

diff 1.jsa 2.jsa

Metadata

Metadata

Assignees

No one assigned

    Labels

    aarchIssues that affect or relate to the aarch ARCHITECTUREmacosIssues that affect or relate to the MAC OSquestionIssues that are queries about the code base or potential problems that have been spottedtestingIssues that enhance or fix our test suites

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions