Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40447

PublishHTMLStepExecution.run can block CPS thread

XMLWordPrintable

      A stack trace from a Jenkins instance running this plugin contained a thread blocked like this:

      "Running CpsFlowExecution[Owner[...]]" #... daemon ... in Object.wait() [...]
         java.lang.Thread.State: TIMED_WAITING (on object monitor)
          at java.lang.Object.wait(Native Method)
          at hudson.remoting.FastPipedInputStream.read(FastPipedInputStream.java:175)
          - locked <...> (a [B)
          at hudson.util.HeadBufferingStream.read(HeadBufferingStream.java:61)
          at com.jcraft.jzlib.InflaterInputStream.fill(InflaterInputStream.java:175)
          at com.jcraft.jzlib.InflaterInputStream.read(InflaterInputStream.java:106)
          at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:614)
          at java.io.InputStream.read(InputStream.java:101)
          at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792)
          at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769)
          at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744)
          at hudson.util.IOUtils.copy(IOUtils.java:40)
          at hudson.FilePath.readFromTar(FilePath.java:2318)
          at hudson.FilePath.copyRecursiveTo(FilePath.java:2237)
          at hudson.FilePath.copyRecursiveTo(FilePath.java:2141)
          at hudson.FilePath.copyRecursiveTo(FilePath.java:2124)
          at htmlpublisher.HtmlPublisher.publishReports(HtmlPublisher.java:258)
          at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:67)
          at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:43)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution.start(AbstractSynchronousStepExecution.java:40)
          at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:184)
          at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:126)
          at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
          at ...
      

      Steps which make network calls or do I/O or otherwise might block must not run in the CPS thread.

            r2b2_nz Richard Bywater
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: