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

java_g Fatal: memory stomping error

    XMLWordPrintable

Details

    • solaris
    • x86
    • windows_nt

    Description



      Name: szC45993 Date: 12/13/99



       /net/sqesvr/vsn/testbase/testbase_nsk/src/nsk/arguments/args00122 and
      /net/sqesvr/vsn/testbase/testbase_nsk/src/nsk/arguments/args00134 tests,
      which use developing options, crash java_g (java version "1.2.2"
      Java HotSpot(TM) Server VM (2.0rc1, mixed mode, debug build I))
      on WinNT (Pentium II, 350MHz, 128Mb RAM, Windows NT 4.0 Workstation).
      See log and sources below.

      TONGA'S LOG:
      ============
      ...
              native: 0
      runtime_stubs: 33
      i2c_adapters: 5
      c2i_adapters: 3
      deoptimization_stubs: 1
      uncommon_traps: 1

      nmethod size distribution (non-zombie java)
      -------------------------------------------------
      0 - 512 bytes 2
      1024 - 1536 bytes 2
      ## nof_mallocs = 899, nof_frees = 75
      ## memory stomp: byte at 0x8538a0 after object 0x853888
      ### previous object (not sure if correct): 0x853808 (51 bytes)
      ### next object: 0x853938 (16 bytes)
      #
      # HotSpot Virtual Machine Error, Internal Error
      #
      # Fatal: memory stomping error
      #
      #
      Last parse: 6+++ args00122::main

        0: 1 ( 0.3%)
        9: 4 ( 1.0%)
       10: 392 (98.7%)
      [error occured during error reporting]

      TEST FAIL nsk/arguments/args00122 compile_and_execute


      LOG:
      ====
      [#] cd d:/zss/TONGA_WSs/ZSS_workdir/Administrator.NT.x86/args00122
      [#] base_js/src/nsk/arguments/args00122/gammarc.gammarc -verify args00122 <
      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'
      StubRoutines::verify_oop [0x832f05c, 0x832f08c[ (48 bytes)
      Could not load disassembler

      ...

      Code Cac/String;)V
      he Entries (total of 70)
      -------------------------------------------------
      nmethods: 11
              alive: 11
              not_entrant: 0
              zombie: 0
              unloaded: 0
              young: 0
              old: 11
              java: 11
              native: 0
      runtime_stubs: 33
      i2c_adapters: 8
      c2i_adapters: 3
      deoptimization_stubs: 1
      uncommon_traps: 1

      nmethod size distribution (non-zombie java)
      -------------------------------------------------
      0 - 512 bytes 5
      512 - 1024 bytes 1
      1024 - 1536 bytes 3
      3072 - 3584 bytes 1
      ## nof_mallocs = 1267, nof_frees = 384
      ## memory stomp: byte at 0x86dadc after object 0x86da98
      ### previous object (not sure if correct): 0x86da28 (32 bytes)
      [1] + Done(139) f:/ld24/java/hotspot/jdk1.2.2/win32/bin/java_g -XX":"Flags=f:/ld24/java/zss/TONGA_WSs/testbase_js/src/nsk/arguments/args00122/gammarc.gammarc -verify args00122
        1643 Segmentation violation f:/ld24/java/hotspot/jdk1.2.2/win32/bin/java_g
      [#]


      SOURCES:
      ========

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



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

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

      Attachments

        Issue Links

          Activity

            People

              cclicksunw Clifford Click (Inactive)
              zsssunw Zss Zss (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: