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

UsageStatistics Page Decorator may get called during initialization.

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      UsageStatistics#getStatData may get called while Jenkins is not completely initialized. As it navigates all top level items, it may cause unexpected effects in extensions and plugins affecting those items.

      Example stack trace:

              [.....]
      	at jenkins.model.Jenkins.getAllItems(Jenkins.java:1409)
      	at hudson.model.UsageStatistics.getStatData(UsageStatistics.java:160)
              [.....]
      	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.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
      	at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
      	at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
              [.....]
      	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
      	at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
      	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.util.HudsonIsLoading.doDynamic(HudsonIsLoading.java:45)
      

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            core/src/main/java/hudson/model/UsageStatistics.java
            http://jenkins-ci.org/commit/jenkins/b2013edbf7a4d40df2bc05a1e219d8599e642961
            Log:
            Revert "JENKINS-32190 Make UsageStatistics#isDue check Jenkins init level before generating stats."

            This reverts commit d8a13ac07c4357eb74ab45a03955c0db430e3aa9.

            I noticed a strange drop in usage statistics from the mid Jan 2016,
            which corresponds to the time this change was released in the wild,
            and further drop when LTS 1.642.2 is released with this change at
            the end of Feb.

            I spent some time trying to determine how this might cause instances
            to stop sending data, but I couldn't come up with any. I left those
            notes in JENKINS-32190. There was some strange behaviours, but none
            explains what this is.

            So I'd like to back out this change and see if that makes any impact
            on the stats collection. If it backs up, then we know empirically
            this change is to blame, so that would justify spending further
            effort or come up with a fix from a different angle.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/model/UsageStatistics.java http://jenkins-ci.org/commit/jenkins/b2013edbf7a4d40df2bc05a1e219d8599e642961 Log: Revert " JENKINS-32190 Make UsageStatistics#isDue check Jenkins init level before generating stats." This reverts commit d8a13ac07c4357eb74ab45a03955c0db430e3aa9. I noticed a strange drop in usage statistics from the mid Jan 2016, which corresponds to the time this change was released in the wild, and further drop when LTS 1.642.2 is released with this change at the end of Feb. I spent some time trying to determine how this might cause instances to stop sending data, but I couldn't come up with any. I left those notes in JENKINS-32190 . There was some strange behaviours, but none explains what this is. So I'd like to back out this change and see if that makes any impact on the stats collection. If it backs up, then we know empirically this change is to blame, so that would justify spending further effort or come up with a fix from a different angle.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            core/src/main/java/hudson/model/UsageStatistics.java
            http://jenkins-ci.org/commit/jenkins/b67bb4c602192c39b28a58dba808f20ab4cb7e36
            Log:
            Merge pull request #2109 from jenkinsci/JENKINS-32190

            Revert JENKINS-32190 fix

            Compare: https://github.com/jenkinsci/jenkins/compare/f56ace54d173...b67bb4c60219

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/model/UsageStatistics.java http://jenkins-ci.org/commit/jenkins/b67bb4c602192c39b28a58dba808f20ab4cb7e36 Log: Merge pull request #2109 from jenkinsci/ JENKINS-32190 Revert JENKINS-32190 fix Compare: https://github.com/jenkinsci/jenkins/compare/f56ace54d173...b67bb4c60219
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #4497
            Revert "JENKINS-32190 Make UsageStatistics#isDue check Jenkins init (Revision b2013edbf7a4d40df2bc05a1e219d8599e642961)

            Result = SUCCESS
            kohsuke : b2013edbf7a4d40df2bc05a1e219d8599e642961
            Files :

            • core/src/main/java/hudson/model/UsageStatistics.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #4497 Revert " JENKINS-32190 Make UsageStatistics#isDue check Jenkins init (Revision b2013edbf7a4d40df2bc05a1e219d8599e642961) Result = SUCCESS kohsuke : b2013edbf7a4d40df2bc05a1e219d8599e642961 Files : core/src/main/java/hudson/model/UsageStatistics.java
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            core/src/main/java/hudson/model/UsageStatistics.java
            http://jenkins-ci.org/commit/jenkins/ce866ddb3cac225c3bf224d6b4eb89eef36f79c8
            Log:
            Revert "JENKINS-32190 Make UsageStatistics#isDue check Jenkins init level before generating stats."

            This reverts commit d8a13ac07c4357eb74ab45a03955c0db430e3aa9.

            I noticed a strange drop in usage statistics from the mid Jan 2016,
            which corresponds to the time this change was released in the wild,
            and further drop when LTS 1.642.2 is released with this change at
            the end of Feb.

            I spent some time trying to determine how this might cause instances
            to stop sending data, but I couldn't come up with any. I left those
            notes in JENKINS-32190. There was some strange behaviours, but none
            explains what this is.

            So I'd like to back out this change and see if that makes any impact
            on the stats collection. If it backs up, then we know empirically
            this change is to blame, so that would justify spending further
            effort or come up with a fix from a different angle.

            (cherry picked from commit b2013edbf7a4d40df2bc05a1e219d8599e642961)

            Compare: https://github.com/jenkinsci/jenkins/compare/003f1e5b0c5e...ce866ddb3cac

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/model/UsageStatistics.java http://jenkins-ci.org/commit/jenkins/ce866ddb3cac225c3bf224d6b4eb89eef36f79c8 Log: Revert " JENKINS-32190 Make UsageStatistics#isDue check Jenkins init level before generating stats." This reverts commit d8a13ac07c4357eb74ab45a03955c0db430e3aa9. I noticed a strange drop in usage statistics from the mid Jan 2016, which corresponds to the time this change was released in the wild, and further drop when LTS 1.642.2 is released with this change at the end of Feb. I spent some time trying to determine how this might cause instances to stop sending data, but I couldn't come up with any. I left those notes in JENKINS-32190 . There was some strange behaviours, but none explains what this is. So I'd like to back out this change and see if that makes any impact on the stats collection. If it backs up, then we know empirically this change is to blame, so that would justify spending further effort or come up with a fix from a different angle. (cherry picked from commit b2013edbf7a4d40df2bc05a1e219d8599e642961) Compare: https://github.com/jenkinsci/jenkins/compare/003f1e5b0c5e...ce866ddb3cac
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            core/src/main/java/hudson/model/UsageStatistics.java
            http://jenkins-ci.org/commit/jenkins/3a44687df5f979ea57a3206b83817c5be7299eb3
            Log:
            Revert "JENKINS-32190 Make UsageStatistics#isDue check Jenkins init level before generating stats."

            This reverts commit d8a13ac07c4357eb74ab45a03955c0db430e3aa9.

            I noticed a strange drop in usage statistics from the mid Jan 2016,
            which corresponds to the time this change was released in the wild,
            and further drop when LTS 1.642.2 is released with this change at
            the end of Feb.

            I spent some time trying to determine how this might cause instances
            to stop sending data, but I couldn't come up with any. I left those
            notes in JENKINS-32190. There was some strange behaviours, but none
            explains what this is.

            So I'd like to back out this change and see if that makes any impact
            on the stats collection. If it backs up, then we know empirically
            this change is to blame, so that would justify spending further
            effort or come up with a fix from a different angle.

            (cherry picked from commit b2013edbf7a4d40df2bc05a1e219d8599e642961)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/model/UsageStatistics.java http://jenkins-ci.org/commit/jenkins/3a44687df5f979ea57a3206b83817c5be7299eb3 Log: Revert " JENKINS-32190 Make UsageStatistics#isDue check Jenkins init level before generating stats." This reverts commit d8a13ac07c4357eb74ab45a03955c0db430e3aa9. I noticed a strange drop in usage statistics from the mid Jan 2016, which corresponds to the time this change was released in the wild, and further drop when LTS 1.642.2 is released with this change at the end of Feb. I spent some time trying to determine how this might cause instances to stop sending data, but I couldn't come up with any. I left those notes in JENKINS-32190 . There was some strange behaviours, but none explains what this is. So I'd like to back out this change and see if that makes any impact on the stats collection. If it backs up, then we know empirically this change is to blame, so that would justify spending further effort or come up with a fix from a different angle. (cherry picked from commit b2013edbf7a4d40df2bc05a1e219d8599e642961)

              People

              • Assignee:
                andresrc Andres Rodriguez
                Reporter:
                andresrc Andres Rodriguez
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: