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

A deadlock seems to appear when trying to save configuration changes

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • None
    • Linux - openSUSE 11.2 i586

      When clicking the save button after making some changes to any job's configuration it just sits there indefinitely.

          [JENKINS-6269] A deadlock seems to appear when trying to save configuration changes

          Alan Harder added a comment -

          The problem is that the POST locks transientActions first and then locks the project itself.. the GET locks the project first, then transientActions. If GET and POST occur at the same time, they might each lock the first one, then deadlock trying to get the other.

          Adding synchronized on Project.updateTransientActions so the POST locks in the same order as GET. Hopefully this avoids deadlock, as only one will get that lock first and transientActions should then be available, so one request can complete and release both.

          (reopen issue you still see a problem in 1.356 or later, thx)

          Alan Harder added a comment - The problem is that the POST locks transientActions first and then locks the project itself.. the GET locks the project first, then transientActions . If GET and POST occur at the same time, they might each lock the first one, then deadlock trying to get the other. Adding synchronized on Project.updateTransientActions so the POST locks in the same order as GET. Hopefully this avoids deadlock, as only one will get that lock first and transientActions should then be available, so one request can complete and release both. (reopen issue you still see a problem in 1.356 or later, thx)

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/Project.java
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/30087
          Log:
          [FIXED JENKINS-6269] Add synchronized on Project.updateTransient actions to avoid
          deadlock between saving project config and getting project page.. save locked
          transientActions and then project itself; get locks project, then transientActions.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/Project.java trunk/www/changelog.html http://jenkins-ci.org/commit/30087 Log: [FIXED JENKINS-6269] Add synchronized on Project.updateTransient actions to avoid deadlock between saving project config and getting project page.. save locked transientActions and then project itself; get locks project, then transientActions.

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/Project.java
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/30087
          Log:
          [FIXED JENKINS-6269] Add synchronized on Project.updateTransient actions to avoid
          deadlock between saving project config and getting project page.. save locked
          transientActions and then project itself; get locks project, then transientActions.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/Project.java trunk/www/changelog.html http://jenkins-ci.org/commit/30087 Log: [FIXED JENKINS-6269] Add synchronized on Project.updateTransient actions to avoid deadlock between saving project config and getting project page.. save locked transientActions and then project itself; get locks project, then transientActions.

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/Project.java
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/30087
          Log:
          [FIXED JENKINS-6269] Add synchronized on Project.updateTransient actions to avoid
          deadlock between saving project config and getting project page.. save locked
          transientActions and then project itself; get locks project, then transientActions.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/Project.java trunk/www/changelog.html http://jenkins-ci.org/commit/30087 Log: [FIXED JENKINS-6269] Add synchronized on Project.updateTransient actions to avoid deadlock between saving project config and getting project page.. save locked transientActions and then project itself; get locks project, then transientActions.

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/Project.java
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/30087
          Log:
          [FIXED JENKINS-6269] Add synchronized on Project.updateTransient actions to avoid
          deadlock between saving project config and getting project page.. save locked
          transientActions and then project itself; get locks project, then transientActions.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/Project.java trunk/www/changelog.html http://jenkins-ci.org/commit/30087 Log: [FIXED JENKINS-6269] Add synchronized on Project.updateTransient actions to avoid deadlock between saving project config and getting project page.. save locked transientActions and then project itself; get locks project, then transientActions.

          Alan Harder added a comment -

          hey, I just hit this in my group's 1.343 install.. glad I fixed it already!

          Alan Harder added a comment - hey, I just hit this in my group's 1.343 install.. glad I fixed it already!

            mindless Alan Harder
            decriptor decriptor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: