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

Dashboard rendering spends too much time in WeatherColumn

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • core

      The Jenkins dashboard was taking a ridiculously long time to render. A number of threads showed stack traces like

      "Handling GET / : http-8080-2" ...
         java.lang.Thread.State: RUNNABLE
      	at java.io.FileInputStream.readBytes(Native Method)
      	at java.io.FileInputStream.read(Unknown Source)
      	at java.io.BufferedInputStream.fill(Unknown Source)
      	at java.io.BufferedInputStream.read(Unknown Source)
      	- locked <0x00000000fcb65020> (a java.io.BufferedInputStream)
      	at java.io.FilterInputStream.read(Unknown Source)
      	at java.io.PushbackInputStream.read(Unknown Source)
      	at com.thoughtworks.xstream.core.util.XmlHeaderAwareReader.getHeader(XmlHeaderAwareReader.java:79)
      	at com.thoughtworks.xstream.core.util.XmlHeaderAwareReader.<init>(XmlHeaderAwareReader.java:61)
      	at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:65)
      	at hudson.XmlFile.unmarshal(XmlFile.java:166)
      	at hudson.model.Run.reload(Run.java:310)
      	at hudson.model.Run.<init>(Run.java:299)
      	at hudson.model.AbstractBuild.<init>(AbstractBuild.java:182)
      	at hudson.maven.AbstractMavenBuild.<init>(AbstractMavenBuild.java:54)
      	at hudson.maven.MavenBuild.<init>(MavenBuild.java:113)
      	at sun.reflect.GeneratedConstructorAccessor75.newInstance(Unknown Source)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      	at java.lang.reflect.Constructor.newInstance(Unknown Source)
      	at hudson.model.AbstractProject.loadBuild(AbstractProject.java:1129)
      	at hudson.model.AbstractProject$1.create(AbstractProject.java:325)
      	at hudson.model.AbstractProject$1.create(AbstractProject.java:323)
      	at hudson.model.RunMap.retrieve(RunMap.java:225)
      	at hudson.model.RunMap.retrieve(RunMap.java:59)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:674)
      	- locked <0x00000000d17b2608> (a hudson.model.RunMap)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:657)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:456)
      	at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:220)
      	at hudson.tasks.Fingerprinter$FingerprintAction.compact(Fingerprinter.java:356)
      	at hudson.tasks.Fingerprinter$FingerprintAction.onLoad(Fingerprinter.java:345)
      	at hudson.model.Run.onLoad(Run.java:323)
      	at hudson.model.RunMap.retrieve(RunMap.java:226)
      	at hudson.model.RunMap.retrieve(RunMap.java:59)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:674)
      	- locked <0x00000000d17b2608> (a hudson.model.RunMap)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:657)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:456)
      	at hudson.model.AbstractProject.getNearestOldBuild(AbstractProject.java:1076)
      	at hudson.maven.MavenModuleSetBuild.getModuleLastBuilds(MavenModuleSetBuild.java:465)
      	at hudson.maven.MavenModuleSetBuild.computeResult(MavenModuleSetBuild.java:212)
      	at hudson.maven.MavenModuleSetBuild.getResult(MavenModuleSetBuild.java:203)
      	- locked <0x00000000f286c990> (a java.lang.Object)
      	at hudson.model.Run.getIconColor(Run.java:701)
      	at hudson.model.Job.getBuildStabilityHealthReport(Job.java:1035)
      	at hudson.model.Job.getBuildHealthReports(Job.java:1010)
      	at hudson.model.Job.getBuildHealth(Job.java:975)
      

      It seems that buildHealth.jelly, called from WeatherColumn/column.jelly, does some potentially rather expensive computations, especially when Maven projects are concerned. This should be done asynchronously, not in the HTTP rendering thread.

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: