-
Bug
-
Resolution: Fixed
-
P3
-
15
-
b22
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8253052 | 13.0.5 | Jim Laskey | P3 | Resolved | Fixed | b02 |
Consider the following:
$ jlink --add-modules java.se --output image1
$ jlink --add-modules java.se --output image2
$ diff -r image image2
Binary files image1/lib/modules and image2/lib/modules differ
One issue is that the image writer processes the archives in iteration order and that can vary from run to run. That issue is fixed with `jlink.patch` attached to this bug and it least to make the above reproducible on Linux and macOS. There seems to another issue on Solaris (solaris-sparcv9), maybe because it is big endian. The contents of the image files are identical but the index is different:
$ jimage info image1/lib/modules
Major Version: 1
Minor Version: 0
Flags: 0
Resource Count: 17925
Table Length: 17925
Offsets Size: 71700
Redirects Size: 71700
Locations Size: 359375
Strings Size: 407279
Index Size: 910082
$ jimage info image2/lib/modules
Major Version: 1
Minor Version: 0
Flags: 0
Resource Count: 17925
Table Length: 17925
Offsets Size: 71700
Redirects Size: 71700
Locations Size: 358493
Strings Size: 407279
Index Size: 909200
Windows seems to intermittent, most of the time the image is identical but periodically (1 in 100?), it is different.
$ jlink --add-modules java.se --output image1
$ jlink --add-modules java.se --output image2
$ diff -r image image2
Binary files image1/lib/modules and image2/lib/modules differ
One issue is that the image writer processes the archives in iteration order and that can vary from run to run. That issue is fixed with `jlink.patch` attached to this bug and it least to make the above reproducible on Linux and macOS. There seems to another issue on Solaris (solaris-sparcv9), maybe because it is big endian. The contents of the image files are identical but the index is different:
$ jimage info image1/lib/modules
Major Version: 1
Minor Version: 0
Flags: 0
Resource Count: 17925
Table Length: 17925
Offsets Size: 71700
Redirects Size: 71700
Locations Size: 359375
Strings Size: 407279
Index Size: 910082
$ jimage info image2/lib/modules
Major Version: 1
Minor Version: 0
Flags: 0
Resource Count: 17925
Table Length: 17925
Offsets Size: 71700
Redirects Size: 71700
Locations Size: 358493
Strings Size: 407279
Index Size: 909200
Windows seems to intermittent, most of the time the image is identical but periodically (1 in 100?), it is different.
- backported by
-
JDK-8253052 jlink does not produce reproducible jimage files
- Resolved
- relates to
-
JDK-8243666 ModuleHashes attribute generated for JMOD and JAR files depends on timestamps
- Closed
-
JDK-8252730 jlink does not create reproducible builds on different servers
- Closed