Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4309188

java_g: Abort (core dumped)

XMLWordPrintable

    • sparc
    • solaris_7



      Name: szC45993 Date: 02/01/2000



      /net/sqesvr/vsn/testbase/testbase_nsk/src/nsk/arguments/args00109 test
      (and also args00110 args00111 args00112 args00113 args00114 args00115 args00116
      args00117 args00119 args00125 args00134 args00135 args00136 args00137
      args00138 args00139 args00140 args00141 args00142 args00143 args00144
      args00145 args00146 args00147 jclsss00104)
      destroys java_g (java version "1.3.0rc1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-S)
      Java HotSpot(TM) Client VM (build 1.3.0rc1-S-debug, interpreted mode))
      on Solaris (SunOS 5.7 sun4u sparc).
      These tests use -Xaprof option.

      See log and source below.

      LOG:
      ====

      novo81% /export/ld24/java/hotspot/jdk1.3.0/solaris/bin/java_g -version
      java version "1.3.0rc1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-S)
      Java HotSpot(TM) Client VM (build 1.3.0rc1-S-debug, interpreted mode)
      novo81% cd /export/ld24/java/zss/TONGA_WSs/testbase_js/src/nsk/arguments/args00109
      novo81% /export/ld24/java/hotspot/jdk1.3.0/solaris/bin/java_g -Xaprof args00109
      0: 3427304
      1: 3402584
      2: 3386200
      3: 3361624
      4: 3345240
      Test passed.
      #
      # HotSpot Virtual Machine Error, Unexpected Signal 10
      #
      # occurred at pc=fe183104
      #
      # Error ID: /usr/re/hotsparc_client1.3/ws/solsparc/hotsparc_client1.3fcs/build/solaris/../../src/os/solaris/vm/os_solaris.cpp, 1974 [ Patched ]
      #
      Dumping core....
      Abort (core dumped)



      SOURCE:
      ========

      //args00109.java
      /* This test simply creates a series of circularly
       * linked memeory objects which should be able to be
       * GC'd
       */


      class MemoryObject
      {
          byte array[];
          MemoryObject next;
          MemoryObject previous;

          public MemoryObject(int size)
          {
              array = new byte[size];
          }
      }

      class args00109
      {
          static final int ARRAY_SIZE = 100;
          static final int OBJECT_SIZE = 10;
          static final int LOOP_COUNT = 5;
          static final int CIRCULARITY_SIZE = 3;

          static MemoryObject memoryArray[] = new MemoryObject[ARRAY_SIZE];

          public static void main(String args[])
          {
              for (int j = 0; j < LOOP_COUNT; j++)
              {
                  System.out.println(j + ": " + Runtime.getRuntime().freeMemory());
                  for (int i = 0; i < ARRAY_SIZE; i ++)
                  {
                      memoryArray[i] = new MemoryObject(OBJECT_SIZE);
                      makeCircular(memoryArray[i], CIRCULARITY_SIZE);
                  }
              }

              // if there's any memory left, let's assume it's okay
              System.out.println("Test passed.");

          }

          public static void makeCircular(MemoryObject mObj, int depth)
          {
      MemoryObject tmpObj = mObj;

              for (int i = 0; i < depth; i++)
              {
                  tmpObj.next = new MemoryObject(OBJECT_SIZE);
                  tmpObj= tmpObj.next;
              }
      tmpObj.next = mObj;
          }

          public static void confirmCircular(MemoryObject mObj)
          {
      int count = 0;
      MemoryObject mObj2 = mObj;
      while (mObj2.next != mObj)
      {
      count++;
      mObj2 = mObj2.next;
      }
      System.out.println("Circularity level: " + count);
          }
      }
      //---------------------


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

            jmasa Jon Masamitsu (Inactive)
            zsssunw Zss Zss (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: