Skip to content

8332105: Exploded JDK does not include CDS #19188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented May 11, 2024

An exploded JDK cannot be used with either -Xshare:on or -Xshare:auto. That causes tests like runtime/CompressedOops/CompressedCPUSpecificClassSpaceReservation.java to fail when running on an exploded JDK.

Since an exploded JDK cannot use CDS, we should - for tests - treat it as if CDS had not been included.

/label hotspot


Note that I was torn between two ways to fix this:

The latter is cleaner and clearer, conveying the message of exploded-ness without muddling it with the CDS aspect. But OTOH the complexity may not be required.

I can go either way, though I have a slight preference for this PR, which is why I posted it.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8332105: Exploded JDK does not include CDS (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19188/head:pull/19188
$ git checkout pull/19188

Update a local copy of the PR:
$ git checkout pull/19188
$ git pull https://git.openjdk.org/jdk.git pull/19188/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19188

View PR using the GUI difftool:
$ git pr show -t 19188

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19188.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 11, 2024

👋 Welcome back stuefe! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented May 11, 2024

@tstuefe 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:

8332105: Exploded JDK does not include CDS

Reviewed-by: dholmes, iklam

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 9 new commits pushed to the master branch:

  • c94af6f: 8333962: Obsolete OldSize
  • cdf22b1: 8326715: ZGC: RunThese24H fails with ExitCode 139 during shutdown
  • ef7923e: 8334078: RISC-V: TestIntVect.java fails after JDK-8332153 when running without RVV
  • 0d1080d: 8331117: [PPC64] secondary_super_cache does not scale well
  • 113a2c0: 8332903: ubsan: opto/output.cpp:1002:18: runtime error: load of value 171, which is not a valid value for type 'bool'
  • d751441: 8330586: GHA: Drop additional gcc/glibc packages installation for x86_32
  • 5e09397: 8334222: exclude containers/cgroup/PlainRead.java
  • 7b38bfe: 8333729: C2 SuperWord: remove some @requires usages in test/hotspot/jtreg/compiler/loopopts/superword
  • 29b6392: 8334228: C2 SuperWord: fix JDK-24 regression in VPointer::cmp_for_sort after JDK-8325155

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 master branch, type /integrate in a new comment.

@openjdk openjdk bot changed the title JDK-8332105: Exploded JDK should count as if CDS had not been included in the build 8332105: Exploded JDK should count as if CDS had not been included in the build May 11, 2024
@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label May 11, 2024
@openjdk
Copy link

openjdk bot commented May 11, 2024

@tstuefe
The hotspot label was successfully added.

@tstuefe tstuefe changed the title 8332105: Exploded JDK should count as if CDS had not been included in the build 8332105: Exploded JDK does not include CDS May 11, 2024
@tstuefe tstuefe marked this pull request as ready for review May 11, 2024 09:59
@openjdk openjdk bot added the rfr Pull request is ready for review label May 11, 2024
@mlbridge
Copy link

mlbridge bot commented May 11, 2024

Webrevs

@tstuefe
Copy link
Member Author

tstuefe commented May 23, 2024

Any takers?

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems okay. This test should have had requires vm.cds anyway.

Just out of curiosity why is CDS not compatible with an exploded build?

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 27, 2024
@theRealAph
Copy link
Contributor

Seems okay. This test should have had requires vm.cds anyway.

Just out of curiosity why is CDS not compatible with an exploded build?

Isn't the exploded build supposed to be as fast as possible? I think that's why people use it, and it'd be a shame to allow anything, such as building a CDS arcive, to slow that process down.

@tstuefe
Copy link
Member Author

tstuefe commented May 27, 2024

Seems okay. This test should have had requires vm.cds anyway.
Just out of curiosity why is CDS not compatible with an exploded build?

@dholmes-ora Thanks for the review. Honestly, I don't know. Maybe @iklam knows.

Isn't the exploded build supposed to be as fast as possible? I think that's why people use it, and it'd be a shame to allow anything, such as building a CDS arcive, to slow that process down.

Sure, but not generating a CDS archive at build time and being unable to dump or use an archive at all are two different things.

@iklam
Copy link
Member

iklam commented May 28, 2024

Seems okay. This test should have had requires vm.cds anyway.
Just out of curiosity why is CDS not compatible with an exploded build?

@dholmes-ora Thanks for the review. Honestly, I don't know. Maybe @iklam knows.

Isn't the exploded build supposed to be as fast as possible? I think that's why people use it, and it'd be a shame to allow anything, such as building a CDS arcive, to slow that process down.

Sure, but not generating a CDS archive at build time and being unable to dump or use an archive at all are two different things.

The exploded build has tens of thousands of class files. If any of them are modified, the CDS archive may no longer be valid. There's no quick way of checking that. That's why CDS doesn't support the exploded build (or any apps that load class files from a directory).

@tstuefe
Copy link
Member Author

tstuefe commented May 28, 2024

Seems okay. This test should have had requires vm.cds anyway.
Just out of curiosity why is CDS not compatible with an exploded build?

@dholmes-ora Thanks for the review. Honestly, I don't know. Maybe @iklam knows.

Isn't the exploded build supposed to be as fast as possible? I think that's why people use it, and it'd be a shame to allow anything, such as building a CDS arcive, to slow that process down.

Sure, but not generating a CDS archive at build time and being unable to dump or use an archive at all are two different things.

The exploded build has tens of thousands of class files. If any of them are modified, the CDS archive may no longer be valid. There's no quick way of checking that. That's why CDS doesn't support the exploded build (or any apps that load class files from a directory).

Ah, thank you for exlaining. That makes sense.

@tstuefe
Copy link
Member Author

tstuefe commented Jun 4, 2024

Holding this off until post RDP1 23, not that important

…unt-as-if-CDS-had-not-been-included-in-the-build
@offamitkumar
Copy link
Member

I still see some failures which are only failing in exploded-jvm;

java/foreign/TestLinker.java 
java/lang/SecurityManager/CheckSecurityProvider.java 
java/lang/StackWalker/VerifyStackTrace.java 
java/lang/System/LoggerFinder/internal/BaseDefaultLoggerFinderTest/BaseDefaultLoggerFinderTest.java 
java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerTest.java 
java/lang/System/LoggerFinder/internal/LoggerFinderLoaderTest/LoggerFinderLoaderTest.java 
java/lang/invoke/RevealDirectTest.java 
java/lang/invoke/lambda/LogGeneratedClassesTest.java 
java/lang/reflect/records/IsRecordTest.java 
java/lang/reflect/records/RecordPermissionsTest.java 
java/lang/reflect/records/RecordReflectionTest.java 
java/lang/runtime/ObjectMethodsTest.java 
java/util/Currency/PropertiesTestRun.java 
java/util/ResourceBundle/Bug6359330.java 
java/util/TimeZone/TimeZoneDatePermissionCheckRun.java 
java/util/logging/LogManager/Configuration/rootLoggerHandlers/BadRootLoggerHandlers.java 
java/util/logging/LogManager/Configuration/rootLoggerHandlers/RootLoggerHandlers.java 
java/util/logging/LogManager/Configuration/updateConfiguration/SimpleUpdateConfigWithInputStreamTest.java 
java/util/logging/LogManager/Configuration/updateConfiguration/UpdateConfigurationTest.java 
java/util/logging/Logger/getGlobal/TestGetGlobal.java 
java/util/logging/Logger/getGlobal/TestGetGlobalByName.java 
java/util/logging/Logger/getGlobal/TestGetGlobalConcurrent.java 
java/util/logging/Logger/setResourceBundle/TestSetResourceBundle.java 
java/util/logging/TestMainAppContext.java 
jdk/internal/jimage/JImageReadTest.java 
jdk/modules/etc/JmodExcludedFiles.java 
sun/reflect/ReflectionFactory/ReflectionFactoryTest.java 
sun/util/locale/provider/Bug8152817.java

Did you also notice them in tier1 with exploded-build ?

I only looked at TestLinker.java failure, It doesn't "seem" to be related to CDS:

TEST RESULT: Failed. Execution failed: `main' threw exception: java.util.ServiceConfigurationError: Locale provider adapter "CLDR"cannot be instantiated.

Copy link
Member

@iklam iklam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tstuefe
Copy link
Member Author

tstuefe commented Jun 17, 2024

@offamitkumar thanks for testing. If these tests are dependent on CDS, they should have the requirement specified.

@iklam thanks!

/integrate

@openjdk
Copy link

openjdk bot commented Jun 17, 2024

Going to push as commit 801bf15.
Since your change was applied there have been 9 commits pushed to the master branch:

  • c94af6f: 8333962: Obsolete OldSize
  • cdf22b1: 8326715: ZGC: RunThese24H fails with ExitCode 139 during shutdown
  • ef7923e: 8334078: RISC-V: TestIntVect.java fails after JDK-8332153 when running without RVV
  • 0d1080d: 8331117: [PPC64] secondary_super_cache does not scale well
  • 113a2c0: 8332903: ubsan: opto/output.cpp:1002:18: runtime error: load of value 171, which is not a valid value for type 'bool'
  • d751441: 8330586: GHA: Drop additional gcc/glibc packages installation for x86_32
  • 5e09397: 8334222: exclude containers/cgroup/PlainRead.java
  • 7b38bfe: 8333729: C2 SuperWord: remove some @requires usages in test/hotspot/jtreg/compiler/loopopts/superword
  • 29b6392: 8334228: C2 SuperWord: fix JDK-24 regression in VPointer::cmp_for_sort after JDK-8325155

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 17, 2024
@openjdk openjdk bot closed this Jun 17, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 17, 2024
@openjdk
Copy link

openjdk bot commented Jun 17, 2024

@tstuefe Pushed as commit 801bf15.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

5 participants