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

native memory leak when use ThreadInfo.getThreadName()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 6
    • core-svc

      FULL PRODUCT VERSION :
      Java HotSpot(TM) Server VM (1.6.0-beta2-b79) for windows-x86, built on Apr 6 2006 00:23:36 by "java_re" with unknown MS VC++:1310

      ADDITIONAL OS VERSION INFORMATION :
      Windows XP Build 2600 Service Pack 2

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Memory: 4k page, physical 2088300k(44748k free), swap 4019972k(1951532k free)


      A DESCRIPTION OF THE PROBLEM :
      The private bytes memory processus grow, when i use ThreadInfo.getThreadName()


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      #
      # An unexpected error has been detected by Java Runtime Environment:
      #
      # java.lang.OutOfMemoryError: requested 88 bytes for CHeapObj-new. Out of swap space?
      #
      # Internal Error (414C4C4F434154494F4E0E494E4C494E450E4850500017), pid=3764, tid=3996
      #
      # Java VM: Java HotSpot(TM) Client VM (1.6.0-beta2-b79 mixed mode, sharing)
      # An error report file with more information is saved as hs_err_pid3764.log
      #
      # If you would like to submit a bug report, please visit:
      # http://java.sun.com/webapps/bugreport/crash.jsp
      #


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.lang.management.ManagementFactory;
      import java.lang.management.ThreadMXBean;

      public class Main
      {

          public static void main(String[] args)
          {
              ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
              while (true)
              {
                  for (Long id : threadMXBean.getAllThreadIds())
                  {
                      threadMXBean.getThreadInfo(id).getThreadName();
                  }
              }
          }
      }
      ---------- END SOURCE ----------

            mchung Mandy Chung (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: