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

[macosx] huge native memory leak in AWTWindow.m

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 7u66
    • client-libs
    • x86
    • os_x

      There is a huge native memory leak in awt code on Mac OS X. This is regression introduced in JDK 7u66 and it looks identical to JDK-8041572. The leak can be easily reproduced using SwingSet2 with the following steps:
      1) Run SwingSet2 demo on JDK 7u66
      2) move mouse over the SwingSet2 window - for example make circles over the window

      The leak can be seen Activity Monitor and in details in vmmap output. The following output is captured, while moving mouse over SwingSet2 window.
      thurka$ jdk1.7.0_66.jdk/Contents/Home/bin/java -version
      java version "1.7.0_66"
      Java(TM) SE Runtime Environment (build 1.7.0_66-b17)
      Java HotSpot(TM) 64-Bit Server VM (build 24.66-b02, mixed mode)
      thurka$ jdk1.7.0_66.jdk/Contents/Home/bin/java -jar /Library/Java/Demos/JFC/SwingSet2/SwingSet2.jar &
      [1] 51865
      thurka$ date; vmmap 51865 | grep ^DefaultMallocZone
      Fri Oct 24 13:01:17 CEST 2014
      DefaultMallocZone_0x102308000 47.8M 70498 31.6M 65%
      thurka$ date; vmmap 51865 | grep ^DefaultMallocZone
      Fri Oct 24 13:01:32 CEST 2014
      DefaultMallocZone_0x102308000 206.8M 3050186 186.2M 90%
      thurka$ date; vmmap 51865 | grep ^DefaultMallocZone
      Fri Oct 24 13:02:02 CEST 2014
      DefaultMallocZone_0x102308000 696.8M 12200965 660.7M 94%
      thurka$ date; vmmap 51865 | grep ^DefaultMallocZone
      Fri Oct 24 13:02:34 CEST 2014
      DefaultMallocZone_0x102308000 1.1G 20383965 1.1G 95%
      thurka$

      As you can see DefaultMallocZone of SwingSet2 application raised to 1.1G in two minutes.

            serb Sergey Bylokhov
            thurka Tomáš Hůrka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: