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

getAssignedLabel in MavenModule is implemented with lazy loading

    Details

    • Similar Issues:

      Description

      getAssignedLabel function seems to be triggering lazy loading in MavenModule class which can then take some time to complete.

      Maybe should use getSameNodeConstraint

      https://github.com/jenkinsci/maven-plugin/blob/master/src/main/java/hudson/maven/MavenModule.java#L459

      Append by Steven Christou

      Stack trace snippet below:

       - hudson.model.RunMap.retrieve(java.io.File) @bci=21, line=218 (Interpreted frame)
       - hudson.model.RunMap.retrieve(java.io.File) @bci=2, line=56 (Interpreted frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.load(java.io.File, jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=2, line=688 (Interpreted frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.load(int, jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=36, line=650 (Compiled frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.search(int, jenkins.model.lazy.AbstractLazyLoadRunMap$Direction) @bci=80, line=382 (Compiled frame)
       - jenkins.model.lazy.LazyBuildMixIn$RunMixIn.getPreviousBuild() @bci=78, line=366 (Interpreted frame)
       - hudson.model.AbstractBuild.getPreviousBuild() @bci=4, line=196 (Interpreted frame)
       - hudson.model.AbstractBuild.getPreviousBuild() @bci=1, line=104 (Interpreted frame)
       - hudson.tasks.Fingerprinter$FingerprintAction.compact() @bci=14, line=352 (Interpreted frame)
       - hudson.tasks.Fingerprinter$FingerprintAction.onLoad(hudson.model.Run) @bci=6, line=341 (Interpreted frame)
       - hudson.model.Run.onLoad() @bci=41, line=342 (Compiled frame)
       - hudson.maven.MavenModuleSetBuild.onLoad() @bci=1, line=151 (Interpreted frame)
       - hudson.model.RunMap.retrieve(java.io.File) @bci=28, line=219 (Interpreted frame)
       - hudson.model.RunMap.retrieve(java.io.File) @bci=2, line=56 (Interpreted frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.load(java.io.File, jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=2, line=688 (Interpreted frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.load(int, jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=36, line=650 (Compiled frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.search(int, jenkins.model.lazy.AbstractLazyLoadRunMap$Direction) @bci=80, line=382 (Compiled frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(int) @bci=5, line=547 (Compiled frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.search(int, jenkins.model.lazy.AbstractLazyLoadRunMap$Direction) @bci=176, line=393 (Compiled frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.newestBuild() @bci=6, line=335 (Compiled frame)
       - jenkins.model.lazy.LazyBuildMixIn.getLastBuild() @bci=4, line=249 (Compiled frame)
       - hudson.model.AbstractProject.getLastBuild() @bci=4, line=974 (Compiled frame)
       - hudson.model.AbstractProject.getLastBuiltOn() @bci=1, line=1038 (Compiled frame)
       - hudson.maven.MavenModule.getAssignedLabel() @bci=4, line=460 (Interpreted frame)
       - hudson.model.Label.getTiedJobCount() @bci=176, line=392 (Compiled frame)
      

        Attachments

          Issue Links

            Activity

            Hide
            schristou Steven Christou added a comment -

            Upgrading priority to critical as something as simple as viewing the Labels build results can trigger this.

            Show
            schristou Steven Christou added a comment - Upgrading priority to critical as something as simple as viewing the Labels build results can trigger this.
            Hide
            jglick Jesse Glick added a comment -

            You should include a sample stack trace from a thread dump.

            Show
            jglick Jesse Glick added a comment - You should include a sample stack trace from a thread dump.
            Hide
            jglick Jesse Glick added a comment -

            Note that the fix of JENKINS-19392 probably would have helped here too.

            Show
            jglick Jesse Glick added a comment - Note that the fix of JENKINS-19392 probably would have helped here too.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: christ66
            Path:
            core/src/main/java/hudson/model/Label.java
            test/src/test/java/hudson/model/NodeTest.java
            http://jenkins-ci.org/commit/jenkins/7a2dc32cc3b309a4391ada820732a550d9d4badc
            Log:
            JENKINS-26391 Prevent lazy loading operation when obtaining label information.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: christ66 Path: core/src/main/java/hudson/model/Label.java test/src/test/java/hudson/model/NodeTest.java http://jenkins-ci.org/commit/jenkins/7a2dc32cc3b309a4391ada820732a550d9d4badc Log: JENKINS-26391 Prevent lazy loading operation when obtaining label information.
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: changelog.html http://jenkins-ci.org/commit/jenkins/46dc6850edb1d7ef52592794b15e69db7dfbed1a Log: Noting merges JENKINS-15355 JENKINS-21618 JENKINS-22941 JENKINS-25938 JENKINS-26391 JENKINS-26900 JENKINS-27476 JENKINS-27563 JENKINS-27564 JENKINS-27565 JENKINS-27566 Fixing link text for JENKINS-6167
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #4040
            JENKINS-26391 Prevent lazy loading operation when obtaining label information. (Revision 7a2dc32cc3b309a4391ada820732a550d9d4badc)

            Result = SUCCESS
            schristou88 : 7a2dc32cc3b309a4391ada820732a550d9d4badc
            Files :

            • core/src/main/java/hudson/model/Label.java
            • test/src/test/java/hudson/model/NodeTest.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #4040 JENKINS-26391 Prevent lazy loading operation when obtaining label information. (Revision 7a2dc32cc3b309a4391ada820732a550d9d4badc) Result = SUCCESS schristou88 : 7a2dc32cc3b309a4391ada820732a550d9d4badc Files : core/src/main/java/hudson/model/Label.java test/src/test/java/hudson/model/NodeTest.java
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            core/src/main/java/hudson/model/Label.java
            http://jenkins-ci.org/commit/jenkins/98605d0afb441f7953875097953e626128d31825
            Log:
            After JENKINS-26391 we need to compare labels based on matching names not instance identity

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/hudson/model/Label.java http://jenkins-ci.org/commit/jenkins/98605d0afb441f7953875097953e626128d31825 Log: After JENKINS-26391 we need to compare labels based on matching names not instance identity
            Hide
            schristou Steven Christou added a comment -

            Marking as resolved. This was fixed as part of https://github.com/jenkinsci/jenkins/pull/1574 which is in 1.607+.

            Show
            schristou Steven Christou added a comment - Marking as resolved. This was fixed as part of https://github.com/jenkinsci/jenkins/pull/1574 which is in 1.607+.
            Hide
            olivergondza Oliver Gondža added a comment -

            This is part of 1.609, will be in next LTS.

            Show
            olivergondza Oliver Gondža added a comment - This is part of 1.609, will be in next LTS.

              People

              • Assignee:
                schristou Steven Christou
                Reporter:
                fbelzunc Félix Belzunce Arcos
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: