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

Memory leak in NetworkInterface methods ex. isUP(), isLoopback()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 6u51, 7, 8
    • core-libs
    • None
    • b105
    • linux

        FULL PRODUCT VERSION :
        java version " 1.7.0 "
        Java(TM) SE Runtime Environment (build 1.7.0-b147)
        Java HotSpot(TM) Server VM (build 21.0-b17, mixed mode)


        ADDITIONAL OS VERSION INFORMATION :
        Linux ubuntu 2.6.38-10-generic,
        ARM linux kernel 2.6

        A DESCRIPTION OF THE PROBLEM :
        Running some methods on NetworkInterface object causes memory leaks. This methods are at least isUp() and isLoopback(). I've observed it in both standard and embeded JRE. I've checked it also in OpenJDK, but no memory leaks were found there. I guess the problem is somewhere in libnet.so.


        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        ArrayList<NetworkInterface> tmpInterfaces = Collections.list(NetworkInterface.getNetworkInterfaces());
        for (NetworkInterface iface : tmpInterfaces) {
               iface.isLoopback();
               iface.isUp();
        }

        //memory leak is easy to observe if you run this in a loop
        ---------- END SOURCE ----------

              igerasim Ivan Gerasimov
              webbuggrp Webbug Group
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: