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

SA should be robust enough to handle corrupted objects or objects in inconsistent state.

XMLWordPrintable

    • generic
    • generic

      SA should be robust enough to iterate the objects. If one or more objects
      are in inconsistent state or it is corrupted SA should ignore those
      bad objects and continue to iterate the heap.

      Here are few case stack traces where SA bails out when it finds bad data in the object.

      1. Here bad Offset is passed to "isMarked()" so the SA is asserting with index out
         of bounds.


      Caused by: sun.jvm.hotspot.utilities.AssertionFailure: BitMap index out of bounds
      at sun.jvm.hotspot.utilities.Assert.that(Assert.java:32)
      at sun.jvm.hotspot.utilities.BitMap.at(BitMap.java:44)
      at sun.jvm.hotspot.memory.CMSBitMap.isMarked(CMSBitMap.java:108)
      at sun.jvm.hotspot.memory.CMSCollector.blockSizeUsingPrintezisBits(CMSCollector.java:63)
      at sun.jvm.hotspot.memory.CompactibleFreeListSpace.getLiveRegions(CompactibleFreeListSpace.java:116)
      at sun.jvm.hotspot.oops.ObjectHeap$LiveRegionsCollector.doSpace(ObjectHeap.java:534)
      at sun.jvm.hotspot.memory.ConcurrentMarkSweepGeneration.spaceIterate(ConcurrentMarkSweepGeneration.java:66)
      at sun.jvm.hotspot.oops.ObjectHeap.collectLiveRegions(ObjectHeap.java:559)
      at sun.jvm.hotspot.oops.ObjectHeap.iterate(ObjectHeap.java:243)
      at sun.jvm.hotspot.utilities.AbstractHeapGraphWriter.write(AbstractHeapGraphWriter.java:51)
      at sun.jvm.hotspot.utilities.HeapHprofBinWriter.write(HeapHprofBinWriter.java:416)
      at sun.jvm.hotspot.tools.HeapDumper.run(HeapDumper.java:56)
      at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
      at sun.jvm.hotspot.tools.HeapDumper.main(HeapDumper.java:77)



      2. If object has a reference to another object and that reference is a bad address then
         SA throws unmappedAddressException. SA should ignore this bad object.

      Caused by: sun.jvm.hotspot.debugger.UnmappedAddressException
      at sun.jvm.hotspot.debugger.PageCache.checkPage(PageCache.java:209)
      at sun.jvm.hotspot.debugger.PageCache.getData(PageCache.java:63)
      at sun.jvm.hotspot.debugger.DebuggerBase.readBytes(DebuggerBase.java:205)
      at sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal.readCInteger(ProcDebuggerLocal.java:329)
      at sun.jvm.hotspot.debugger.DebuggerBase.readAddressValue(DebuggerBase.java:442)
      at sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal.readOopHandle(ProcDebuggerLocal.java:343)
      at sun.jvm.hotspot.debugger.proc.ProcAddress.getOopHandleAt(ProcAddress.java:113)
      at sun.jvm.hotspot.oops.Oop.getKlassForOopHandle(Oop.java:222)
      at sun.jvm.hotspot.oops.ObjectHeap.newOop(ObjectHeap.java:364)
      at sun.jvm.hotspot.memory.CompactibleFreeListSpace.getLiveRegions(CompactibleFreeListSpace.java:138)
      at sun.jvm.hotspot.oops.ObjectHeap$LiveRegionsCollector.doSpace(ObjectHeap.java:534)
      at sun.jvm.hotspot.memory.ConcurrentMarkSweepGeneration.spaceIterate(ConcurrentMarkSweepGeneration.java:66)
      at sun.jvm.hotspot.oops.ObjectHeap.collectLiveRegions(ObjectHeap.java:559)
      at sun.jvm.hotspot.oops.ObjectHeap.iterate(ObjectHeap.java:243)
      at sun.jvm.hotspot.utilities.AbstractHeapGraphWriter.write(AbstractHeapGraphWriter.java:51)
      at sun.jvm.hotspot.utilities.HeapHprofBinWriter.write(HeapHprofBinWriter.java:416)
      at sun.jvm.hotspot.tools.HeapDumper.run(HeapDumper.java:56)
      at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
      at sun.jvm.hotspot.tools.HeapDumper.main(HeapDumper.java:77)
      ... 6 more



      3. Here is another case of unmapped exception. In this case it is thrown while iterating symbolTable.

             at sun.jvm.hotspot.debugger.PageCache.checkPage(PageCache.java:208)
              at sun.jvm.hotspot.debugger.PageCache.getData(PageCache.java:63)
              at sun.jvm.hotspot.debugger.DebuggerBase.readBytes(DebuggerBase.java:205)
              at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.readCInteger(LinuxDebuggerLocal.java:471)
              at sun.jvm.hotspot.debugger.DebuggerBase.readAddressValue(DebuggerBase.java:442)
              at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.readOopHandle(LinuxDebuggerLocal.java:431)
              at sun.jvm.hotspot.debugger.linux.LinuxAddress.getOopHandleAt(LinuxAddress.java:115)
              at sun.jvm.hotspot.oops.Oop.getKlassForOopHandle(Oop.java:222)
              at sun.jvm.hotspot.oops.ObjectHeap.newOop(ObjectHeap.java:348)
              at sun.jvm.hotspot.utilities.HashtableEntry.literal(HashtableEntry.java:53)
              at sun.jvm.hotspot.memory.SymbolTable.symbolsDo(SymbolTable.java:106)
              at sun.jvm.hotspot.utilities.HeapHprofBinWriter.writeSymbols(HeapHprofBinWriter.java:830)
              at sun.jvm.hotspot.utilities.HeapHprofBinWriter.write(HeapHprofBinWriter.java:396)
              at sun.jvm.hotspot.tools.HeapDumper.run(HeapDumper.java:56)
              at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
              at sun.jvm.hotspot.tools.HeapDumper.main(HeapDumper.java:77)

            Unassigned Unassigned
            swamyv Swamy Venkataramanappa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: