JDK-5091227 : JCK: one test fails with -client -Xcomp flags in JCK runtime tests
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.3.1_13
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2004-08-24
  • Updated: 2004-10-06
  • Resolved: 2004-10-06
Related Reports
Relates :  
Description
When running JCK13a runtime tests on Solaris 8 SPARC with the 1.3.1_13b03 JDK - one test fails (.jtr file attached).  

vm/concepts/exceptions/exceptions031/exceptions03101

The test only seems to fail due to the combination of flags used.


The reason for failure is seen below:

----------------------------------------------------------
#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 53484152454432554E54494D450E43505000EA 01
#
# Problematic Thread: prio=5 tid=0x28888 nid=0x1 runnable
#
----------log:(0/0)----------
result: Failed. unexpected exit code: exit code 6


test result: Failed. unexpected exit code: exit code 6
----------------------------------------------------------



After reading bug# 4949113, I tried running the tests with a different combination of the flags using the steps that were outlined in the bug report i.e.

# export JAVA_HOME=/usr/j2se
# export JCK=/net/latte.ireland/export/home4/jck/JCK-runtime-13a
# export CLASSPATH="$JCK/classes:$JCK/javatest.jar"

# $JAVA_HOME/bin/java -Xfuture -showversion javasoft.sqe.tests.vm.concepts.exceptions.exceptions031.exceptions03101.exceptions03101
java version "1.3.1_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_13-b03)
Java HotSpot(TM) Client VM (build 1.3.1_13-b03, mixed mode)

# $JAVA_HOME/bin/java -client -Xcomp -Xfuture -showversion javasoft.sqe.tests.vm.concepts.exceptions.exceptions031.exceptions03101.exceptions03101
java version "1.3.1_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_13-b03)
Java HotSpot(TM) Client VM (build 1.3.1_13-b03, compiled mode)
#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 53484152454432554E54494D450E43505000EA 01
#
# Problematic Thread: prio=5 tid=0x287e0 nid=0x1 runnable 
#
Abort (core dumped)

# $JAVA_HOME/bin/java -client -Xcomp -showversion javasoft.sqe.tests.vm.concepts.exceptions.exceptions031.exceptions03101.exceptions03101
java version "1.3.1_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_13-b03)
Java HotSpot(TM) Client VM (build 1.3.1_13-b03, compiled mode)
#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 53484152454432554E54494D450E43505000EA 01
#
# Problematic Thread: prio=5 tid=0x287e0 nid=0x1 runnable 
#
Abort (core dumped)

# $JAVA_HOME/bin/java -Xcomp -showversion javasoft.sqe.tests.vm.concepts.exceptions.exceptions031.exceptions03101.exceptions03101
java version "1.3.1_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_13-b03)
Java HotSpot(TM) Client VM (build 1.3.1_13-b03, compiled mode)
#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 53484152454432554E54494D450E43505000EA 01
#
# Problematic Thread: prio=5 tid=0x287e0 nid=0x1 runnable 
#
Abort (core dumped)

# $JAVA_HOME/bin/java -client -showversion javasoft.sqe.tests.vm.concepts.exceptions.exceptions031.exceptions03101.exceptions03101
java version "1.3.1_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_13-b03)
Java HotSpot(TM) Client VM (build 1.3.1_13-b03, mixed mode)

#$JAVA_HOME/bin/java -server -Xcomp -showversion javasoft.sqe.tests.vm.concepts.exceptions.exceptions031.exceptions03101.exceptions03101
java version "1.3.1_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_13-b03)
Java HotSpot(TM) Server VM (build 1.3.1_13-b03, compiled mode)
#

========================================

This behaviour has been reproduced on 3 Solaris 8 SPARC machines (with August 2004 patches).  I can also reproduce this behaviour with 1.3.1_12, however on 1.3.1_09, 1.3.1_10 and 1.3.1_11 - no error is returned.

###@###.### 2004-08-24
###@###.### 10/6/04 13:40 GMT

Comments
EVALUATION The jck test tests the StackOverFlowError: package javasoft.sqe.tests.vm.concepts.exceptions.exceptions031.exceptions03101; import java.io.PrintStream; public class exceptions03101 { public static int counter = 1; static int Runner() { counter = counter * -1; int i = counter; if(counter < 2) counter += Runner(); return i; } public static int run(String argv[], PrintStream out) { try{ Runner(); } catch (StackOverflowError e) { return 0; } catch (OutOfMemoryError e) { return 0; } return 2; } public static void main(String argv[]) { System.exit(run(argv, System.out) + 95/*STATUS_TEMP*/); } } And this testcase fails with 1.3.1_13 (with -client -Xcomp) while trying to throw StackOverflowError Exception. The JCK Test does not fail with 1.3.1_11. It has started failing from 1.3.1_12 b02. I looked at all the fixes that have gone into 1.3.1_12-b02 and looks like this regression is appearing because of the fix for 4298656:Stack Yellow zone not re-enabled after a StackOverFlow. ###@###.### 2004-08-30 StackReguardSlack is not enough in this case (default is 4096, 4K, one page), but this case, we need two pages (8K). There was no test against 4298656 fix on -client -Xcomp(rare case!) about this test case, this is why we did not find this regression. Please use the workaround. ###@###.### 2004-08-30 The suggested workaround -XX:StackReguardSlack=8192 works fine, so I am closing this bug. ###@###.### 10/6/04 13:40 GMT
30-08-2004

WORK AROUND -XX:StackReguardSlack=8192 This is product flag in 1.3.1 and debug flag in 1.4.2. ###@###.### 2004-08-30
30-08-2004