JavaFX GC Roots Accumulating in Application Thread Cause OutOfMemoryError

XMLWordPrintable

    • x86_64
    • linux_redhat_6.0

      ADDITIONAL SYSTEM INFORMATION :
      RHEL 8.10, X11, openJDK: 17.0.12, openJFX: 17

      A DESCRIPTION OF THE PROBLEM :
      We are experiencing an OutOfMemoryError in a long-running JavaFX application. Analysis of the heap dump shows that the JavaFX Application Thread is responsible, with tens of millions of char[] objects being retained as GC roots accounting for 73.8% of the heap. These arrays are either empty or have a length of 1, typically containing the values '0' or '1'. While we are not yet certain what is triggering these char[] allocations, the fact that they appear as GC roots strongly suggests that they are being referenced from native memory, indicating that a native structure is allocating or holding these objects without proper cleanup. Over several days of runtime, these accumulated references eventually exhaust the heap.

      Environment details:
      • Operating System: RHEL 8
      • JavaFX Version: 17
      • Recently migrated from RHEL 6 and JavaFX 8, where this issue did not occur.
      This may be related to previously reported memory related issues, including:
      JDK-8188094
      JDK-8156051
      JDK-8163079

      Please also see the following picture captures from visualVM:
      <LINK>


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Not yet able to reproduce.


        1. Screenshot1.png
          55 kB
          Praveen Narayanaswamy
        2. Screenshot2.png
          149 kB
          Praveen Narayanaswamy

            Assignee:
            Kevin Rushforth
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: