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

Junit Pipeline step intermittently hangs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • junit-plugin
    • Master:
      CentOS 8
      JDK 1.8 (Oracle)
      Jenkins 2.302
      Junit plugin 1.52

      Slave:
      Docker container launched using JNLP (Docker plugin 1.2.3)
      JDK 1.8 (Zulu)

      Intermittently (no clear pattern, 10-20% of the time), the junit step hangs in our pipeline (same job).  Normally, this step takes less than 2 seconds to complete.   The step is in a timeout block (10 minutes).

      I have removed all publishers from the junit parameters as per JENKINS-36956 (problem still happens): 

      timeout(10) {
         junit allowEmptyResults: true, testResults: '**/test-results/TEST-*.xml,**/test-results/**/TEST-*.xml,**/*-tests-results/TEST-*.xml,**/target/surefire-reports/TEST-*.xml,**/target/failsafe-reports/TEST-*.xml,**/target/surefire-reports/**/TEST-*.xml,**/reports/*-junit.xml',
      }
      

       

      When junit hangs, the output looks like this:

      00:35:35.944  Timeout set to expire in 10 min
      [Pipeline] {
      [Pipeline] echo
      00:35:35.946  Publishing JUnit: **/test-results/TEST-*.xml,**/test-results/**/TEST-*.xml,**/*-tests-results/TEST-*.xml,**/target/surefire-reports/TEST-*.xml,**/target/failsafe-reports/TEST-*.xml,**/target/surefire-reports/**/TEST-*.xml,**/reports/*-junit.xml
      [Pipeline] junit
      00:35:35.953  Recording test results
      00:45:35.945  Cancelling nested steps due to timeout
      00:45:36.000  null
      [Pipeline] }
      [Pipeline] // timeout
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      
      ...
      
      [Pipeline] // node
      [Pipeline] End of Pipeline
      Timeout has been exceeded
      java.lang.InterruptedException
      	at java.lang.Object.wait(Native Method)
      	at hudson.remoting.Request.call(Request.java:177)
      	at hudson.remoting.Channel.call(Channel.java:1000)
      	at hudson.FilePath.act(FilePath.java:1167)
      	at hudson.FilePath.act(FilePath.java:1156)
      	at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:107)
      	at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:153)
      	at hudson.tasks.junit.JUnitResultArchiver.parseAndSummarize(JUnitResultArchiver.java:247)
      	at hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:63)
      	at hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:29)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)

       

       

      Please let me know if there is anything else I can provide

       

            Unassigned Unassigned
            akom Alexander Komarov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: