When shutting down Crowd with the stop-crowd.sh script Crowd doesn't shut down as expected.

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Issue Summary

      When shutting down Crowd 5.0.2 with the stop-crowd.sh script Crowd doesn't shut down. There are some leftover threads, most of them related to AtlassianEvent::pool.

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Deploy a Crowd instance with version 5.0.2
      2. Check the service is up and running
      3. Stop the application by using stop-crowd.sh

      Expected Results

      The crowd is shut down gracefully.

      Actual Results

      The below exception is thrown in the catalina.out file:

      2022-10-19 08:35:30,225 localhost-startStop-2 INFO [com.atlassian.crowd.startup] Stopping Crowd
      .....
      19-Oct-2022 08:35:30.258 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [crowd] appears to have started a thread named [AtlassianEvent::pool-2-thread-16] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
       java.base@11.0.16.1/jdk.internal.misc.Unsafe.park(Native Method)
       19-Oct-2022 08:35:30.259 SEVERE [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [crowd] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@758d2364]) and a value of type [org.springframework.security.core.context.SecurityContextImpl] (value [SecurityContextImpl [Null authentication]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
      

      Workaround

      Adding a -force header helps to shut down the Crowd. But there is no way to gracefully shut it down.

      stop-crowd.sh -force
      

            Assignee:
            Unassigned
            Reporter:
            Cihan (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: