Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1834

ProbeHandler memory leak when enable_diagnostics=false

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.4.4, 3.5
    • 3.2.12
    • None

      There is a memory leak in TP#preregistered_probe_handlers when enable_diagnostics is false.

      TP#registerProbeHandler stores ProbeHandlers in the preregistered_probe_handlers list if diag_handler is null (either because TP has not been started, or enable_diagnostics is false).

      When TP is started, if enable_diagnostics is true it copies them to the diag_handler and clears out preregistered_probe_handlers.
      But if enable_diagnostics is false, preregistered_probe_handlers will never get cleared.

      This prevents anything that registered a probe handler from being GC'd. For example with a shared JGroups transport like EAP uses, this can cause an Infinispan CacheManager that has been stopped to never get GC'd.
      (This issue was noticed because of a buildup of DefaultCacheManager instances in a heap dump after an application had been redeployed a few times).

            rhn-engineering-bban Bela Ban
            rhn-support-dereed Dennis Reed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: