Crowd doesn't cleanup created MultiThreadedHttpConnectionManager instances

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Medium
    • 2.9.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Severity 1 - Critical

      In JIRA we've noticed that crowd component that we use doesn't shutdown MultiThreadedHttpConnectionManager. This causes threads to hang after those components were disposed. In fact, crowd even introduce ShutdownIgnoringMultiThreadedHttpConnectionManager .

      All instances of MultiThreadedHttpConnectionManager should be properly cleaned up and all ShutdownIgnoringMultiThreadedHttpConnectionManager usages should be replaced with MultiThreadedHttpConnectionManager (with proper cleanup).

      Relying on MultiThreadedHttpConnectionManager#shutdownAll is really bad idea (and this method should not be used ever, as this causes deadlocks).

      Problematic instances found by thread analysis in JIRA:

      In the com.atlassian.crowd.manager.webhook.WebhookPinger.WebhookPinger()

      public WebhookPinger()
      {
          this(new HttpClient(new MultiThreadedHttpConnectionManager()));
      }
      

      In the com.atlassian.crowd.integration.rest.service.RestExecutor:

      private final ShutdownIgnoringMultiThreadedHttpConnectionManager connectionManager = new ShutdownIgnoringMultiThreadedHttpConnectionManager();
      

            Assignee:
            Unassigned
            Reporter:
            Aleksander Mierzwicki ☁
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: