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

Maxim Kartashev mkartashev at openjdk.org
Mon Dec 4 08:20:14 UTC 2023


> 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

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/16926/files
  - new: https://git.openjdk.org/jdk/pull/16926/files/baf21f80..135f12fb

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=16926&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16926&range=00-01

  Stats: 6 lines in 5 files changed: 1 ins; 0 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/16926.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16926/head:pull/16926

PR: https://git.openjdk.org/jdk/pull/16926


More information about the hotspot-runtime-dev mailing list