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

deadlock between OldDataMonitor and AuthorizationStrategy.

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            jglick 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 Oliver Gondža).

            Show
            jglick 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 Oliver Gondža ).
            Hide
            danielbeck 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.

            Show
            danielbeck 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.
            Hide
            danielbeck Daniel Beck added a comment -

            May still not be in the baseline for next LTS.

            Show
            danielbeck Daniel Beck added a comment - May still not be in the baseline for next LTS.
            Hide
            scm_issue_link 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)

            Show
            scm_issue_link 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)
            Hide
            dogfood 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
            Show
            dogfood 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

              People

              • Assignee:
                teilo James Nord
                Reporter:
                teilo James Nord
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: