Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-36135

Base JDK CDS archive (classes.jsa) not unique per JDK build [rhel-8, openjdk-17] [rhel-8.9.0.z]

    • java-17-openjdk-17.0.7.0.7-4.el8
    • None
    • None
    • sst_java
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:
      Installing java-17-openjdk-headless on two different systems or, for example, in two different containers results in distinct classes.jsa files getting generated. This is because the CDS archive is being generated by a post script action of the java-17-openjdk-headless package. Therefore, the CDS archive is unique per installation (even if it's the same NVRA being installed), not per JDK version. This breaks usages of Application Class Data Sharing which uses the dynamic dump feature. In such a scenario the base CDS archive (and its crc) is encoded in the dynamic archive and if that doesn't match at runtime AppCDS sharing fails with:

      An error has occurred while processing the shared archive file.
      Dynamic archive cannot be used: static archive header checksum verification failed.
      Error occurred during initialization of VM
      Unable to use shared archive.

      Version-Release number of selected component (if applicable):
      java-17-openjdk-headless-17.0.7.0.7-1.el8_7.x86_64

      How reproducible:
      Always.

      Steps to Reproduce:
      1. Install java-17-openjdk-headless of the same NVRA multiple times
      2. Observe that the classes.jsa is unique per installation (e.g. by 'ls -l' or running 'sha512sum' on the file and compare timestamps/sums)

      Actual results:
      classes.jsa is unique per installation.

      Expected results:
      classes.jsa is the same across multiple installations of java-17-openjdk-headless of the same NVR (Name Version Release). classes.jsa is being generated during the OpenJDK build and should be unique per build.

      Additional Info:
      This breaks some AppCDS deployment scenarios on OpenShift when using ubi8/openjdk-17 images.

            rhn-engineering-ahughes Andrew Hughes
            sgehwolf@redhat.com Severin Gehwolf
            Andrew Hughes Andrew Hughes
            David Kutalek David Kutalek
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: