Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-7082

[Java Broker] Created AccessControllerContext for SystemTasks should not reference current context

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • qpid-java-6.0, qpid-java-6.0.1
    • qpid-java-6.1
    • Broker-J
    • None

    Description

      The code within

      SecurityManager.getSystemTaskControllerContext(String taskName, Principal principal)

      creates a context which inherits from the current thread AcessControllerContext. This current context may contain references to the current user / connection / session. On queue creation an instance of AcessControllerContext created with }SecurityManager.getSystemTaskControllerContext is referenced from Queue#_immediateDeliveryContext. If queue is created via messaging layer, the existing AccessControlContext can hold references to ConnectionPrincipal and SessionPrincipal and their connection and session object accordingly. As result, Queue#_immediateDeliveryContext can refer ConnectionPrincipal and SessionPrincipa preventing garbage collection of corresponding AMQPConnection and AMQSessionModel objects for the duration of the queue life. With lots of long lived queues that were created by lots of different connections the broker memory consumption might grow in time and eventially Broker can run OOM if not bounced.

      The AccessContollerContext created by the method should not inherit and context, and thus no references to users/connection/sessions etc. will be retained.

      Attachments

        Activity

          People

            kwall Keith Wall
            orudyy Alex Rudyy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: