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

java_g Fatal: memory stomping error

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_nt

      Description



      Name: szC45993 Date: 08/05/99



      Some set of debugging flags, used
      for Tonga/src/nsk/arguments/args00134 test, crashes
      java_g (HotSpot Client VM 1.3beta, mixed mode, debug build l) on WinNT
      (Pentium II, 350MHz, 128Mb RAM, Windows NT 4.0 Workstation).
      See log and sources below.

      [#] cd f:/ld24/java/zss/TONGA_WSs/testbase_js/src/nsk/arguments/args00134
      [#] f:/ld25/java/dest/jdk1.3L/win32/bin/java_g -version
      java version "1.3"
      HotSpot Client VM (1.3beta, mixed mode, debug build l)
      [Verifying threads permgen oldgen ct newgen rset syms strs lkup zone dict hand C-heap ]
      [#] f:/ld25/java/dest/jdk1.3L/win32/bin/javac args00134.java
      [#] f:/ld25/java/dest/jdk1.3L/win32/bin/java_g -verify -XX:Flags=f:/ld24/java/zss/TONGA_WSs/testbase_js/src/nsk/arguments/args00134/args00134.opts args00134

      VM option '+PrintVMMessages'
      VM option '+PromptForDebug'
      VM option '+TraceVMOperation'
      VM option '+PrintCompilation'
      VM option '+PrintAssembly'
      VM option '+PrintNMethods'
      VM option '+PrintNativeNMethods'
      VM option '+PrintCodeCache'
      VM option '+PrintCodeCache2'
      VM option '+DumpEventsAtError'
      VM option '+PrintStubCode'
      VM option '+ProfilerPrintByteCodeStatistics'
      VM option '+ProfilerRecordPC'
      VM option '+ProfilerCheckIntervals'
      VM option '+PrintJVMWarnings'

      ...

      #
      # HotSpot Virtual Machine Error, Internal Error
      #
      # Fatal: memory stomping error
      #
      # Error ID: D:/localbuilds/hotspot_client1.3_beta1_compiler1\src\share\vm\runtime\os.cpp, 390
      #


      SOURCES:
      ========

      #-------------------- args00134.opts:
      +PrintVMMessages
      +PromptForDebug
      +TraceVMOperation
      +PrintCompilation
      +PrintAssembly
      +PrintNMethods
      +PrintNativeNMethods
      +PrintCodeCache
      +PrintCodeCache2
      +DumpEventsAtError
      +PrintStubCode
      +ProfilerPrintByteCodeStatistics
      +ProfilerRecordPC
      +ProfilerCheckIntervals
      +PrintJVMWarnings


      //--------------------- args00134.java:
      //args00134.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 args00134
      {
          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);
          }
      }
      //---------------------

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

        Attachments

          Activity

            People

            Assignee:
            smitrovisunw Srdjan Mitrovic (Inactive)
            Reporter:
            zsssunw Zss Zss (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: