JDK-4944300 : Hard JVM Crash("Unknown software exception")
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2003-10-27
  • Updated: 2003-10-28
  • Resolved: 2003-10-28
Description

Name: rmT116609			Date: 10/27/2003


FULL PRODUCT VERSION :
D:\entw\java\reflectioncrash>c:\java\1.4.2\02\jre\bin\java -version
java version "1.4.2_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode)


FULL OS VERSION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
Error in MemoryManagement while passing an Object[] array to its old reference which is of type java.lang.Object.
Instead of returning a decent Exception the whole JVM crashes.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
/** Marc Schoenefeld **/
/* illegalaccess.org  */


public class MemApplet extends java.applet.Applet{

	static Object o = null;

  public static void main(String[] args) {
    (new MemApplet()).doit();
  }
  
  public void paint(java.awt.Graphics p) {
  	(new MemApplet()).doit();
  }
  
  void doit () {

    while (true) try {
        Object[] oarr = {o};  o = oarr;
    } catch (Throwable t) {
      o = null;
      System.out.println("Wurfgeschoss: " + t);
    }
  }
}


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
an exception
ACTUAL -
Window Alert box:
 Exception "Unknown software exception" (0xc00000fd) has occured in your application at location 0x6d3deb0e.


ERROR MESSAGES/STACK TRACES THAT OCCUR :
no stack trace available

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
/** Marc Schoenefeld **/
/* illegalaccess.org  */


public class MemApplet extends java.applet.Applet{

	static Object o = null;

  public static void main(String[] args) {
    (new MemApplet()).doit();
  }
  
  public void paint(java.awt.Graphics p) {
  	(new MemApplet()).doit();
  }
  
  void doit () {

    while (true) try {
        Object[] oarr = {o};  o = oarr;
    } catch (Throwable t) {
      o = null;
      System.out.println("Wurfgeschoss: " + t);
    }
  }
}

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
check all my class files for the following bytecode sequence

   3 iconst_1
   4 anewarray class #5 <Class java.lang.Object>
   7 dup
   8 iconst_0
   9 getstatic #6 <Field java.lang.Object o>
  12 aastore
  13 astore_1
  14 aload_1
  15 putstatic #6 <Field java.lang.Object o>
  18 goto 3
(Incident Review ID: 217993) 
======================================================================

Comments
EVALUATION The problem is in the Garbage collection subsystem, dealing with the very deeply nested arrays (an array who's element is an array who's element is an array...) This is a duplicate of bug 4396719 Mark sweep stack overflow on deeply nested Object arrays ###@###.### 2003-10-28
28-10-2003