JDK-6919795 : Serial tests failed with SecurityException
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs16,5.0u25
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,windows
  • CPU: generic,x86
  • Submitted: 2010-01-25
  • Updated: 2011-01-19
  • Resolved: 2010-12-10
Related Reports
Duplicate :  
Description
Serial tests failed with SecurityException 

nsk/serial/Unsafe/addressSize/adrsize001	execute_positive	#
nsk/serial/Unsafe/allocateInstance/allinst001	execute_positive	#
nsk/serial/Unsafe/arrayBaseOffset/arrbaseoff001	execute_positive	#
nsk/serial/Unsafe/arrayIndexScale/arridxsc001	execute_positive	#
nsk/serial/Unsafe/copyMemory/copymem001	execute_positive	#
nsk/serial/Unsafe/defineClass_cp/defclscp001	execute_positive	#
nsk/serial/Unsafe/defineClass/defclass001	execute_positive	#
nsk/serial/Unsafe/fieldOffset/fldoffset001	execute_positive	#
nsk/serial/Unsafe/fields/invfldoff001	execute_positive	#
nsk/serial/Unsafe/getAddress/getaddr001	execute_positive	#
nsk/serial/Unsafe/getBoolean_oi/getbooloi001	execute_positive	#
nsk/serial/Unsafe/getByte_l/getbytel001	execute_positive	#
nsk/serial/Unsafe/getByte_oi/getbyteoi001	execute_positive	#
nsk/serial/Unsafe/getChar_l/getcharl001	execute_positive	#
nsk/serial/Unsafe/getChar_oi/getcharoi001	execute_positive	#
nsk/serial/Unsafe/getDouble_l/getdbll001	execute_positive	#
nsk/serial/Unsafe/getDouble_oi/getdbloi001	execute_positive	#
nsk/serial/Unsafe/getFloat_l/getfltl001	execute_positive	#
nsk/serial/Unsafe/getFloat_oi/getfltoi001	execute_positive	#
nsk/serial/Unsafe/getInt_l/getintl001	execute_positive	#
nsk/serial/Unsafe/getInt_oi/getintoi001	execute_positive	#
nsk/serial/Unsafe/getLong_l/getlngl001	execute_positive	#
nsk/serial/Unsafe/getLong_oi/getlongoi001	execute_positive	#
nsk/serial/Unsafe/getObject/getobject001	execute_positive	#
nsk/serial/Unsafe/getShort_l/getshrl001	execute_positive	#
nsk/serial/Unsafe/getShort_oi/getshortoi001	execute_positive	#
nsk/serial/Unsafe/getUnsafe/getunsafe001	execute_positive	#
nsk/serial/Unsafe/monitorEnter/monenter001	execute_positive	#
nsk/serial/Unsafe/monitorExit/monexit001	execute_positive	#
nsk/serial/Unsafe/pageSize/pagesize001	execute_positive	#
nsk/serial/Unsafe/putAddress/putaddr001	execute_positive	#
nsk/serial/Unsafe/putBoolean_oib/putbooloib001	execute_positive	#
nsk/serial/Unsafe/putByte_lb/putbytelb001	execute_positive	#
nsk/serial/Unsafe/putByte_oib/putbyteoib001	execute_positive	#
nsk/serial/Unsafe/putChar_lc/putcharlc001	execute_positive	#
nsk/serial/Unsafe/putChar_oic/putcharoic001	execute_positive	#
nsk/serial/Unsafe/putDouble_ld/putdblld001	execute_positive	#
nsk/serial/Unsafe/putDouble_oid/putdbloid001	execute_positive	#
nsk/serial/Unsafe/putFloat_lf/putfltlf001	execute_positive	#
nsk/serial/Unsafe/putFloat_oif/putfltoif001	execute_positive	#
nsk/serial/Unsafe/putInt_li/putintli001	execute_positive	#
nsk/serial/Unsafe/putInt_oii/putintoii001	execute_positive	#
nsk/serial/Unsafe/putLong_oil/putlongoil001	execute_positive	#
nsk/serial/Unsafe/putObject/putobject001	execute_positive	#
nsk/serial/Unsafe/putShort_ls/putshrls001	execute_positive	#
nsk/serial/Unsafe/putShort_ois/putshortois001	execute_positive	#
nsk/serial/Unsafe/setMemory/setmem001	execute_positive	#
nsk/serial/Unsafe/throwException/throwex001	execute_positive	#

Comments
EVALUATION The fix to eliminate HPI fixes the 1.5 hsx problem. I'd like to close this as a duplicate of 6348631 which fixes this problem in hsx. The patch in suggested fix will work until then.
10-12-2010

EVALUATION This is not a bug for jdk7, only jdk 1.5.
24-11-2010

EVALUATION It seems that a change to classLoader.cpp in the VM might have caused this. I don't know why because hpi::read() just calls ::read() with the same parameters, but when ::read is called from the VM, it cannot read the classfile on the bootclasspath in the 1.5.0 jdk, but can in the 1.6.0 jdk. This hpi::read -> os::read change was made as a fix for CR 4802480. Since I can't build with the 16.3 workspace I have (I reproduced this with the hsx18 repository), can someone in sustaining try this? Thanks.
30-06-2010

SUGGESTED FIX diff --git a/src/share/vm/classfile/classLoader.cpp b/src/share/vm/classfile/classLoader.cpp --- a/src/share/vm/classfile/classLoader.cpp +++ b/src/share/vm/classfile/classLoader.cpp @@ -164,7 +164,7 @@ ClassFileStream* ClassPathDirEntry::open if (file_handle != -1) { // read contents into resource array u1* buffer = NEW_RESOURCE_ARRAY(u1, st.st_size); - size_t num_read = os::read(file_handle, (char*) buffer, st.st_size); + size_t num_read = hpi::read(file_handle, (char*) buffer, st.st_size); // close file hpi::close(file_handle); // construct ClassFileStream
30-06-2010

EVALUATION Fail is repeatable for 5.0u25 b02 HSX Steps to reproduce ssh to win-x86 machine using stt-robot account cd K:/results/1.5.0_25/b02/vm/win7-x86-32_nsk.serial.testlist_01/ResultDir/ cd to any of the results dir there. For example, nsk/serial/Unsafe/allocateInstance/allinst001 ksh rerun.sh It is 16.3 hotspot build $ C:/local/common/JDK_DIR/bin/java -server -Xmixed -Xshare:on -version java version "1.5.0_25-ea" Java(TM) Platform, Standard Edition for Business (build 1.5.0_25-ea-b02) Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode, sharing)
02-06-2010

EVALUATION Test was run using hs16.0. According to the Comments, the problem doesn't exist in hs16.1, which latter is what we intend to use for GA.
27-01-2010