RFR: JDK-8167195: VM fails to initialize intermittently when running jmod to create some images
erik.joelsson at oracle.com
Wed Oct 5 15:47:22 UTC 2016
Please review this small patch, which should fix an issue introduced by
JDK-8166948. At least on Windows, running jmod on the exploded image may
fail if the new optimization target is running concurrently. I had
missed adjusting the dependencies for the jmod targets.
diff -r 4bd1866d819b make/Main.gmk
@@ -615,15 +615,19 @@
$(foreach m, $(LAUNCHER_MODULES), $(eval $m-jmod: $m-launchers))
$(foreach m, $(COPY_MODULES), $(eval $m-jmod: $m-copy))
- # Jmods cannot be created until we have the jlink tool ready to run,
- # all java modules to be compiled and jdk.jlink-launchers.
- # And we also need to copy jvm.cfg (done in java.base-copy) and
tzdb.dat (done in
- # java.base-gendata) to the appropriate location otherwise jimage,
jlink and jmod won't start.
+ # Jmods cannot be created until we have the jlink tool ready to run.
+ # the build we run it from the exploded image. To be runnable, all java
+ # modules and jdk.jlink-launchers need to be built. We also need to copy
+ # jvm.cfg (done in java.base-copy) and tzdb.dat (done in
+ # to the appropriate location otherwise jimage, jlink and jmod won't
$(JMOD_TARGETS): java.base-libs java.base-copy java.base-gendata
- # When creating a BUILDJDK, the java compilation has already been
done by the
- # normal build and copied in.
+ # The above is enough when creating a BUILDJDK since the java modules
+ # been compiled by the normal build and copied in. In the normal, non
+ # compiling case, jmod execution has to wait until the exploded-image
+ # is completely done. Otherwise the optimization target may be changing
+ # module-info.class files while a jmod instance is trying to read them.
ifneq ($(CREATING_BUILDJDK), true)
- $(JMOD_TARGETS): java
+ $(JMOD_TARGETS): exploded-image
ifeq ($(CREATE_BUILDJDK), true)
More information about the build-dev