FULL PRODUCT VERSION :
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
FULL OS VERSION :
Linux 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Created a custom security manager for experimenting purposes, which turned out to crash Hotspot VM. Please check other details in this submission for more info.
The main thing is that it has overridden the checkPermission() method in a way which calls super.checkPermission().
I have core dump and error log, but did not see field to uploading them.
THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Yes
THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes
REGRESSION. Last worked in version 8u101
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a custom security manager with 2 methods overridden:
<code>
public class TestSecurityManager extends SecurityManager {
public TestSecurityManager() {
super();
}
public void checkPermission(Permission perm)
{
System.err.println("TestSecurityManager.checkPermission: " + perm.getClass().getName() + " / " + perm.getName() + " / " + perm.getActions());
super.checkPermission(perm);
}
}
</code>
then load it from command line, e.g.:
java -Djava.security.manager=foo.TestSecurityManager -Djava.security.policy==.. ....otherparams...
EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected to run and lot things before checking access rights.
Actual is the crash/developer abort.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
TestSecurityManager.checkPropertyAccess("sun.boot.class.path")
TestSecurityManager.checkPropertyAccess("java.system.class.loader")
TestSecurityManager.checkPermission: java.lang.RuntimePermission / modifyThreadGroup /
java.security.AccessControlException
- klass: 'java/security/AccessControlException'
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (exceptions.cpp:427), pid=16634, tid=0x00007f6b37912700
# fatal error: ExceptionMark destructor expects no pending exceptions
#
# JRE version: Java(TM) SE Runtime Environment (8.0_101-b13) (build 1.8.0_101-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.101-b13 mixed mode linux-amd64 compressed oops)
# Core dump written. Default location: /home/marcell.major/server-ng/core or core.16634
#
# An error report file with more information is saved as:
# /home/marcell.major/server-ng/hs_err_pid16634.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
<code>
public class TestSecurityManager extends SecurityManager {
public TestSecurityManager() {
super();
}
public void checkPermission(Permission perm)
{
System.err.println("TestSecurityManager.checkPermission: " + perm.getClass().getName() + " / " + perm.getName() + " / " + perm.getActions());
super.checkPermission(perm);
}
}
</code>
---------- END SOURCE ----------