RFR: 8364352: Some tests fail when using a limited number of pregenerated .jsa CDS archives

Matthias Baesken mbaesken at openjdk.org
Mon Aug 25 08:14:59 UTC 2025


On Wed, 20 Aug 2025 20:54:01 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Currently the default JVM comes on most platforms with 4 jsa files (for coops and nocoops; with and without compressed object headers), but for some shipments the number of jsa could be reduced (see also Images.gmk) .
>> But not all tests can deal with this.
>> Namely
>> 
>> test/hotspot/jtreg/runtime/CompressedOops/CompressedCPUSpecificClassSpaceReservation.java
>> test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java
>> test/hotspot/jtreg/runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java (custom-cl-zgc)
>> 
>> were found to have issues.
>> There is already a requires  `vm.cds.default.archive.available`   that is used in similar tests and can be used in some of those cases too.
>
> test/hotspot/jtreg/runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java line 58:
> 
>> 56:  * @test id=custom-cl-zgc
>> 57:  * @requires vm.cds.custom.loaders
>> 58:  * @requires vm.cds.default.archive.available
> 
> Don't understand this one. This test is hard to follow but I think it does its own dumping of the CDS archive, so I don't see why it would need the default archive to exist. ???

we run into this error without the jsa in the zgc case
runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java#custom-cl-zgc


[0.002s][error][cds] Specified shared archive file not found (/jtreg_hotspot_tier2_work/JTwork/scratch/2/appcds-06h49m10s700.jsa)
[0.002s][error][cds] Not a valid shared archive file (/jtreg_hotspot_tier2_work/JTwork/scratch/2/appcds-06h49m10s700.jsa)
[0.002s][error][cds] CDS is incompatible with other specified options.
Error occurred during initialization of VM
Unable to use shared archive: invalid archive

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26820#discussion_r2297421350


More information about the hotspot-runtime-dev mailing list