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

[Graal] Potential memory leak in org.graalvm.compiler.lir.alloc.lsra.ssa.SSALinearScan

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: hotspot

      Description

      Running CompileTheWorld test with java.base module fail with OutOfMemoryError when running the test with -Xmx1024m.
      Looking at heap dump file generated when running with -XX:+HeapDumpOnOutOfMemoryError shows that the heap is mostly occupied by BlockMap<BlockData> blockData array referenced from org.graalvm.compiler.lir.alloc.lsra.LinearScan.

      Class Name | Shallow Heap | Retained Heap
      --------------------------------------------------------------------------------------------------------------------------
      org.graalvm.compiler.lir.alloc.lsra.ssa.SSALinearScan @ 0x3069dafe0 | 96 | 940,772,936
      |- <class> class org.graalvm.compiler.lir.alloc.lsra.ssa.SSALinearScan @ 0x302a65c08 | 8 | 88
      |- registers jdk.vm.ci.code.RegisterArray @ 0x30298a868 | 24 | 272
      |- debug org.graalvm.compiler.debug.DebugContext @ 0x30415b6e0 | 72 | 168
      |- sortedBlocks org.graalvm.compiler.core.common.cfg.AbstractBlockBase[48215] @ 0x306d269a0| 192,880 | 192,880
      |- intervalEndMarker org.graalvm.compiler.lir.alloc.lsra.Interval @ 0x30703d9e8 | 96 | 184
      |- rangeEndMarker org.graalvm.compiler.lir.alloc.lsra.Range @ 0x30703da48 | 24 | 24
      |- res org.graalvm.compiler.hotspot.HotSpotLIRGenerationResult @ 0x3073caa50 | 56 | 192
      |- ir org.graalvm.compiler.lir.LIR @ 0x3073caaa0 | 48 | 4,257,912
      |- frameMapBuilder org.graalvm.compiler.lir.amd64.AMD64FrameMapBuilder @ 0x3073cb528 | 40 | 40,512
      |- moveFactory org.graalvm.compiler.hotspot.amd64.AMD64HotSpotMoveFactory @ 0x30896b118 | 16 | 40
      |- registerAttributes jdk.vm.ci.code.RegisterAttributes[57] @ 0x30a389ed0 | 248 | 248
      |- blockData org.graalvm.compiler.core.common.cfg.BlockMap @ 0x30a4153f0 | 16 | 929,748,544
      | |- <class> class org.graalvm.compiler.core.common.cfg.BlockMap @ 0x302a4c700 | 0 | 0
      | |- data java.lang.Object[48215] @ 0x30a415400 | 192,880 | 929,748,528
      | | |- <class> class java.lang.Object[] @ 0x3028396d8 | 0 | 0
      | | |- [33288] org.graalvm.compiler.lir.alloc.lsra.LinearScan$BlockData @ 0x306915bd8 | 32 | 24,992
      | | |- [33287] org.graalvm.compiler.lir.alloc.lsra.LinearScan$BlockData @ 0x306915bf8 | 32 | 24,992
      | | |- [33286] org.graalvm.compiler.lir.alloc.lsra.LinearScan$BlockData @ 0x306915c18 | 32 | 24,992
      | | |- [33285] org.graalvm.compiler.lir.alloc.lsra.LinearScan$BlockData @ 0x306915c38 | 32 | 24,992
      | | |- [33284] org.graalvm.compiler.lir.alloc.lsra.LinearScan$BlockData @ 0x306915c58 | 32 | 24,992
      | | |- [33283] org.graalvm.compiler.lir.alloc.lsra.LinearScan$BlockData @ 0x306915c78 | 32 | 24,992
      | | |- [33282] org.graalvm.compiler.lir.alloc.lsra.LinearScan$BlockData @ 0x306915c98 | 32 | 24,992
      | | |- [33281] org.graalvm.compiler.lir.alloc.lsra.LinearScan$BlockData @ 0x306915cb8 | 32 | 24,992
      | | |- [33280] org.graalvm.compiler.lir.alloc.lsra.LinearScan$BlockData @ 0x306915cd8 | 32 | 24,992
      --------------------------------------------------------------------------------------------------------------------------

      As you can see blockData consists of 48215 elements which occupy most of the heap.

        Attachments

          Activity

            People

            • Assignee:
              epavlova Ekaterina Pavlova
              Reporter:
              epavlova Ekaterina Pavlova
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: