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

Deadlock between JobPropertyImpl and PromotionProcess

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      A user of promoted-builds together with the CloudBees "template" feature, which integrates with promotions, encountered a deadlock blocking RunListener.fireCompleted from proceeding:

      "reconfigure children of <SOMEFOLDER>"
          at hudson.model.Job.onLoad(Job.java:205) // usually synchronizes on this; trying to lock PromotionProcess
          at hudson.model.AbstractProject.onLoad(AbstractProject.java:320)
          at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:122)
          at hudson.plugins.promoted_builds.JobPropertyImpl.setOwner(JobPropertyImpl.java:223) // synchronized; locked JobPropertyImpl
          at ...
      "reconfigure children of <SOMEFOLDER>/<SOMEJOB>"
          at hudson.plugins.promoted_builds.JobPropertyImpl.getOwner(JobPropertyImpl.java:328) // synchronized; trying to lock JobPropertyImpl
          at hudson.plugins.promoted_builds.JobPropertyImpl.getRootDir(JobPropertyImpl.java:349)
          at hudson.plugins.promoted_builds.JobPropertyImpl.getRootDirFor(JobPropertyImpl.java:386)
          at hudson.plugins.promoted_builds.JobPropertyImpl.getRootDirFor(JobPropertyImpl.java:382)
          at hudson.plugins.promoted_builds.JobPropertyImpl.getRootDirFor(JobPropertyImpl.java:54)
          at hudson.model.AbstractItem.getRootDir(AbstractItem.java:179)
          at hudson.model.Items.getConfigFile(Items.java:348)
          at hudson.model.AbstractItem.getConfigFile(AbstractItem.java:525)
          at hudson.model.AbstractItem.save(AbstractItem.java:521)
          at hudson.model.Job.save(Job.java:180)
          at hudson.model.AbstractProject.save(AbstractProject.java:305) // synchronized; locked PromotionProcess
          at ...
      

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Easiest fix would perhaps be to remove synchronization from getOwner. It does not seem necessary.

            Show
            jglick Jesse Glick added a comment - Easiest fix would perhaps be to remove synchronization from getOwner . It does not seem necessary.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Steven Christou
            Path:
            src/main/java/hudson/plugins/promoted_builds/JobPropertyImpl.java
            http://jenkins-ci.org/commit/promoted-builds-plugin/f14b0d30477da57127eb4b41ba0efb5bf6b9ade8
            Log:
            JENKINS-40552 Remove unnecessary synchronization from method. (#100)

            • Reduce the synchronized scope to not include owner.
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Steven Christou Path: src/main/java/hudson/plugins/promoted_builds/JobPropertyImpl.java http://jenkins-ci.org/commit/promoted-builds-plugin/f14b0d30477da57127eb4b41ba0efb5bf6b9ade8 Log: JENKINS-40552 Remove unnecessary synchronization from method. (#100) JENKINS-40552 Remove unnecessary synchronization from method. Reduce the synchronized scope to not include owner.
            Hide
            jglick Jesse Glick added a comment -

            Merged towards 2.29.

            Show
            jglick Jesse Glick added a comment - Merged towards 2.29.

              People

              • Assignee:
                schristou Steven Christou
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: