JDK-8216151 : [Graal] Module jdk.internal.vm.compiler.management has not been granted accessClassInPackage.org.graalvm.compiler.debug
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,12,13
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-01-04
  • Updated: 2020-05-25
  • Resolved: 2019-01-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.
JDK 11 JDK 12 JDK 13
11.0.8-oracleFixed 12 b28Fixed 13Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
java/lang/SecurityManager/CheckAccessClassInPackagePermissions.java fails with 
java.lang.Exception: Module module jdk.internal.vm.compiler.management has not been granted ("java.lang.RuntimePermission" "accessClassInPackage.org.graalvm.compiler.debug")
        at CheckAccessClassInPackagePermissions.main(CheckAccessClassInPackagePermissions.java:124)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:246)
        at java.base/java.lang.Thread.run(Thread.java:835)

when running in Graal as JIT mode.

To reproduce run the test with "-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+TieredCompilation -XX:+UseJVMCICompiler -Djvmci.Compiler=graal" flags.
Comments
jdk11 backport request I would like to have the patch in jdk11 as well (for better parity with 11.0.8_oracle). The patch applies cleanly.
19-05-2020

testing passed
14-01-2019

http://cr.openjdk.java.net/~kvn/8216151/webrev.00/
13-01-2019

JDK-8199755: "Update Graal" updated compiler.management files but it did not updated default.policy. We just need to update default.policy according JDK-8199755. I will do that.
09-01-2019

Adding the permission for org.graalvm.compiler.debug to src/java.base/share/lib/security/default.policy is not sufficient because permissions for many other packages are missing as well. [~kvn], [~jtulach], could you please have a look?
04-01-2019

ILW = Test fails due to missing permission to access qualified exports, single test with Graal as JIT, no workaround = MMH = P3
04-01-2019

This issue seems to be similar to old one JDK-8188775
04-01-2019