RFR: 8321183: Incorrect warning from cds about the modules file [v2]

Calvin Cheung ccheung at openjdk.org
Mon Dec 4 17:38:39 UTC 2023


On Mon, 4 Dec 2023 08:20:14 GMT, Maxim Kartashev <mkartashev at openjdk.org> wrote:

>> When the `modules`  file used at run time differs in size from the one used at build time, the warning is confusing:
>> 
>> 
>> $ .../bin/java -jar .../demo/jfc/Notepad/Notepad.jar
>> [0.033s][warning][cds] A jar file is not the one used while building the shared archive file: /.../lib/modules
>> [0.033s][warning][cds] A jar file is not the one used while building the shared archive file: /.../lib/modules
>> [0.033s][warning][cds] /.../lib/modules timestamp has changed. 
>> 
>> Notice that it is referred to as `jar file` and that `timestamp has changed` rather than size.
>> 
>> The suggested patch is pretty self-explanatory. With this patch, the warnings look like this:
>> 
>> ./build/linux-x86_64-server-release/images/jdk/bin/java -jar ./build/linux-x86_64-server-release/images/jdk/demo/jfc/Notepad/Notepad.jar
>> [0.014s][warning][cds] This file is not the one used while building the shared archive file: /home/maxim/openjdk/jdk/build/linux-x86_64-server-release/images/jdk/lib/modules
>> [0.014s][warning][cds] This file is not the one used while building the shared archive file: /home/maxim/openjdk/jdk/build/linux-x86_64-server-release/images/jdk/lib/modules
>> [0.014s][warning][cds] /home/maxim/openjdk/jdk/build/linux-x86_64-server-release/images/jdk/lib/modules size has changed.
>
> Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Corrected tests and the fix

Updates look good. Thanks.

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

Marked as reviewed by ccheung (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/16926#pullrequestreview-1763022523


More information about the hotspot-runtime-dev mailing list