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

dead lock while removing computer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      jenkins v1.634
    • Similar Issues:

      Description

      "Handling POST /configSubmit from 10.160.255.74 : RequestHandlerThread[#17137]":
        waiting for ownable synchronizer 0x00007f3a5d901708, (a java.util.concurrent.locks.ReentrantLock$NonfairSync),
        which is held by "Computer.threadPoolForRemoting [#31767]"
      "Computer.threadPoolForRemoting [#31767]":
        waiting to lock monitor 0x00007f38ce077bc8 (object 0x00007f3a7c8a10c8, a hudson.plugins.ec2.EC2Computer),
        which is held by "Handling POST /configSubmit from 10.160.255.74 : RequestHandlerThread[#17137]"
      
      "Handling POST /configSubmit from 10.160.255.74 : RequestHandlerThread[#17137]":
              at sun.misc.Unsafe.park(Native Method)
              - parking to wait for  <0x00007f3a5d901708> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
              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.acquireQueued(AbstractQueuedSynchronizer.java:870)
              at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
              at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
              at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
              at hudson.model.Queue._withLock(Queue.java:1291)
              at hudson.model.Queue.withLock(Queue.java:1176)
              at hudson.model.Computer.setNumExecutors(Computer.java:837)
              - locked <0x00007f3a7c8a10c8> (a hudson.plugins.ec2.EC2Computer)
              at hudson.model.Computer.kill(Computer.java:792)
              at hudson.slaves.SlaveComputer.kill(SlaveComputer.java:665)
              at hudson.model.AbstractCIBase.killComputer(AbstractCIBase.java:86)
              at hudson.model.AbstractCIBase.updateComputerList(AbstractCIBase.java:205)
              at jenkins.model.Jenkins.updateComputerList(Jenkins.java:1249)
              at jenkins.model.Jenkins.doConfigSubmit(Jenkins.java:2924)
              - locked <0x00007f3a5c073f20> (a hudson.model.Hudson)
      
      "Computer.threadPoolForRemoting [#31767]":
              at hudson.model.Computer.setNumExecutors(Computer.java:830)
              - waiting to lock <0x00007f3a7c8a10c8> (a hudson.plugins.ec2.EC2Computer)
              at hudson.model.Computer.inflictMortalWound(Computer.java:809)
              at hudson.model.AbstractCIBase$2.run(AbstractCIBase.java:199)
              at hudson.model.Queue._withLock(Queue.java:1293)
              at hudson.model.Queue.withLock(Queue.java:1176)
              at hudson.model.AbstractCIBase.updateComputerList(AbstractCIBase.java:169)
              at jenkins.model.Jenkins.updateComputerList(Jenkins.java:1249)
              at jenkins.model.Nodes$2.run(Nodes.java:136)
              at hudson.model.Queue._withLock(Queue.java:1293)
              at hudson.model.Queue.withLock(Queue.java:1176)
              at jenkins.model.Nodes.addNode(Nodes.java:132)
              at jenkins.model.Jenkins.addNode(Jenkins.java:1744)
      

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Ted
          Path:
          core/src/main/java/hudson/model/Computer.java
          http://jenkins-ci.org/commit/jenkins/c7fd90a8796fe0ad80bfe37a9837af4515fbf5cb
          Log:
          fix JENKINS-31768 dead lock while removing computer

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ted Path: core/src/main/java/hudson/model/Computer.java http://jenkins-ci.org/commit/jenkins/c7fd90a8796fe0ad80bfe37a9837af4515fbf5cb Log: fix JENKINS-31768 dead lock while removing computer
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          core/src/main/java/hudson/model/Computer.java
          http://jenkins-ci.org/commit/jenkins/430736ad619c52bde438c63f5c81e50fedd63fdb
          Log:
          Merge pull request #1933 from fengxx/feature/removecomputer

          [FIXED JENKINS-31768] - Remove monitor lock from setNumberExecutors to avoid deadlock

          Compare: https://github.com/jenkinsci/jenkins/compare/2311ae8a5e7a...430736ad619c

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/hudson/model/Computer.java http://jenkins-ci.org/commit/jenkins/430736ad619c52bde438c63f5c81e50fedd63fdb Log: Merge pull request #1933 from fengxx/feature/removecomputer [FIXED JENKINS-31768] - Remove monitor lock from setNumberExecutors to avoid deadlock Compare: https://github.com/jenkinsci/jenkins/compare/2311ae8a5e7a...430736ad619c
          Hide
          oleg_nenashev Oleg Nenashev added a comment - - edited

          The fix is integrated towards 2.27. Marking it as lts-candidate

          Show
          oleg_nenashev Oleg Nenashev added a comment - - edited The fix is integrated towards 2.27. Marking it as lts-candidate
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Ted
          Path:
          core/src/main/java/hudson/model/Computer.java
          http://jenkins-ci.org/commit/jenkins/1875144a072b9a4e388a7e49492bd24b95574b27
          Log:
          fix JENKINS-31768 dead lock while removing computer

          (cherry picked from commit c7fd90a8796fe0ad80bfe37a9837af4515fbf5cb)

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ted Path: core/src/main/java/hudson/model/Computer.java http://jenkins-ci.org/commit/jenkins/1875144a072b9a4e388a7e49492bd24b95574b27 Log: fix JENKINS-31768 dead lock while removing computer (cherry picked from commit c7fd90a8796fe0ad80bfe37a9837af4515fbf5cb)

            People

            • Assignee:
              Unassigned
              Reporter:
              fengxx Ted
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: