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

BuildHistoryWidget.getQueuedItems can block HTTP thread

      "Handling POST /job/.../buildHistory/ajax : ...
         java.lang.Thread.State: BLOCKED (on object monitor)
      	at hudson.model.Queue.getItems(Queue.java:723)
      	- waiting to lock <0x00000000c11cf910> (a hudson.model.Queue)
      	at hudson.widgets.BuildHistoryWidget.getQueuedItems(BuildHistoryWidget.java:63)
      	at sun.reflect.GeneratedMethodAccessor335.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125)
      	at org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:314)
      	at org.apache.commons.jexl.parser.ASTArrayAccess.evaluateExpr(ASTArrayAccess.java:185)
      	at org.apache.commons.jexl.parser.ASTIdentifier.execute(ASTIdentifier.java:75)
      	at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
      	at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
      	at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)
      	at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
      	at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:72)
      	at org.apache.commons.jelly.tags.core.CoreTagLibrary$3.run(CoreTagLibrary.java:134)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
      	at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
      	at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:146)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
      	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
      	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
      	at org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java:41)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
      	at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
      	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
      	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
      	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
      	at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
      	at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
      	at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
      	at org.kohsuke.stapler.jelly.JellyRequestDispatcher.forward(JellyRequestDispatcher.java:55)
      	at hudson.widgets.HistoryWidget.doAjax(HistoryWidget.java:191)
      

          [JENKINS-16831] BuildHistoryWidget.getQueuedItems can block HTTP thread

          Jesse Glick added a comment -

          JENKINS-16468 seems to have fixed a lock contention issue for the most commonly used views, but not the build history widget.

          Jesse Glick added a comment - JENKINS-16468 seems to have fixed a lock contention issue for the most commonly used views, but not the build history widget.

          Jesse Glick added a comment -

          Jesse Glick added a comment - https://github.com/jenkinsci/jenkins/pull/711

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/widgets/BuildHistoryWidget.java
          http://jenkins-ci.org/commit/jenkins/d4230ffc67bf24860965d0557aa2bce9ef3fdeb2
          Log:
          [FIXED JENKINS-16831] Use Queue.getApproximateItemsQuickly to avoid locks from UI.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/widgets/BuildHistoryWidget.java http://jenkins-ci.org/commit/jenkins/d4230ffc67bf24860965d0557aa2bce9ef3fdeb2 Log: [FIXED JENKINS-16831] Use Queue.getApproximateItemsQuickly to avoid locks from UI.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          core/src/main/java/hudson/widgets/BuildHistoryWidget.java
          http://jenkins-ci.org/commit/jenkins/f440a54026a53dd9adc957b572019956b7e41f65
          Log:
          JENKINS-16831 avoid JDK 1.6 dependency

          Compare: https://github.com/jenkinsci/jenkins/compare/2efa70955299...f440a54026a5


          You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
          For more options, visit https://groups.google.com/groups/opt_out.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/widgets/BuildHistoryWidget.java http://jenkins-ci.org/commit/jenkins/f440a54026a53dd9adc957b572019956b7e41f65 Log: JENKINS-16831 avoid JDK 1.6 dependency Compare: https://github.com/jenkinsci/jenkins/compare/2efa70955299...f440a54026a5 – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2280
          [FIXED JENKINS-16831] Use Queue.getApproximateItemsQuickly to avoid locks from UI. (Revision d4230ffc67bf24860965d0557aa2bce9ef3fdeb2)
          JENKINS-16831 avoid JDK 1.6 dependency (Revision f440a54026a53dd9adc957b572019956b7e41f65)

          Result = SUCCESS
          kohsuke : d4230ffc67bf24860965d0557aa2bce9ef3fdeb2
          Files :

          • core/src/main/java/hudson/widgets/BuildHistoryWidget.java
          • changelog.html

          kohsuke : f440a54026a53dd9adc957b572019956b7e41f65
          Files :

          • core/src/main/java/hudson/widgets/BuildHistoryWidget.java

          dogfood added a comment - Integrated in jenkins_main_trunk #2280 [FIXED JENKINS-16831] Use Queue.getApproximateItemsQuickly to avoid locks from UI. (Revision d4230ffc67bf24860965d0557aa2bce9ef3fdeb2) JENKINS-16831 avoid JDK 1.6 dependency (Revision f440a54026a53dd9adc957b572019956b7e41f65) Result = SUCCESS kohsuke : d4230ffc67bf24860965d0557aa2bce9ef3fdeb2 Files : core/src/main/java/hudson/widgets/BuildHistoryWidget.java changelog.html kohsuke : f440a54026a53dd9adc957b572019956b7e41f65 Files : core/src/main/java/hudson/widgets/BuildHistoryWidget.java

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: