Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5730

DataDictionaryImpl leaks references to itself via SYSFUN_AD

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.9.1.0
    • 10.8.3.3, 10.9.1.0
    • Services
    • None
    • Crash

    Description

      DataDictionaryImpl contains a static field called SYSFUN_AD, which holds an array of AliasDescriptor objects for the functions in the SYSFUN schema. This array is lazily populated as the functions are called, and it is shared between all DataDictionaryImpl instances on the system.

      The AliasDescriptors contain references to the DataDictionaryImpl that created them, so SYSFUN_AD may end up referencing indirectly to a number of different DataDictionaryImpl instances, depending on where the respective SYSFUN functions are called the first time. Once an AliasDescriptor has been added to SYSFUN_AD, it stays there until the DataDictionaryImpl class is unloaded (in most cases, until the JVM terminates). This means the array may hold references to DataDictionaryImpl instances that belong to database instances that have been shut down, and that the memory held by those database instances never becomes eligible for garbage collection.

      Attachments

        1. SysfunPerftest.java
          0.9 kB
          Knut Anders Hatlen
        2. Sysfun.java
          4 kB
          Knut Anders Hatlen
        3. DERBY5730_backport_patch1_diff.txt
          2 kB
          Mamta A. Satoor
        4. d5730-1a.diff
          9 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              knutanders Knut Anders Hatlen
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: