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

Memory leak in JvmtiEnv::GetConstantPool

    XMLWordPrintable

Details

    • b49
    • x86
    • linux

    Backports

      Description

        FULL PRODUCT VERSION :
        java version "1.7.0_07"
        Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
        Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)


        FULL OS VERSION :
        Linux 2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 19:52:42 UTC 2010 x86_64 GNU/Linux

        A DESCRIPTION OF THE PROBLEM :
        A lot of calls to Jvmti::GetConstantPool result in a high memory consumption.
        This is caused by the JvmtiConstantPoolReconstituter, which instantiates two SymbolHashMap in it's constructor and in it's destructor os::free is used instead of delete.
        The memory leak occurs in the native heap.


        THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Yes

        THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Use a jvmti agent implementation calling Jvmti::GetConstantPool of some class (e.g. java.lang.String) in a loop.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        exptected: heap usage of the jvm remaining constant
        actual result: heap usage of the jvm growing very fast
        REPRODUCIBILITY :
        This bug can be reproduced always.

        CUSTOMER SUBMITTED WORKAROUND :
        no workaround

        Attachments

          Issue Links

            Activity

              People

                kevinw Kevin Walls
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: