JDK-6784084 : jvmti.h created during the build differs from file in jdk repo and should not
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2008-12-11
  • Updated: 2023-12-13
  • Resolved: 2016-12-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Duplicate :  
Relates :  
Description
WARNING: Possible HotSpot VM interface conflict.
        HOTSPOT_IMPORT_PATH is used to import files from the VM build.
        It is also used to verify that any copied files are consistent between
        these two components. It has been detected that one or more of the
        VM interface files inside this workspace may not match the interfaces
        exported by the VM, or the VM versions could not be found.
        The list of VM interface files is:
            jvmti.h.
        This workspace has copies of these files at:
          ./../src/share/javavm/export and ./../src/solaris/javavm/export
        for build purposes, and they should contain the same interfaces
        as the VM versions imported from:
          $(HOTSPOT_IMPORT_PATH)/include
               (i.e. /BUILD_AREA/jdk7/build/linux-amd64/hotspot/import/include)

        If an interface indeed doesn't match, then the use of this interface
        at JDK runtime could cause serious errors.

VM Interface Differences: /BUILD_AREA/jdk7/build/linux-amd64/tmp/jvmti.hdiffs

Comments
Here's the link to Kelly's post: http://mail.openjdk.java.net/pipermail/serviceability-dev/2009-December/001859.html I don't see any replies to it.
12-08-2013

EVALUATION See suggested fix.
05-04-2011

SUGGESTED FIX diff --git a/make/common/Defs.gmk b/make/common/Defs.gmk --- a/make/common/Defs.gmk +++ b/make/common/Defs.gmk @@ -482,9 +482,11 @@ # VPATH.h is used elsewhere to generate include flags. By default, # anyone has access to the include files that the JVM area exports, # namely jni.h, jvm.h, and jni_utils.h, plus their platform-specific -# relatives. +# relatives. +# INCLUDEDIR are the ones already populated in the build area that may +# not be managed in this source area, e.g. jvmti.h. # -VPATH.h = $(PLATFORM_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/export +VPATH.h = $(INCLUDEDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/export vpath %.h $(VPATH.h) # diff --git a/make/common/Sanity.gmk b/make/common/Sanity.gmk --- a/make/common/Sanity.gmk +++ b/make/common/Sanity.gmk @@ -110,9 +110,7 @@ # Always check hotspot binary paths even if we are building them from scratch HOTSPOT_IMPORT_CHECK=true ifeq ($(HOTSPOT_IMPORT_CHECK),true) -sanity-all:: \ - sane-hotspot_binaries \ - sane-hotspot_import +sanity-all:: sane-hotspot endif sanity-docs: sanity-base sane-docs_import diff --git a/make/common/shared/Sanity.gmk b/make/common/shared/Sanity.gmk --- a/make/common/shared/Sanity.gmk +++ b/make/common/shared/Sanity.gmk @@ -210,10 +210,7 @@ sane-libCrun \ sane-odbcdir \ sane-msdevtools_path \ - sane-hotspot_binaries \ - sane-hotspot_import \ - sane-hotspot_import_dir \ - sane-hotspot_import_include \ + sane-hotspot \ sane-compiler \ sane-link \ sane-cacerts \ @@ -1038,226 +1035,66 @@ endif ###################################################### -# Check for existence of Hotspot binaries +# Check for existence of Hotspot imported files ###################################################### -sane-hotspot_binaries: + +# Files that come from the hotspot build OR a previously built jdk +HOTSPOT_REQ_FILES = +HOTSPOT_OPT_FILES = +HOTSPOT_REQ_FILES += $(HOTSPOT_IMPORT_PATH)/include/jvmti.h ifeq ($(ARCH_DATA_MODEL), 32) - @if [ ! -r $(HOTSPOT_CLIENT_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) ]; then \ - $(ECHO) "ERROR: HOTSPOT_CLIENT_PATH does not point to a valid HotSpot VM. \n" \ - " Please check your access to \n" \ - " $(HOTSPOT_CLIENT_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) \n" \ - " and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \ - "" >> $(ERROR_FILE) ; \ - fi + HOTSPOT_REQ_FILES += $(HOTSPOT_CLIENT_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) + ifeq ($(PLATFORM), windows) + HOTSPOT_REQ_FILES += $(HOTSPOT_LIB_PATH)/jvm.lib + HOTSPOT_OPT_FILES += $(HOTSPOT_CLIENT_PATH)/jvm.map + HOTSPOT_OPT_FILES += $(HOTSPOT_CLIENT_PATH)/jvm.pdb + endif endif - @if [ ! -r $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) ]; then \ - $(ECHO) "ERROR: HOTSPOT_SERVER_PATH does not point to a valid HotSpot VM. \n" \ - " Please check your access to \n" \ - " $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) \n" \ - " and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \ - "" >> $(ERROR_FILE) ; \ - fi - @# - @# Check value of HOTSPOT_LIB_PATH - @# +HOTSPOT_REQ_FILES += $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) ifeq ($(PLATFORM), windows) - @if [ ! -r $(HOTSPOT_LIB_PATH)/jvm.lib ]; then \ - $(ECHO) "ERROR: HOTSPOT_LIB_PATH does not point to a valid HotSpot library. \n" \ - " Please check your access to \n" \ - " $(HOTSPOT_LIB_PATH)/jvm.lib \n" \ - " and/or check your value of ALT_HOTSPOT_LIB_PATH. \n" \ - "" >> $(ERROR_FILE) ; \ - fi - @# - @# Check for the .map files - its OK if they are not there.. - @# - ifeq ($(ARCH_DATA_MODEL), 32) - @# There is no 64-bit HotSpot client VM - @if [ ! -r $(HOTSPOT_CLIENT_PATH)/jvm.map ]; then \ - $(ECHO) "WARNING: HOTSPOT_CLIENT_PATH does not point to valid HotSpot .map files. \n" \ - " These files are optional and aid in the debugging of the JVM. \n" \ - " Please check your access to \n" \ - " $(HOTSPOT_CLIENT_PATH)/jvm.map \n" \ - " and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \ - "" >> $(WARNING_FILE) ; \ - fi - @if [ ! -r $(HOTSPOT_CLIENT_PATH)/jvm.pdb ]; then \ - $(ECHO) "WARNING: HOTSPOT_CLIENT_PATH does not point to valid HotSpot .pdb files. \n" \ - " These files are optional and aid in the debugging of the JVM. \n" \ - " Please check your access to \n" \ - " $(HOTSPOT_CLIENT_PATH)/jvm.pdb \n" \ - " and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \ - "" >> $(WARNING_FILE) ; \ - fi - endif - @if [ ! -r $(HOTSPOT_SERVER_PATH)/jvm.map ]; then \ - $(ECHO) "WARNING: HOTSPOT_SERVER_PATH does not point to valid HotSpot .map files. \n" \ - " These files are optional and aid in the debugging of the JVM. \n" \ - " Please check your access to \n" \ - " $(HOTSPOT_SERVER_PATH)/jvm.map \n" \ - " and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \ - "" >> $(WARNING_FILE) ; \ - fi - @if [ ! -r $(HOTSPOT_SERVER_PATH)/jvm.pdb ]; then \ - $(ECHO) "WARNING: HOTSPOT_SERVER_PATH does not point to valid HotSpot .pdb files. \n" \ - " These files are optional and aid in the debugging of the JVM. \n" \ - " Please check your access to \n" \ - " $(HOTSPOT_SERVER_PATH)/jvm.pdb \n" \ - " and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \ - "" >> $(WARNING_FILE) ; \ - fi -endif + HOTSPOT_OPT_FILES += $(HOTSPOT_SERVER_PATH)/jvm.map + HOTSPOT_OPT_FILES += $(HOTSPOT_SERVER_PATH)/jvm.pdb +endif - -###################################################### -# Check for existence of misc Hotspot imported files -###################################################### -HOTSPOT_INCLUDE_FILE_LIST = jvmti.h -HOTSPOT_INCLUDE_FILE_LIST += jvmticmlr.h -#HOTSPOT_INCLUDE_FILE_LIST += jni.h jni_md.h -#HOTSPOT_INCLUDE_FILE_LIST += jvm.h jvm_md.h -#HOTSPOT_INCLUDE_FILE_LIST += jmm.h -TMP_SDK_INCLUDE_FILE_LIST=$(HOTSPOT_INCLUDE_FILE_LIST:%.h=$(TEMPDIR)/%.h) -TMP_SDK_INCLUDE_FILE_DIFFS=$(HOTSPOT_INCLUDE_FILE_LIST:%.h=$(TEMPDIR)/%.hdiffs) - -# These include files must have a pattern: 'version: MAJOR.MINOR.MICRO' -# where MACRO, MINOR, and MICRO are numbers, e.g. 1.0.1, 0.2.90, etc. -# The critical version we are checking is MAJOR.MINOR, we print all three -# when we detect an error. - -TMP_SDK_INCLUDE_FIND_VERSION= $(EGREP) 'version:' -TMP_SDK_INCLUDE_GET_VERSION= $(TMP_SDK_INCLUDE_FIND_VERSION) | \ - $(SED) -e 's@.*\([0-9][0-9]*\.[0-9][0-9]*\)\.[0-9].*@\1@' -TMP_SDK_INCLUDE_GET_FULL_VERSION= $(TMP_SDK_INCLUDE_FIND_VERSION) | \ - $(SED) -e 's@.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*@\1@' - -# Compare an interface file (Rule creates 2 temp files: %.h and %.h.IMPORT) -# Files jvm.h, jvm_md.h and jmm.h are special in that they are not publicly -# exported but do represent VM interfaces used by the rest of the jdk. -# So these 3 will not be found in a promoted build and can only -# be checked when this represents a full control build (i.e. the -# HOTSPOT_IMPORT_PATH includes these files in it's 'include' directory). -$(TEMPDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h - @$(install-non-module-file) - @$(RM) $@.IMPORT - @if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(@F) ]; then \ - $(CP) $(HOTSPOT_IMPORT_PATH)/include/$(@F) $@.IMPORT ; \ - elif [ "$(@F)" != "jvm.h" -a "$(@F)" != "jmm.h" ] ; then \ - $(ECHO) "WARNING: HOTSPOT_IMPORT_PATH does not contain the interface file $(@F). \n" \ - " Check your value of ALT_HOTSPOT_IMPORT_PATH. \n" \ - "" >> $(WARNING_FILE) ; \ - $(CP) $< $@.IMPORT; \ - else \ - $(CP) $< $@.IMPORT; \ - fi - -$(TEMPDIR)/%.h: $(PLATFORM_SRC)/javavm/export/%.h - @$(install-non-module-file) - @$(RM) $@.IMPORT - @if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) ]; then \ - $(CP) $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) $@.IMPORT ; \ - elif [ "$(@F)" != "jvm_md.h" ] ; then \ - $(ECHO) "WARNING: HOTSPOT_IMPORT_PATH does not contain the interface file $(@F). \n" \ - " Check your value of ALT_HOTSPOT_IMPORT_PATH. \n" \ - "" >> $(WARNING_FILE) ; \ - $(CP) $< $@.IMPORT; \ - else \ - $(CP) $< $@.IMPORT; \ - fi - -# Compares the two tempfiles: %.h and %.h.IMPORT, answer in %.hdiffs -# Note: Putting anything into the hdiffs file will trigger generic IMPORT -# warning message in hotspot_import_include. -# First checks the major.minor versions, the micro number can differ. -# Second checks the full version. -# Lastly does a full diff if the full version differs or it has no version -$(TEMPDIR)/%.hdiffs: $(TEMPDIR)/%.h - @$(prep-target) - @$(TOUCH) $@ - @if [ "`$(CAT) $< | $(TMP_SDK_INCLUDE_GET_VERSION)`" != \ - "`$(CAT) $<.IMPORT | $(TMP_SDK_INCLUDE_GET_VERSION)`" ] ; then \ - $(ECHO) "WARNING: The file $(<F) is not the same interface as the VM version.\n " \ - " this workspace has $(<F) `$(CAT) $< | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)` and \n " \ - " HOTSPOT_IMPORT_PATH contains $(<F) `$(CAT) $<.IMPORT | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)` \n" \ - "" >> $(WARNING_FILE) ; \ - $(ECHO) "Version mis-match" > $@ ; \ - fi - @if [ "`$(CAT) $< | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)`" != \ - "`$(CAT) $<.IMPORT | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)`" ] ; then \ - $(RM) $<.filtered $<.IMPORT.filtered; \ - $(EGREP) -v 'VERSION' $< > $<.filtered; \ - $(EGREP) -v 'VERSION' $<.IMPORT > $<.IMPORT.filtered; \ - ($(DIFF) -w $<.filtered $<.IMPORT.filtered || exit 0) >> $@ ; \ - elif [ "`$(CAT) $< | $(TMP_SDK_INCLUDE_FIND_VERSION)`" = "" ] ; then \ - $(RM) $<.filtered $<.IMPORT.filtered; \ - $(EGREP) -v '@\(#\)' $< > $<.filtered; \ - $(EGREP) -v '@\(#\)' $<.IMPORT > $<.IMPORT.filtered; \ - ($(DIFF) -w $<.filtered $<.IMPORT.filtered || exit 0) >> $@ ; \ - fi - -# Verify all imported hotspot files -sane-hotspot_import:: sane-hotspot_import_dir sane-hotspot_import_include - -# Verify the base directory exists -sane-hotspot_import_dir: - @$(RM) $(TMP_SDK_INCLUDE_FILE_DIFFS) - @$(RM) $(TMP_SDK_INCLUDE_FILE_LIST) - @if [ ! -d "$(HOTSPOT_IMPORT_PATH)" ]; then \ - $(ECHO) "WARNING: The directory HOTSPOT_IMPORT_PATH=$(HOTSPOT_IMPORT_PATH) \n" \ - " does not exist, check your value of ALT_HOTSPOT_IMPORT_PATH. \n" \ - "" >> $(WARNING_FILE) ; \ - fi - -# Verify hotspot include files -sane-hotspot_import_include: $(TMP_SDK_INCLUDE_FILE_LIST) $(TMP_SDK_INCLUDE_FILE_DIFFS) - @if [ "`$(CAT) $(TMP_SDK_INCLUDE_FILE_DIFFS)`" != "" ] ; then \ - $(ECHO) "WARNING: Possible HotSpot VM interface conflict. \n" \ - " HOTSPOT_IMPORT_PATH is used to import files from the VM build. \n" \ - " It is also used to verify that any copied files are consistent between \n" \ - " these two components. It has been detected that one or more of the \n" \ - " VM interface files inside this workspace may not match the interfaces \n" \ - " exported by the VM, or the VM versions could not be found. \n" \ - " The list of VM interface files is: \n" \ - " $(HOTSPOT_INCLUDE_FILE_LIST). \n" \ - " This workspace has copies of these files at: \n" \ - " $(SHARE_SRC)/javavm/export and $(PLATFORM_SRC)/javavm/export \n" \ - " for build purposes, and they should contain the same interfaces \n" \ - " as the VM versions imported from: \n" \ - " \$$(HOTSPOT_IMPORT_PATH)/include \n" \ - " (i.e. $(HOTSPOT_IMPORT_PATH)/include) \n" \ - " If an interface indeed doesn't match, then the use of this interface \n" \ - " at JDK runtime could cause serious errors. \n" \ - "" >> $(WARNING_FILE) ; \ - for i in $(TMP_SDK_INCLUDE_FILE_DIFFS); do \ - if [ -s $$i ] ; then \ - $(ECHO) " " >> $(WARNING_FILE); \ - $(ECHO) "VM Interface Differences: $$i" >> $(WARNING_FILE); \ - $(CAT) $$i >> $(WARNING_FILE); \ - $(ECHO) " " >> $(WARNING_FILE); \ - fi; \ - done; \ - fi - @$(RM) $(TMP_SDK_INCLUDE_FILE_DIFFS) - @$(RM) $(TMP_SDK_INCLUDE_FILE_LIST) - -# The JDI-SA feature is not currently released on some platforms. -# See the Defs-<arch>.gmk files. - -ifeq ($(INCLUDE_SA), true) -# Verify that hotspot Serviceability Agent files are present. To keep +cd ..# Verify that hotspot Serviceability Agent files are present. To keep # it simple, we will just check for one of them. The others have arch # dependent paths. +ifeq ($(INCLUDE_SA), true) + HOTSPOT_OPT_FILES += $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar +endif -sane-hotspot_import:: - @if [ ! -r $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar ] ; then \ - $(ECHO) "WARNING: File $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar does not exist.\n" \ - " The JDI binding for the Serviceability Agent will not be included in the build.\n" \ - " Please check your access to\n" \ - " $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar\n" \ - " and/or check your value of ALT_HOTSPOT_IMPORT_PATH.\n" \ - "" >> $(WARNING_FILE) ; \ - fi -endif +# All settings for where hotspot files come from +define ifSetListing +$(if $($1)," $1 = $($1)\n",) +endef +HOTSPOT_SETTINGS := \ + $(call ifSetListing,HOTSPOT_IMPORT_PATH) \ + $(call ifSetListing,ALT_HOTSPOT_IMPORT_PATH) \ + $(call ifSetListing,HOTSPOT_CLIENT_PATH) \ + $(call ifSetListing,ALT_HOTSPOT_CLIENT_PATH) \ + $(call ifSetListing,HOTSPOT_SERVER_PATH) \ + $(call ifSetListing,ALT_HOTSPOT_SERVER_PATH) \ + $(call ifSetListing,HOTSPOT_LIB_PATH) \ + $(call ifSetListing,ALT_HOTSPOT_LIB_PATH) \ + +# Basic sanity rule +sane-hotspot: + @for i in $(HOTSPOT_REQ_FILES) ; do \ + if [ ! -r $$i ] ; then \ + $(ECHO) "ERROR: Hotspot file does not exist: $$i\n" \ + " Please check your settings: \n" \ + $(HOTSPOT_SETTINGS) \ + "" >> $(ERROR_FILE) ; \ + fi; \ + done + @for i in $(HOTSPOT_OPT_FILES) ; do \ + if [ ! -r $$i ] ; then \ + $(ECHO) "WARNING: Hotspot file does not exist: $$i\n" \ + " Please check your settings: \n" \ + $(HOTSPOT_SETTINGS) \ + "" >> $(ERROR_FILE) ; \ + fi; \ + done ###################################################### # Check the ant version diff --git a/make/java/jvm/Makefile b/make/java/jvm/Makefile --- a/make/java/jvm/Makefile +++ b/make/java/jvm/Makefile @@ -38,6 +38,9 @@ $(INCLUDEDIR)/jvmticmlr.h \ $(INCLUDEDIR)/classfile_constants.h +$(INCLUDEDIR)/%.h: $(HOTSPOT_IMPORT_PATH)/include/%.h + $(install-file) + $(INCLUDEDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h $(install-non-module-file)
05-04-2011

EVALUATION The fix for the following bug: 6580131 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining will introduce the new jvmticmlr.h file which will also need to be addressed by the eventual fix for this bug.
08-01-2010

EVALUATION Sorry for jumping in harder than I intended. I'll wait to see what you propose. Perhaps we could freeze an official copy of the jvmti.h file in the HSX repo, e.g., jvmti_1_0.h and jvmti_1_1.h. These will reflect the official files that should be used by a JDK that wants to advertise a specific JVM/TI version... We could even potentially allow non semantic updates (comments, etc.) if they are needed...
09-12-2009

EVALUATION Geez... you haven't even seen my diffs yet... I agree this is a jdk specific release issue, note that this bug is jdk7. That fact that any old HSX can be dropped into any old jdk is a complication created by HSX, so I need HSX help in solving it. For jdk7, I assumed we wanted the very latest hotspot jvmti.h file created by the jdk7 hotspot build or sitting next to the libjvm.so that is being used. For jdk5 or jdk6, we need a different solution, or we need to somehow control where the jvmti.h comes from. I would rather not have the jdk source base repository managing the generated files of hotspot builds, that just seems wrong to me. But that may be the best solution where we want to literally FREEZE these jvmti.h files in jdk6 or jdk5 state. Let's talk on the openjdk serviceability email alias after I create a webrev and show you what I'm doing.
09-12-2009

EVALUATION It isn't the right fix for HotSpot Express being dropped into JDK6 or earlier. HotSpot Express doesn't know or care what JDK it is being dropped into; it will always generate a jvmti.h file that matches the JVM/TI version supported by that HotSpot Express code base. It is the JDK that needs to choose which JVM/TI version is to be the default on that JDK. For the JDK6-Update releases, the choice is version 1.1 of JVM/TI and the JDK6-Update source base needs to make sure that it delivers that jvmti.h file. For the JDK5-Update releases, the choice is version 1.0 of JVM/TI and the JDK5-Update source base needs to make sure that it delivers that jvmti.h file. Please do not blindly import a jvmti.h file from the HSX import path. As HSX evolves, that will result in the wrong version of jvmti.h being included in the JDK image build.
09-12-2009

EVALUATION Plan is to change Makefile logic to just get jvmti.h from the hotspot build, or the import jdk, and no longer manage this hotspot generated file in the jdk repository. This may NOT be the right solution for jdk6, unless the jdk6 hotspot build can be changed to make sure a jdk6 flavored jvmti.h is exported from that hotspot build.
09-12-2009

EVALUATION Transferred to serviceability team
24-01-2009