Loading... (original) (raw)

During the JDK build process, it creates a CDS archive for the BOOT_JDK in configure-support/classes.jsa. The intent is improve the speed of running Java programs using the BOOT_JDK.

http://hg.openjdk.java.net/jdk/jdk/file/d57d61aafef9/make/autoconf/boot-jdk.m4#l362

Examples of such Java programs include TOOL_COMPILEPROPS_CMD

http://hg.openjdk.java.net/jdk/jdk/file/d57d61aafef9/make/gensrc/GensrcCommonLangtools.gmk#l94

However, when doing the bootcycle build (make bootcycle-images), some of these programs are executed using the JDK that we just built, but we still use the configure-support/classes.jsa file that was created by the BOOT_JDK.

In some cases, e.g., when BOOT_JDK is 64-bit but we are doing a bootcycle build of a 32-bit JDK, due to a bug in the CDS code where it cannot handle mismatched JSA files, the build will fail.

See http://mail.openjdk.java.net/pipermail/hotspot-dev/2019-June/038514.html for an example failure (and hs_err_pid22840.log in attachment).