JDK-8188775 : Module jdk.internal.vm.compiler.management has not been granted accessClassInPackage.org.graalvm.compiler.hotspot
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-10-04
  • Updated: 2019-01-04
  • Resolved: 2017-10-06
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 10
10 b31Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
java/lang/SecurityManager/CheckAccessClassInPackagePermissions.java

----------System.err:(12/874)----------
java.lang.Exception: Module module jdk.internal.vm.compiler.management has not been granted ("java.lang.RuntimePermission" "accessClassInPackage.org.graalvm.compiler.hotspot")
	at CheckAccessClassInPackagePermissions.main(CheckAccessClassInPackagePermissions.java:106)
	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:564)
	at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:230)
	at java.base/java.lang.Thread.run(Thread.java:844)

Comments
ILW = Test fails due to missing permission (testbug), single test, no workaround = MLH = P4
06-10-2017

Yes, I think Mandy has mentioned that, but everything seemed to work for me, so I haven't done that. I can fix my mistake. What are the steps to reproduce the failure?
05-10-2017

Thank you, Mandy default.policy was not modified in JDK-8182701 changes: http://hg.openjdk.java.net/jdk10/hs/rev/8b2054b7d02c
04-10-2017

Did src/java.base/share/lib/security/default.policy get modified to grant AllPermissions to the new jdk.internal.vm.compiler.management? I mentioned that in one of my review comments. In any case, I believe this is one cause of the issue.
04-10-2017

Jaroslav, I am assigning this to you since you worked on JDK-8182701.
04-10-2017

[~mchung] Mandy, do we miss something with new module jdk.internal.vm.compiler.management declaration? Or we need to exclude it from CheckAccessClassInPackagePermissions.java test? We do export org.graalvm.compiler.hotspot to jdk.internal.vm.compiler.management: http://hg.openjdk.java.net/jdk10/hs/file/07ad034e0c29/src/jdk.internal.vm.compiler/share/classes/module-info.java#l53
04-10-2017

Ioi, how you ran the test?
04-10-2017