Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8241071

Generation of classes.jsa with -Xshare:dump is not deterministic

    XMLWordPrintable

Details

    • b22

    Description

      In the effort of creating a reproducible build, we have so far turned a blind eye towards classes.jsa, since the generated binary is different every time.

      The most common causes for this kind of issues are binary formats that contains raw, unsorted dumps of hash maps, and timestamps. Fixing the output so it remains stable upon repeated runs on the same environment makes it possible to verify the consistency of the build.

      In some rare cases, there have been other bugs hiding in non-determinism. It is also good to be sure that the cause for non-determinism in classes.jsa is not such a bug.

      I'm currently making a change in the build system, where I'd like to be more sure that I do not affect the content of classes.jsa. So if this is possible to fix relatively soon, I'd be very happy.

      ----
      Review thread: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2020-April/039135.html
      ----
      For debugging determinism issues with classes.jsa, see https://wiki.openjdk.java.net/display/HotSpot/Debugging+CDS+DeterministicDump.java+test+failures

      Attachments

        Issue Links

          Activity

            People

              iklam Ioi Lam
              ihse Magnus Ihse Bursie
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: