timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-27183] Deadlock when renaming and updating item in the same view #5928

Closed timja closed 9 years ago

timja commented 9 years ago
"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


Originally reported by fbelzunc, imported from: Deadlock when renaming and updating item in the same view
  • assignee: fbelzunc
  • status: Resolved
  • priority: Minor
  • resolution: Fixed
  • resolved: 2015-03-13T11:44:43+00:00
  • imported: 2022/01/10
timja commented 9 years ago

olivergondza:

https://github.com/jenkinsci/jenkins/pull/1597

timja commented 9 years ago

scm_issue_link:

Code changed in jenkins
User: Felix Belzunce Arcos
Path:
core/src/main/java/hudson/model/AbstractItem.java
http://jenkins-ci.org/commit/jenkins/fb5540e38c935676d7f58e9d2ce7a84275bb898f
Log:
JENKINS-27183 Avoid deadlock when using build-monitor-plugin

timja commented 9 years ago

scm_issue_link:

Code changed in jenkins
User: Oliver Gondža
Path:
core/src/main/java/hudson/model/AbstractItem.java
http://jenkins-ci.org/commit/jenkins/4edbb2565b72d3ac64f520c128a7afcfeba92c33
Log:
Merge pull request #1597 from fbelzunc/JENKINS-27183

[FIXED JENKINS-27183] Avoid deadlock when using build-monitor-plugin

timja commented 9 years ago

scm_issue_link:

Code changed in jenkins
User: tfennelly
Path:
changelog.html
cli/pom.xml
core/pom.xml
core/src/main/java/hudson/model/AbstractItem.java
debian/debian/changelog
plugins/pom.xml
pom.xml
test/pom.xml
war/pom.xml
http://jenkins-ci.org/commit/jenkins/7e5063937c31ee33de29254f1f13f5d4aa0d6174
Log:
Merge branch 'master' into JENKINS-27256

timja commented 9 years ago

scm_issue_link:

Code changed in jenkins
User: Felix Belzunce Arcos
Path:
core/src/main/java/hudson/model/AbstractItem.java
http://jenkins-ci.org/commit/jenkins/f4611b7c3376d23a55e7857c15b3d21c8beef25d
Log:
JENKINS-27183 Avoid deadlock when using build-monitor-plugin

(cherry picked from commit fb5540e38c935676d7f58e9d2ce7a84275bb898f)

Compare: https://github.com/jenkinsci/jenkins/compare/dbd262bc0b7d...f4611b7c3376

timja commented 9 years ago

scm_issue_link:

Code changed in jenkins
User: Felix Belzunce Arcos
Path:
core/src/main/java/hudson/model/AbstractItem.java
http://jenkins-ci.org/commit/jenkins/bc5713112bd9498ea0b6cb8bf4c1fbe039fcb2cb
Log:
JENKINS-27183 Avoid deadlock when using build-monitor-plugin

(cherry picked from commit fb5540e38c935676d7f58e9d2ce7a84275bb898f)