Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-17588

Missing Clean-Up for DefaultReactiveExecutor.Worker-ThreadLocals

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Won't Do
    • 3.14.1
    • 3.17.0
    • camel-core
    • None
    • Unknown

    Description

      We are running a Camel-Application on a Tomcat. While the Tomcat-Shutdown we observed a bunch of Thread-Local-WARNINGS in the catalina.out like:

      02-Feb-2022 01:31:23.810 SCHWERWIEGEND [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [provinzial-integration-intern] created a ThreadLocal with key of type [java.lang.ThreadLocal.SuppliedThreadLocal] (value [java.lang.ThreadLocal$SuppliedThreadLocal@4a4357f5]) and a value of type [org.apache.camel.impl.engine.DefaultReactiveExecutor.Worker] (value [org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker@76e66f23]) 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.

      Obviously this belongs to the ThreadLocals used in org.apache.camel.impl.engine.DefaultReactiveExecutor.

      In the worst case, this can lead to memory problems. 
      The ThreadLocals should be cleaned up.

      Attachments

        1. catalina.out
          79 kB
          Björn Ohm
        2. workers-threadLocals.PNG
          280 kB
          Björn Ohm
        3. plain-camel.zip
          10 kB
          Björn Ohm

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Ohm Björn Ohm
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: