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

NetworkInterface.getByInetAddress() increases the process memory usage.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 6u18
    • core-libs
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      java version "1.6.0_18"
      Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
      Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]
      Service Pack 3

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      NIC: Broadcom NetXtreme Gigabit Ethernet
      NIC: corega FEther USB-TXC

      A DESCRIPTION OF THE PROBLEM :
      By using NetworkInterface.getByInetAddress(), the process memory usage increases in the process view of Windows task manager.

      When checking by jconsole, the increase is not JVM heap or non-heap.
      When checking windows userdump of the process, 64bytes memory allocations increase.
      When checking open-jdk source (openjdk-6-src-b17-14_oct_2009.tar), it seems that the allocation is '*netaddrP' in NetworkInterface_winXP.c line 440. ( I don't know if the line is executed by the above use.)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Execute the attached test case.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Memory usage does not increase.
      ACTUAL -
      Memory usage increases.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.net.InetAddress;
      import java.net.NetworkInterface;

      public class Test {

        public static void main(String[] args) {

          try {
            String host = "192.168.0.1";
            InetAddress address = InetAddress.getByName(host);
            while (true) {
              NetworkInterface.getByInetAddress(address);
            }
          } catch (Exception e) {
            e.printStackTrace();
          }
        }
      }

      ---------- END SOURCE ----------

            chegar Chris Hegarty
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: