Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-771

org.infinispan.notifications.AbstractListenerImpl.listenersMap ViewChanged entries keep increasing during start/stop/start/stop cycle (AS application deploy/undeploy)

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.2.0.CR1, 4.2.0.Final
    • 4.0.0.Final, 4.1.0.Final, 4.2.0.BETA1
    • None
    • None

      org.infinispan.notifications.AbstractListenerImpl.listenersMap has a org.infinispan.notifications.cachemanagerlistener.annotation.ViewChanged that is
      always increasing number of entries (per deploy/undeploy with AS)
      [0]org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.target = org.infinispan.transaction.xa.TransactionTable$StaleTransactionCleanup
      [1]org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.target = org.infinispan.transaction.xa.TransactionTable$StaleTransactionCleanup
      [2]org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.target = org.infinispan.transaction.xa.TransactionTable$StaleTransactionCleanup
      [3]org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.target = org.infinispan.transaction.xa.TransactionTable$StaleTransactionCleanup
      [4]org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.target = org.infinispan.transaction.xa.TransactionTable$StaleTransactionCleanup
      [N]org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.target = org.infinispan.transaction.xa.TransactionTable$StaleTransactionCleanup
      keeps increasing until we run out of memory

      Looks like we miss removing these because:

      org.infinispan.notifications.AbstractListenerImpl.removeListenerInvocation

      private void removeListenerInvocation(Class<? extends Annotation> annotation, Object listener) {
      if (listener == null) return;
      List<ListenerInvocation> l = getListenerCollectionForAnnotation(annotation);
      Set<Object> markedForRemoval = new HashSet<Object>();
      for (ListenerInvocation li : l)

      { if (listener.equals(li.target)) markedForRemoval.add(li); // NEVER EQUALS }

      l.removeAll(markedForRemoval);
      }

      listener = org.jboss.web.tomcat.service.session.distributedcache.ispn.DefaultLockManagerSource@1d2d2db8

      0:li.target=org.infinispan.transaction.xa.TransactionTable$StaleTransactionCleanup@2eedd32f
      1:li.target=org.infinispan.transaction.xa.TransactionTable$StaleTransactionCleanup@18b9ae20
      2:li.target=org.infinispan.transaction.xa.TransactionTable$StaleTransactionCleanup@226d7ba7
      ... same li.target class for all entries, so they don't get removed

      class org.jboss.web.tomcat.service.session.distributedcache.ispn.DefaultLockManagerSource implements LockManagerSource

      class org.infinispan.transaction.xa.TransactionTable.StaleTransactionCleanup is a pojo with onViewChange method.

              pferraro@redhat.com Paul Ferraro
              smarlow1@redhat.com Scott Marlow
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: