Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 5.2.0
    • 5.3.0
    • Message Store
    • None

    Description

      When a destination is removed, all open file handles inside HashIndex will be leaked because HashIndex.clear() closes the index, deletes the backing store files, then reopens the files. There is no provision for closing the HashIndex without reopening the files. Eventually the broker runs out of file handles and hangs.

      For reference, here is the stack trace down to HashIndex.clear from the removeDestination call:

      	  at org.apache.activemq.kaha.impl.index.hash.HashIndex.clear(HashIndex.java:313)
      	  at org.apache.activemq.kaha.impl.container.MapContainerImpl.clear(MapContainerImpl.java:385)
      	  at org.apache.activemq.store.kahadaptor.KahaReferenceStore.removeAllMessages(KahaReferenceStore.java:201)
      	  at org.apache.activemq.store.kahadaptor.KahaTopicReferenceStore.removeAllMessages(KahaTopicReferenceStore.java:320)
      	  at org.apache.activemq.store.amq.AMQMessageStore.removeAllMessages(AMQMessageStore.java:503)
      	  at org.apache.activemq.broker.region.Topic.dispose(Topic.java:452)
      	  at org.apache.activemq.broker.region.AbstractRegion.dispose(AbstractRegion.java:469)
      	  at org.apache.activemq.broker.region.AbstractRegion.removeDestination(AbstractRegion.java:185)
      	  at org.apache.activemq.broker.region.RegionBroker.removeDestination(RegionBroker.java:289)
      	  at org.apache.activemq.broker.BrokerFilter.removeDestination(BrokerFilter.java:146)
      	  at org.apache.activemq.broker.BrokerFilter.removeDestination(BrokerFilter.java:146)
      	  at org.apache.activemq.advisory.AdvisoryBroker.removeDestination(AdvisoryBroker.java:173)
      	  at org.apache.activemq.broker.BrokerFilter.removeDestination(BrokerFilter.java:146)
      	  at org.apache.activemq.broker.MutableBrokerFilter.removeDestination(MutableBrokerFilter.java:153)
      	  at org.apache.activemq.broker.BrokerFilter.removeDestination(BrokerFilter.java:146)
      	  at org.apache.activemq.broker.MutableBrokerFilter.removeDestination(MutableBrokerFilter.java:153)
      ...
      

      Attachments

        1. patches
          31 kB
          Scott Stanton

        Activity

          People

            rajdavies Robert Davies
            snstanton Scott Stanton
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: