Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4281578
Votes 0
Synopsis Second stack overflow crashes HotSpot VM
Category hotspot:runtime_system
Reported Against kestrel
Release Fixed
State 11-Closed, duplicate of 4298656, bug
Priority: 4-Low
Related Bugs 4254634 , 4261220 , 4298656 , 4302289 , 4329646
Submit Date 15-OCT-1999
Description





HotSpot 1.3fcs-K (solaris) crashes when StackOverflowError occurs in
a loop.
Win32 VM in mixed mode outputs this message once and silently exits
which does not look correct as well.
Classic and win32 VM in -Xint mode output expected triple
"StackOverflowError exception occurred" message.
Log and test source follow:

$ java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-K)
Java HotSpot (TM) Client VM (build 1.3-K, interpreted mode)

$ java test
StackOverflowError exception occurred
An irrecoverable stack overflow has occurred.
#
# HotSpot Virtual Machine Error, Unexpected Signal 11
#
# Error ID: 4F533F534F4C415249530E4350500790 01
#

----------------------------------------------------------- test.java
public class test {

    public static void main(String[] args) throws Exception {
  	test t = new test();
	for (int k = 0; k < 3; k++) {
	    try {
		t.proc();
	    } catch(StackOverflowError e) {
		System.out.println("StackOverflowError exception occurred");
	    }
	}
	System.out.println("End of the loop");
    }

    void proc() {
	proc();
    }
}

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





HotSpot crashes when second stack overflow occurs. Classic does not.

JCK testsuite cannot be passed in singleJVM mode because
of this bug: there are two tests in JCK that throw StackOverflowError
(vm/concepts/exceptions/exceptions031/exceptions03101 and
vm/concepts/exceptions/exceptions031/exceptions03102)

Test program
--------------------------------------------- test.java ---

public class test {
   public static void main(String[] args) {
      overflow("First overflow");
      overflow("Second overflow");
   }
   static void runner() {
      runner();
   }
   static void overflow(String msg) {
      try {
         runner();
      } catch (StackOverflowError e) {
         System.out.println(msg);
      }
   }
}

-----------------------------------------------------------

Solaris execution log
-----------------------------------------------------------
> uname -a

SunOS novo12 5.7 Generic_Patch sun4u sparc SUNW,Ultra-2

> javac test.java
> java -version

java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-P)
Java HotSpot(TM) Client VM (build 1.3-P, interpreted mode)

> java -classic -version

java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-P)
Classic VM (build 1.3.0-P, green threads, nojit)

> java test

First overflow
An irrecoverable stack overflow has occurred.
#
# HotSpot Virtual Machine Error, Unexpected Signal 11
#
# Error ID: 4F533F534F4C415249530E43505007B5 01
#

> hserror 4F533F534F4C415249530E43505007B5

os_solaris.cpp, 1973

> java -classic test

First overflow
Second overflow

-----------------------------------------------------------
Being run on WinNT, HotSpot crashes too, without
any diagnostics but with exitcode 128.

--------------------------------------------- doit.bat ---
@echo off
h:/ld25/java/dest/jdk1.3.0P/win32/bin/java %1 %2 %3
echo ---%errorlevel%---
-----------------------------------------------------------

Windows NT execution log
-----------------------------------------------------------
> doit.bat -version

java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-P)
Java HotSpot(TM) Client VM (build 1.3-P, mixed mode)
---0---

> doit.bat -classic -version

java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-P)
Classic VM (build 1.3.0-P, native threads, nojit)
---0---

> doit.bat test

First overflow
---128---

> doit.bat -classic test

First overflow
Second overflow
---0---

-----------------------------------------------------------

Failure reproduces under jdk1.3.0-A,J,M,N,O

======================================================================
Work Around
N/A
Evaluation
N/A
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang