RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2203412 - Base JDK CDS archive (classes.jsa) not unique per JDK build [rhel-9,openjdk-17]
Summary: Base JDK CDS archive (classes.jsa) not unique per JDK build [rhel-9,openjdk-17]
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: java-17-openjdk
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andrew John Hughes
QA Contact: OpenJDK QA
URL:
Whiteboard:
Depends On:
Blocks: 2221653 2221654
TreeView+ depends on / blocked
 
Reported: 2023-05-12 15:04 UTC by Andrew John Hughes
Modified: 2023-09-17 18:56 UTC (History)
2 users (show)

Fixed In Version: java-17-openjdk-17.0.8.0.1-0.1.ea.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2221653 2221654 (view as bug list)
Environment:
Last Closed: 2023-09-12 17:23:28 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-157101 0 None None None 2023-05-12 15:04:38 UTC

Description Andrew John Hughes 2023-05-12 15:04:02 UTC
This bug was initially created as a copy of Bug #2196908

I am copying this bug because: 

Needs to be fixed in RHEL 9 too

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.


Note You need to log in before you can comment on or make changes to this bug.