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

deadlock between OldDataMonitor and AuthorizationStrategy.

      A deadlock has been observed between The OldDataMonitor and an AuthorizationStrategy.

      When a job has a new build it will call save which will trigger the OldDataMonitor via the SaveableListener.
      This will call referTo which in the case of a Run will lookup the parent Job via it's full name. This will perform a permission check .

      Now if the authorization strategy is also being saved at the same time then it is highly likely that a deadlock will occur.

          [JENKINS-29936] deadlock between OldDataMonitor and AuthorizationStrategy.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4249
          JENKINS-29936 when removing an item use ACL.SYTEM. (Revision 8a077a801960aa74da455441cfb12d300c6d6e3a)

          Result = SUCCESS
          james nord : 8a077a801960aa74da455441cfb12d300c6d6e3a
          Files :

          • core/src/main/java/hudson/diagnosis/OldDataMonitor.java

          dogfood added a comment - Integrated in jenkins_main_trunk #4249 JENKINS-29936 when removing an item use ACL.SYTEM. (Revision 8a077a801960aa74da455441cfb12d300c6d6e3a) Result = SUCCESS james nord : 8a077a801960aa74da455441cfb12d300c6d6e3a Files : core/src/main/java/hudson/diagnosis/OldDataMonitor.java

          Code changed in jenkins
          User: James Nord
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/e0849bdaf84457246708c10e6cd8a5a10fa35725
          Log:
          Noting JENKINS-29936

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: changelog.html http://jenkins-ci.org/commit/jenkins/e0849bdaf84457246708c10e6cd8a5a10fa35725 Log: Noting JENKINS-29936

          Code changed in jenkins
          User: James Nord
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/68c1e351f8dc7f63973ff1fa0291b2907cd93f3f
          Log:
          Merge pull request #1799 from jtnord/changelog-JENKINS-29936

          Noting JENKINS-29936

          Compare: https://github.com/jenkinsci/jenkins/compare/7add0d1646b2...68c1e351f8dc

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: changelog.html http://jenkins-ci.org/commit/jenkins/68c1e351f8dc7f63973ff1fa0291b2907cd93f3f Log: Merge pull request #1799 from jtnord/changelog- JENKINS-29936 Noting JENKINS-29936 Compare: https://github.com/jenkinsci/jenkins/compare/7add0d1646b2...68c1e351f8dc

          James Nord added a comment -

          Fixed with PR 1796

          James Nord added a comment - Fixed with PR 1796

          Daniel Beck added a comment -

          Nominating for next LTS (not 1.609.3).

          Daniel Beck added a comment - Nominating for next LTS (not 1.609.3).

          Jesse Glick added a comment -

          IMO this is a serious enough bug to be considered for 1.609.3 despite the youth of the fix (CC olivergondza).

          Jesse Glick added a comment - IMO this is a serious enough bug to be considered for 1.609.3 despite the youth of the fix (CC olivergondza ).

          Daniel Beck added a comment -

          As there's still no RC, we could even still make it part of that. Discussion probably later today in the project meeting.

          Daniel Beck added a comment - As there's still no RC, we could even still make it part of that. Discussion probably later today in the project meeting.

          Daniel Beck added a comment -

          May still not be in the baseline for next LTS.

          Daniel Beck added a comment - May still not be in the baseline for next LTS.

          Code changed in jenkins
          User: James Nord
          Path:
          core/src/main/java/hudson/diagnosis/OldDataMonitor.java
          http://jenkins-ci.org/commit/jenkins/9a63d6f8cb734d99597c12263f232fc49604eeb0
          Log:
          JENKINS-29936 when removing an item use ACL.SYTEM.

          The OldDataMonitor should be using ACL.system not the ACL of the calling
          thread - this also avoids the deadlock when an authorization strategy is
          being saved (locking the auth strategy) which will call into the ODM at
          the same point the ODM is being called an a Run has been saved (which will
          cause a lookup of the job which will do a permissions check).

          (cherry picked from commit 8a077a801960aa74da455441cfb12d300c6d6e3a)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: core/src/main/java/hudson/diagnosis/OldDataMonitor.java http://jenkins-ci.org/commit/jenkins/9a63d6f8cb734d99597c12263f232fc49604eeb0 Log: JENKINS-29936 when removing an item use ACL.SYTEM. The OldDataMonitor should be using ACL.system not the ACL of the calling thread - this also avoids the deadlock when an authorization strategy is being saved (locking the auth strategy) which will call into the ODM at the same point the ODM is being called an a Run has been saved (which will cause a lookup of the job which will do a permissions check). (cherry picked from commit 8a077a801960aa74da455441cfb12d300c6d6e3a)

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4292
          JENKINS-29936 when removing an item use ACL.SYTEM. (Revision 9a63d6f8cb734d99597c12263f232fc49604eeb0)

          Result = UNSTABLE
          ogondza : 9a63d6f8cb734d99597c12263f232fc49604eeb0
          Files :

          • core/src/main/java/hudson/diagnosis/OldDataMonitor.java

          dogfood added a comment - Integrated in jenkins_main_trunk #4292 JENKINS-29936 when removing an item use ACL.SYTEM. (Revision 9a63d6f8cb734d99597c12263f232fc49604eeb0) Result = UNSTABLE ogondza : 9a63d6f8cb734d99597c12263f232fc49604eeb0 Files : core/src/main/java/hudson/diagnosis/OldDataMonitor.java

            Unassigned Unassigned
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: