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

Memory leak: java consume RAM, but does not free it

XMLWordPrintable

    • gc
    • x86_64
    • windows_10

      ADDITIONAL SYSTEM INFORMATION :
      Windows 10 Education Version 1803 Build 17134.706 (64-bit)

      I'm using the latest version of JDK:
      java version "1.8.0_212"
      Java(TM) SE Runtime Environment (build 1.8.0_212-b10)
      Java HotSpot(TM) 64-Bit Server VM (build 25.212-b10, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      Every time, i try to compile something RAM is locked by java, but when the java process terminates, the memory is no longer freed and the process canceled for large projects.

      -> I still have enough free RAM when the error occurs and java gets 3GB of heap space.

      I don't know how best to debug that and what data to analyze. Please let me know which data is required and how to obtain it.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Java should be able to compile and execute the project without errors
      ACTUAL -
      #
      # There is insufficient memory for the Java Runtime Environment to continue.
      # Native memory allocation (mmap) failed to map 186646528 bytes for Failed to commit area from 0x0000000788600000 to 0x0000000793800000 of length 186646528.
      # Possible reasons:
      # The system is out of physical RAM or swap space
      # The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
      # Possible solutions:
      # Reduce memory load on the system
      # Increase physical memory or swap space
      # Check if swap backing store is full
      # Decrease Java heap size (-Xmx/-Xms)
      # Decrease number of Java threads
      # Decrease Java thread stack sizes (-Xss)
      # Set larger code cache with -XX:ReservedCodeCacheSize=
      # JVM is running with Zero Based Compressed Oops mode in which the Java heap is
      # placed in the first 32GB address space. The Java Heap base address is the
      # maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
      # to set the Java Heap base and to place the Java Heap above 32GB virtual address.
      # This output file may be truncated or incomplete.
      #
      # Out of Memory Error (os_windows.cpp:3371), pid=11012, tid=0x0000000000003468
      #
      # JRE version: Java(TM) SE Runtime Environment (8.0_212-b10) (build 1.8.0_212-b10)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.212-b10 mixed mode windows-amd64 compressed oops)
      # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
      #

      --------------- T H R E A D ---------------

      Current thread (0x000000001d056000): VMThread [stack: 0x000000001dc90000,0x000000001dd90000] [id=13416]

      Stack: [0x000000001dc90000,0x000000001dd90000]
      [error occurred during error reporting (printing stack bounds), id 0xc0000005]

      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)

      VM_Operation (0x00000000408bc9a0): G1IncCollectionPause, mode: safepoint, requested by thread 0x0000000021c40800


      CUSTOMER SUBMITTED WORKAROUND :
      no workaround found - the eclipse-compiler also will run into trouble (I tested it!)

      FREQUENCY : always


            fmatte Fairoz Matte
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: