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

Deadlock when renaming and updating item in the same view

XMLWordPrintable

      "Handling POST /jenkins/view/proces/job/MY_JOB/doRename : …" … waiting for monitor entry […]
         java.lang.Thread.State: BLOCKED (on object monitor)
          at hudson.model.ListView$Listener.renameViewItem(ListView.java:421)
          - waiting to lock <…> (a com.smartcodeltd.jenkinsci.plugins.buildmonitor.BuildMonitorView)
          at hudson.model.ListView$Listener.onLocationChanged(ListView.java:404)
          at hudson.model.listeners.ItemListener.fireLocationChange(ItemListener.java:208)
          at hudson.model.AbstractItem.renameTo(AbstractItem.java:317)
          - locked <…> (a hudson.maven.MavenModuleSet)
          - locked <…> (a hudson.model.Hudson)
          at hudson.model.Job.renameTo(Job.java:617)
          at hudson.model.Job.doDoRename(Job.java:1403)
      
      "Handling POST /jenkins/view/MY_VIEW/configSubmit : …" … waiting for monitor entry […]
         java.lang.Thread.State: BLOCKED (on object monitor)
          at jenkins.model.Jenkins.save(Jenkins.java:2676)
          - waiting to lock <…> (a hudson.model.Hudson)
          at hudson.model.View.save(View.java:341)
          at hudson.util.PersistedList.onModified(PersistedList.java:173)
          at hudson.util.PersistedList.replaceBy(PersistedList.java:85)
          at hudson.util.DescribableList.rebuildHetero(DescribableList.java:203)
          at hudson.model.ListView.submit(ListView.java:348)
          at com.smartcodeltd.jenkinsci.plugins.buildmonitor.BuildMonitorView.submit(BuildMonitorView.java:99)
          at hudson.model.View.doConfigSubmit(View.java:956)
          - locked <…> (a com.smartcodeltd.jenkinsci.plugins.buildmonitor.BuildMonitorView)
      

      Probably AbstractItem.renameTo should be calling ItemListener.fireLocationChange outside the synchronized

            fbelzunc Félix Belzunce Arcos
            fbelzunc Félix Belzunce Arcos
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: