Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-4026

Memory leak org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks is holding millions of instances of org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jboss-fuse-6.3
    • jboss-fuse-6.2
    • Karaf
    • None
    • % %
    • Hide

      run attach client (simple.tar.gz) and point it to a clean A-MQ 6.2 GA distribution.

      mvn exec:java -Dexec.mainClass=com.mysample.Client
      

      This will create 1000 A-MQ connection which get shutdown ungracefully (without connection.close() being called). On the karaf side with will generate warning log messages that get posted to eventAdmin services as Events. These events are being generated from unique thread ids with the karaf container.

      -attach debugger and review contents of "org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks#m_running_threads" . It will contain >1000 entries.

      Show
      run attach client (simple.tar.gz) and point it to a clean A-MQ 6.2 GA distribution. mvn exec:java -Dexec.mainClass=com.mysample.Client This will create 1000 A-MQ connection which get shutdown ungracefully (without connection.close() being called). On the karaf side with will generate warning log messages that get posted to eventAdmin services as Events. These events are being generated from unique thread ids with the karaf container. -attach debugger and review contents of "org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks#m_running_threads" . It will contain >1000 entries.
    • 6.3 Sprint 3 (Feb 29 - Mar 25)

      After 2 weeks A-MQ (embedded in karaf) heap contains over 14 million instances of org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter (see attached screen shot for structure of dominator tree.

      From debugging through the code, it seems that entries get added to the org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks#m_running_threads (java.util.concurrent.ConcurrentHashMap) but not removed.

      In org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks.TaskExecuter#run() the call to remove is trying to remove the "object" rather than the key. This does not remove anything from the map.

        public void run()
              {
                ...
                              this.m_running_threads.remove(this);
                 ...
                  } while ( running );
              }
      

            g_nodet Guillaume Nodet (Inactive)
            rhn-support-pfox Patrick Fox (Inactive)
            Pavel Macik Pavel Macik
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: