8312434: SPECjvm2008/xml.transform with CDS fails with "can't seal package nu.xom"#15339
8312434: SPECjvm2008/xml.transform with CDS fails with "can't seal package nu.xom"#15339calvinccheung wants to merge 3 commits intoopenjdk:masterfrom
Conversation
|
/label add hotspot-runtime |
|
👋 Welcome back ccheung! A progress list of the required criteria for merging this PR into |
|
@calvinccheung |
Webrevs
|
iklam
left a comment
There was a problem hiding this comment.
Looks good to me with a small nit for the test case.
Also, can we remove the SharedClassPathEntry::is_signed() API as well?
There was a problem hiding this comment.
I would suggest using full spelling of signJarWithDisabledAlgorithm
There was a problem hiding this comment.
Fixed. Also removed an extra import from the test.
Yes, I will also remove the |
|
@calvinccheung This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 124 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
Thanks @iklam and @matias9927. /integrate |
|
Going to push as commit 9f4a9fe.
Your commit was automatically rebased without conflicts. |
|
@calvinccheung Pushed as commit 9f4a9fe. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
|
/backport jdk21u |
|
@calvinccheung the backport was successfully created on the branch calvinccheung-backport-9f4a9fe4 in my personal fork of openjdk/jdk21u. To create a pull request with this backport targeting openjdk/jdk21u:master, just click the following link: The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:
If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u: |
Problem:
A jar file containing classes in a sealed package and is signed with a "disabled" algorithm as indicated in the
jdk.jar.disabledAlgorithmssecurity property. Some of the classes are stored in a CDS archive. During runtime, if a class is loaded from the archive followed by loading a class from the jar file, resulting in sealing violation.Cause:
During dump time, CDS considers the jar file as signed although it should be treated as unsigned due to the algorithm used is in the "disabled" list. Currently, CDS doesn't store the manifest of a signed jar in the archive since CDS doesn't support signed classes. During runtime, since there's no manifest info, when a class is loaded from the archive, a package entry is created without sealing information. When a subsequent class from the same package is loaded from the jar, an attempt to create a package entry with sealing information would fail.
Fix:
It is difficult in the hotspot code to determine if an algorithm for signing the jar is considered "disabled". The fix is to always store the jar manifest in the CDS archive.
Testing:
Passed tiers 1 - 4 (including the new test).
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15339/head:pull/15339$ git checkout pull/15339Update a local copy of the PR:
$ git checkout pull/15339$ git pull https://git.openjdk.org/jdk.git pull/15339/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 15339View PR using the GUI difftool:
$ git pr show -t 15339Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15339.diff
Webrev
Link to Webrev Comment