Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-1506

tomcat shutdown - threads in PARK state

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.13.0
    • Fix Version/s: 2.0.0-M1
    • Component/s: Core
    • Labels:
      None

      Description

      Hi Dan,

      Today I monitored threads created within our application while running on tomcat 8.5.3x64 because of an issue in my code.

      While doing that I noticed that there were two threads called Thread-7 and Thread-8 (name was stable during a lot of starts but only on the first start) that I wasn't able to find in my code so I debugged a bit deeper and found that they were created in org.apache.isis.core.runtime.threadpool.ThreadPoolSupport:76 during start-up.

      After that they are going to state PARK and reside even when undeploying the application from tomcat.

      I haven't looked much at your code but I believe you should call shutdown on the ThreadPoolExecutor that you are using once you are finished or in PreDestroy situation. At least I had a very similar issue in my application and shutdown() solved it.

      Please find attached a screenshot of IntelliJ view during debug, the screenshot of VisualVM and the catalina log from tomcat complaining about these two threads.

        Attachments

        1. Java VisualVM.PNG
          76 kB
          Timothy Simecsek
        2. IntelliJ Debug.PNG
          46 kB
          Timothy Simecsek
        3. catalina.log
          3 kB
          Timothy Simecsek

          Issue Links

            Activity

              People

              • Assignee:
                hobrom Andi Huber
                Reporter:
                Timothy Timothy Simecsek
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: