JDK-7129098 : compiler/7116216/StackOverflow.java fails due to IllegalAccessException
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs23
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2012-01-11
  • Updated: 2012-01-11
  • Resolved: 2012-01-11
Related Reports
Duplicate :  
Description
The following JT_HS test started failing in the 2012-01-10
RT_Baseline nightly after syncing with Main_Baseline:

    compiler/7116216/StackOverflow.java

This test failed in 15 configs (so far).

Here is a snippet from one of the .jtr files:

----------messages:(3/152)----------
command: main -Xcomp -Xbatch StackOverflow
reason: User specified action: run main/othervm -Xcomp -Xbatch StackOverflow 
elapsed time (seconds): 11.064
----------System.out:(0/0)----------
----------System.err:(12/876)----------
java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class StackOverflow with modifiers "public static"
	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
	at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:261)
	at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:253)
	at java.lang.reflect.Method.invoke(Method.java:594)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:722)

JavaTest Message: Verify that the class defining the test is
JavaTest Message: declared public (test invoked via reflection)

STATUS:Error.java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class StackOverflow with modifiers "public static"
result: Error. java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class StackOverflow with modifiers "public static"


test result: Error. java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class StackOverflow with modifiers "public static"
Since RT_Baseline started failing when sync'ed with Main_Baseline,
I checked Main_Baseline nightly results. This test started failing
in Main_Baseline on 2011-01-04 with the following VM identifier:

    23.0-b10-internal-201201041834.bvandett.merge-to-main

The test failed in 8/8 configs in Main_Baseline.
The test does not show up on either the "New Failures" list or
the "Known Failures" list for the 2012-01-03 nightly in any
baseline. That means that the test either did not fail in any
baseline's nightly prior to 2012-01-04 or that subsuite (JT_HS)
is not executed on the baseline in which the failure originated.

I checked all baseline back to 2011-12-26 and verified that this
test first fails in Main_Baseline on 2012-01-04.
I just realized that this set of error messages:

java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class StackOverflow with modifiers "public static"
	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
	at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:261)
	at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:253)
	at java.lang.reflect.Method.invoke(Method.java:594)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:722)

JavaTest Message: Verify that the class defining the test is
JavaTest Message: declared public (test invoked via reflection)

is coming from the JavaTest/JTREG harness. This is starting
to look like an environment issue.

Comments
EVALUATION Vladimir has already fixed this test as part of another fix that is coming up via Comp_Baseline. I'm closing this bug as a dup of 7128352.
11-01-2012

EVALUATION Yup, it is... $ hg diff StackOverflow.java diff -r 865e0817f32b test/compiler/7116216/StackOverflow.java --- a/test/compiler/7116216/StackOverflow.java Tue Jan 10 15:47:19 2012 -0500 +++ b/test/compiler/7116216/StackOverflow.java Wed Jan 11 11:26:03 2012 -0700 @@ -30,7 +30,7 @@ * @run main/othervm -Xcomp -Xbatch StackOverflow */ -class StackOverflow { +public class StackOverflow { static String stackOverflow_largeFrame_liveOopForGC; public static int stackOverflow_largeFrame(int call_count, String liveOopForGC) { and here is the resulting .jtr file: #Test Results (version 2) #Wed Jan 11 11:19:49 MST 2012 #checksum:6126b73b5f890dec #-----testdescription----- $file=/work/shared/bug_hunt/hsx_rt_latest/exp_7129098/test/compiler/7116216/StackOverflow.java $root=/work/shared/bug_hunt/hsx_rt_latest/exp_7129098/test keywords=bug7116216 othervm run=USER_SPECIFIED main/othervm -Xcomp -Xbatch StackOverflow\n source=StackOverflow.java title=The vm crashes when GC happens during throwing a StackOverflow exception #-----environment----- #-----testresult----- description=file:/work/shared/bug_hunt/hsx_rt_latest/exp_7129098/test/compiler/7116216/StackOverflow.java end=Wed Jan 11 11:19:49 MST 2012 environment=regtest execStatus=Passed. Execution successful javatestOS=SunOS 5.10 (x86) javatestVersion=4.1.4 script=com.sun.javatest.regtest.RegressionScript sections=script_messages build compile main start=Wed Jan 11 11:19:48 MST 2012 test=compiler/7116216/StackOverflow.java work=/work/shared/bug_hunt/hsx_rt_latest/exp_7129098/test/compiler/7116216/JT_HS.solaris-i586/JTwork/compiler/7116216 #section:script_messages ----------messages:(4/219)---------- JDK under test: (/work/local/jdk/1.8.0/solaris-i586) java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b20) Java HotSpot(TM) Client VM (build 23.0-b10-rt_baseline_clone_dcubed-product, mixed mode) #section:build ----------messages:(3/98)---------- command: build StackOverflow reason: Named class compiled on demand elapsed time (seconds): 0.613 result: Passed. Build successful #section:compile ----------messages:(3/186)---------- command: compile /work/shared/bug_hunt/hsx_rt_latest/exp_7129098/test/compiler/7116216/StackOverflow.java reason: .class file out of date or does not exist elapsed time (seconds): 0.609 ----------System.out:(0/0)---------- ----------System.err:(0/0)---------- result: Passed. Compilation successful #section:main ----------messages:(3/151)---------- command: main -Xcomp -XbatchStackOverflow reason: User specified action: run main/othervm -Xcomp -Xbatch StackOverflow elapsed time (seconds): 0.315 ----------System.out:(1/13)---------- finished ok! ----------System.err:(1/15)---------- STATUS:Passed. result: Passed. Execution successful test result: Passed. Execution successful I'm reducing this bug from P3/S3 -> P4/S4.
11-01-2012

EVALUATION The test header looks like: 25 /** 26 * @test 27 * @bug 7116216 28 * @summary The vm crashes when GC happens during throwing a StackOverfl ow exception 29 * 30 * @run main/othervm -Xcomp -Xbatch StackOverflow 31 */ 32 33 class StackOverflow { could this be as simple as missing "public" on line 33?
11-01-2012