JDK-8221782 : [Graal] Module jdk.internal.vm.compiler.management has not been granted accessClassInPackage.jdk.vm.ci.services
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,13
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-04-01
  • Updated: 2021-02-01
  • Resolved: 2019-04-02
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 13
11.0.8-oracleFixed 13 b15Fixed
Related Reports
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.jdk.vm.ci.services")
        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.MainWrapper$MainThread.run(MainWrapper.java:127)
        at java.base/java.lang.Thread.run(Thread.java:835)

when running in Graal as JIT mode
Comments
diff -r 18547cad9ec6 src/java.base/share/lib/security/default.policy --- a/src/java.base/share/lib/security/default.policy +++ b/src/java.base/share/lib/security/default.policy @@ -160,6 +160,7 @@ grant codeBase "jrt:/jdk.internal.vm.compiler.management" { permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.vm.compiler.collections"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.vm.ci.runtime"; + permission java.lang.RuntimePermission "accessClassInPackage.jdk.vm.ci.services"; permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.core.common"; permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.debug"; permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.hotspot";
01-04-2019

It is similar to JDK-8216151. Import class jdk.vm.ci.services.Services was added to HotSpotGraalRuntimeMBean.java in last 'Update Graal' JDK-8221341.
01-04-2019

Steps to reproduce: >jtreg -jdk:JDK13_BITS -vmoptions:"-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+TieredCompilation -XX:+UseJVMCICompiler -Djvmci.Compiler=graal" -dir:open/test/jdk java/lang/SecurityManager/CheckAccessClassInPackagePermissions.java The issue is not present in latest promoted build jdk13b14.
01-04-2019