Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-4814

Memory leak when unsubscribing durable consumer

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Patch Available

    Description

      When creating and closing durable subscribers, references to FilePendingMessageCursor in MemoryUsage.listeners are not cleaned up.

      The reason seems to be a missing call to FilePendingMessageCursor.destroy() in StoreDurableSubscriberCursor.stop().

      A simple demo to reproduce the issue is attached (the leak is clearly visible after a few hundred to thousand runs). Also, i have attached a patch which resolves this issue for me - could someone check if this is correct?

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tabish Timothy A. Bish
            jok jok
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment