Proc.executor inherits ContextClassLoader dynamically

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • Component/s: core
    • Jenkins 2.181

      The threads in the thread pool used for Proc.joinWithTimeout inherit their context class loader from the thread that calls Proc.joinWithTimeout, which seems undesirable. While looking into JENKINS-50223, I found a case where one of the threads in the thread pool was holding onto a CleanGroovyClassLoader class loader from workflow-cps (see the attached screenshot), which is definitely undesirable.

      We should wrap this thread pool in ClassLoaderSanityThreadFactory to prevent this kind of issue from happening.

            Assignee:
            Devin Nusbaum
            Reporter:
            Devin Nusbaum
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: