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

Parallel Pipeline random java.lang.InterruptedException

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
    • Similar Issues:
    • Released As:
      workflow-durable-task-step 2.29

      Description

      In my pipeline job,
      sometimes it'd randomly receive the java.lang.InterruptedException below:

      java.lang.InterruptedException
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1302)
      	at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:275)
      	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:111)
      	at org.jenkinsci.plugins.workflow.cps.CpsStepContext.getThreadGroupSynchronously(CpsStepContext.java:248)
      	at org.jenkinsci.plugins.workflow.cps.CpsStepContext.getThreadSynchronously(CpsStepContext.java:237)
      	at org.jenkinsci.plugins.workflow.cps.CpsStepContext.doGet(CpsStepContext.java:294)
      	at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:61)
      	at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:251)
      	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:179)
      	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:126)
      	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
      	at org.jenkinsci.plugins.workflow.cps.CpsScript.println(CpsScript.java:207)
      	at org.jenkinsci.plugins.workflow.cps.CpsScript.print(CpsScript.java:202)
      	at sun.reflect.GeneratedMethodAccessor103253.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      ....
      ....
      

      Please refer to the file attachment for the full console log and the pipeline Jenkinsfile code.

        Attachments

        1. consoleText_ERROR.txt
          95 kB
        2. hs_err_pid239040.log
          84 kB
        3. jenkins.log
          266 kB
        4. Jenkinsfile
          7 kB
        5. Jenkinsfile.txt
          6 kB
        6. stuff.tgz
          310 kB
        7. workflow-durable-task-step.hpi
          85 kB

          Issue Links

            Activity

            Hide
            dnusbaum Devin Nusbaum added a comment -

            Andrew a did those timeouts end up helping? If so, I can roll them up into https://github.com/jenkinsci/workflow-durable-task-step-plugin/pull/90 and release that so they can be configured without needing to run custom code.

            Show
            dnusbaum Devin Nusbaum added a comment - Andrew a did those timeouts end up helping? If so, I can roll them up into https://github.com/jenkinsci/workflow-durable-task-step-plugin/pull/90  and release that so they can be configured without needing to run custom code.
            Hide
            ncrmnt Andrew a added a comment -

            Devin Nusbaum Sorry for not reporting earlier. 60 seconds seem to have fixed all issues for me. The rest of the problems were due to ctest (and our numa scheduler wrapped within it before the actual simulator) not correctly dying when jenkins asked them to do so.

            Show
            ncrmnt Andrew a added a comment - Devin Nusbaum Sorry for not reporting earlier. 60 seconds seem to have fixed all issues for me. The rest of the problems were due to ctest (and our numa scheduler wrapped within it before the actual simulator) not correctly dying when jenkins asked them to do so.
            Hide
            dnusbaum Devin Nusbaum added a comment -

            Andrew a No problem! I will move forward with my PR (adding an additional timeout), thanks so much for interactively debugging the issue!

            Show
            dnusbaum Devin Nusbaum added a comment - Andrew a No problem! I will move forward with my PR (adding an additional timeout), thanks so much for interactively debugging the issue!
            Hide
            dnusbaum Devin Nusbaum added a comment -

            As of version 2.29 of the Pipeline Nodes and Process Plugin, the default timeout for remote calls is 20 seconds, and the value can be configured using the system property org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep.REMOTE_TIMEOUT.

            I am marking this ticket as closed since that is the main cause of the issue identified from discussion in the comments (thanks Andrew a!). If this issue is still occurring frequently for someone after increasing that value, please comment and we can investigate further.

            Show
            dnusbaum Devin Nusbaum added a comment - As of version 2.29 of the Pipeline Nodes and Process Plugin, the default timeout for remote calls is 20 seconds, and the value can be configured using the system property org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep.REMOTE_TIMEOUT . I am marking this ticket as closed since that is the main cause of the issue identified from discussion in the comments (thanks Andrew a !). If this issue is still occurring frequently for someone after increasing that value, please comment and we can investigate further.
            Hide
            tpoerio Tony Poerio added a comment -

            Hi Devin Nusbaum – when will this fix be released? My team needs it. (Or at least we think we do.)

             

            And I saw that this message is from about 9 months back, at time of writing.

             

            As of right now, the current release is only `2.200`, (released 10-14-2019).

             

            However, the post immediately above is referencing version `2.29`.

             

            Is it possible that this update is already present in `2.200`?

             

            If not, when will it become available in a stable release?  Many thanks for the help.

            Show
            tpoerio Tony Poerio added a comment - Hi Devin Nusbaum – when will this fix be released? My team needs it. (Or at least we think we do.)   And I saw that this message is from about 9 months back, at time of writing.   As of right now, the current release is only `2.200`, (released 10-14-2019).   However, the post immediately above is referencing version `2.29`.   Is it possible that this update is already present in `2.200`?   If not, when will it become available in a stable release?  Many thanks for the help.

              People

              • Assignee:
                dnusbaum Devin Nusbaum
                Reporter:
                totoroliu Rick Liu
              • Votes:
                19 Vote for this issue
                Watchers:
                30 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: