Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: pipeline
    • Labels:
    • Environment:
      Pipeline 1.11 on 1.625.3
    • Similar Issues:

      Description

      One CPS VM thread was hung in a remoting call:

      "Computer.threadPoolForRemoting [#...] / waiting for hudson.remoting.Channel@..."
         java.lang.Thread.State: TIMED_WAITING
      	at java.lang.Object.wait(Native Method)
      	- waiting on <...> (a hudson.remoting.UserRequest)
      	at hudson.remoting.Request.call(Request.java:147)
      	at hudson.remoting.Channel.call(Channel.java:780)
      	at hudson.Launcher$RemoteLauncher.kill(Launcher.java:954)
      	at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask.finish(ExecutorStepExecution.java:345)
      	- locked <...> (a java.util.HashMap)
      	at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask.access$400(ExecutorStepExecution.java:145)
      	at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask$Callback.finished(ExecutorStepExecution.java:374)
      	at org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$TailCall.onFailure(BodyExecutionCallback.java:123)
      	at ...
      

      That held the lock on runningTasks, causing another thread to block:

      "Handling POST /.../stop from ..."
         java.lang.Thread.State: BLOCKED
      	at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask.finish(ExecutorStepExecution.java:337)
      	- waiting to lock <...> (a java.util.HashMap) owned by "Computer.threadPoolForRemoting..."
      	at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask.access$400(ExecutorStepExecution.java:145)
      	at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution.stop(ExecutorStepExecution.java:122)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$6.onSuccess(CpsFlowExecution.java:703)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$6.onSuccess(CpsFlowExecution.java:698)
      	at org.jenkinsci.plugins.workflow.support.concurrent.Futures$1.run(Futures.java:150)
      	at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
      	at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149)
      	at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:105)
      	at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:155)
      	at org.jenkinsci.plugins.workflow.support.concurrent.Futures.addCallback(Futures.java:160)
      	at org.jenkinsci.plugins.workflow.support.concurrent.Futures.addCallback(Futures.java:90)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.interrupt(CpsFlowExecution.java:698)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun$2.interrupt(WorkflowRun.java:226)
      	at hudson.model.Executor.interrupt(Executor.java:225)
      	at hudson.model.Executor.interrupt(Executor.java:195)
      	at hudson.model.Executor.interrupt(Executor.java:185)
      	at hudson.model.Executor.interrupt(Executor.java:171)
      	at hudson.model.Executor.doStop(Executor.java:853)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.doStop(WorkflowRun.java:603)
      	- locked <...> (a org.jenkinsci.plugins.workflow.job.WorkflowRun)
      	at ...
      

      which in turn caused many other threads to hang:

      "Handling GET /jenkins/ from ... View/index.jelly View/sidepanel.jelly"
         java.lang.Thread.State: WAITING
      	at sun.misc.Unsafe.park(Native Method)
      	- waiting to lock <...> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync) owned by "Handling POST ..."
      	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:967)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1283)
      	at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(ReentrantReadWriteLock.java:727)
      	at hudson.model.Executor.getAsynchronousExecution(Executor.java:615)
      	at hudson.model.Executor.isDisplayCell(Executor.java:635)
      	at hudson.model.Computer.getDisplayExecutors(Computer.java:937)
      	at ...
      

        Attachments

          Issue Links

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: