JDK-8206113 : Troubles configuring graal tests
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-06-29
  • Updated: 2020-01-30
  • Resolved: 2020-01-23
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.
JDK 15
15 b08Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
When I provide no graal flags to configure, a null build of test-image gives me unwanted duplicate messages:

 $ make test-image
Building target 'test-image' in configuration 'linux-x86_64-normal-server-release'
Skip building of Graal unit tests because 3rd party libraries directory is not specified
Skip building of Graal unit tests because 3rd party libraries directory is not specified

Probably make should be silent, and any failures about detecting the graal test libraries should be moved to the configure step where it is customary to have such ... "Checking for ..."

---

Even configuring without graal does not change this

--with-jvm-features=-graal

should disable all graal-relted output, but does not.

---

If I try instead
 --with-jvm-features=-graal,-jvmci 
I get
/home/martin/ws/jdk11/src/hotspot/share/utilities/macros.hpp:277:4: error: #error "Must have JVMCI for AOT"

---

If I try instead
 --with-jvm-features=-graal,-aot,-jvmci
the build succeeds, but attempts to run jtreg fail with:


java.lang.NullPointerException
Error: failed to get JDK properties for /home/martin/ws/jdk11/build/linux-x86_64-normal-server-release/images/jdk/bin/java -enablesystemassertions -Djava.library.path=/home/martin/ws/jdk11/build/linux-x86_64-normal-server-release/images/jdk/../test/jdk/jtreg/native; exit code 1

---

All of these configure variants should Just Work.
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/f2eeb97f9b3d User: epavlova Date: 2020-01-23 18:23:45 +0000
23-01-2020

Note, JDK-8206135 will be fixed only in JDK12 since it is not critical fix. All these features Graal, JVMCI, AOT are still experimental. And there is workaround: --with-jvm-features=-graal,-aot,-jvmci
02-07-2018

ILW = Graal unit test warnings when building test-image, if 3rd party libraries directory is not specified, no workaround = MMH = P3 I'm categorizing this as test bug because it's not affecting the VM build.
02-07-2018

[~kvn] I have created JDK-8206135 for AOT configure issues.
02-07-2018

Yes, it should be config error. We seems missing check HOTSPOT_CHECK_JVM_FEATURE(jvmci) in autoconf/hotspot.m4 when setting ENABLE_AOT.
29-06-2018

I'm not completely sure whether --with-jvm-features=-graal,-jvmci should succeed or not, but if it's an error it should be a configure time error, not a compile time error.
29-06-2018

[~kvn] what do toy think about "If I try instead --with-jvm-features=-graal,-jvmci I get /home/martin/ws/jdk11/src/hotspot/share/utilities/macros.hpp:277:4: error: #error "Must have JVMCI for AOT" -- All of these configure variants should Just Work. "
29-06-2018

Adding @requires vm.graal.enabled is not right because Graal unit tests should be able to run without Graal but with jvmci enabled.
29-06-2018

> I already see some tests that use @requires vm.graal.enabled. Perhaps all the graal unit tests should do that? these tests have '@modules jdk.internal.vm.compiler', so they won't be run on builds w/o this module. for the time being, this module always contains graal. '@requires vm.graal.enabled' has a slightly different meaning, it's true iif graal exists and enabled as JIT, IIRC some of graal unit tests won't work correctly if they are run in such configuration.
29-06-2018

created JDK-8206117 for NPE generated by jtreg
29-06-2018

Ekaterina, I agree that removing the @(info as you suggest is a good short term solution.
29-06-2018

I already see some tests that use @requires vm.graal.enabled. Perhaps all the graal unit tests should do that? ./hotspot/jtreg/compiler/graalunit/NodesTest.java:28: * @requires vm.graal.enabled
29-06-2018

The patch to avoid graalunit tests warnings is: --- a/make/test/JtregGraalUnit.gmk Fri Jun 29 11:10:47 2018 +0200 +++ b/make/test/JtregGraalUnit.gmk Fri Jun 29 10:52:10 2018 -0700 @@ -129,8 +129,6 @@ )) TARGETS_IMAGE += $(COPY_HOTSPOT_JTREG_GRAAL) - else - $(info Skip building of Graal unit tests because 3rd party libraries directory is not specified) endif endif
29-06-2018